apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.64k stars 1.02k forks source link

precommit should fail the build if any jar sha1 files contain any whitespace or newlines [LUCENE-7949] #8998

Open asfimport opened 7 years ago

asfimport commented 7 years ago

as part of SOLR-11209, miller updated the sha1 files for the jar's he was upgrading, and somehow a trailing newline got added to one of them, which caused jenkins to freak out about modified source files as part of the build (IIUC because jenkins was rebuilding the sha files and noticing they were different – just because of the trailing newline.

If precommit validated/enforced the expected structure of the sha1 files we could prevent these types of confusing build failures down the road.


Migrated from LUCENE-7949 by Chris M. Hostetter (@hossman), updated Sep 07 2017 Linked issues:

asfimport commented 7 years ago

Chris M. Hostetter (@hossman) (migrated from JIRA)

alternatively: maybe check-working-copy should directly depend on jar-checksums such that anyone running precommit will get this error and see the diff locally and git-add the new file.

And/or: check-working-copy could be made smart enough treat the jar sha1 files as special, and give a more informative error about why it's failing.

asfimport commented 7 years ago

Chris M. Hostetter (@hossman) (migrated from JIRA)

looks like the same problem just big Joel in SOLR-11241