-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RATIS-1840. Avoid including build timestamp in artifacts #1114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @adoroszlai for working on this!
Verified the unreproducible timestamp in the build (using master)
#Created by build system. Do not modify
#Sat Jun 29 21:58:45 CST 2024
version=3.2.0-SNAPSHOT
revision=c31806dbdcf2f288c57684958447a6ddfe6fc29c
name=Apache Ratis Project Assembly
timestamp=1719669525114
I tried to build Ratis after applying this patch and the original ratis-version.properties
is gone. There are no output files (like the original properties file), is that an expected behavior?
Also, I tried to run mvn hadoops:version-info
and got errors
on project ratis: The parameters 'source' for goal org.apache.hadoop:hadoop-maven-plugins:3.4.0:version-info are missing or invalid
, am I using it in an incorrect way?
Thanks @SzyWilliam for checking this. Here are my steps:
Output on
Output with the patch:
With the patch, we have an extra file in On
However, I don't think these are ever used, since these modules have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find * -name 'ratis-version.properties' | sort
echo # for separator line
cat ratis-common/target/classes/ratis-version.properties # sample
+1 verified. Thanks @adoroszlai very much for working on this!
Thanks @SzyWilliam for reviewing and merging this. |
What changes were proposed in this pull request?
buildnumber-maven-plugin
'screate-metadata
goal generates a properties file similar to:Time of build should be omitted, because it makes builds non-reproducible. The same set of sources and build instructions result in different output each time.
However,
buildnumber-maven-plugin
doesn't seem to have any way to configure the properties to be included/omitted. We can replace it with a custom properties file.hadoop-maven-plugins
is used to get the SCM revision.https://issues.apache.org/jira/browse/RATIS-1840
How was this patch tested?
Added a step in
compile
check to verify build is reproducible.CI:
https://github.com/adoroszlai/ratis/actions/runs/9659530041