Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0-alpha-1, 2.3.0
-
None
-
None
Description
The HBase build's creation time is presented in the HBase UI, and made available through Java, via the org.apache.hadoop.hbase.Version class's date value, which is generated at build time by hbase-common/src/saveVersion.sh. The script just invokes the shell command date and captures its result as a string.
The problem is, this occurs every time hbase-common is built. And, for good and sufficient reason, when making a release via dev-support/create-release, the task for building and deploying hbase jars as maven libraries and the task for building binary release artifacts as tarballs, EACH do a clean build. Thus, the build time found in the libs is different from the build time found in the release tarballs.
There is value in keeping the two tasks independent, and able to run fully each by themselves. And there is value in doing a clean at the start of such processes, to make sure you're releasing binaries that exactly match the source code.
So to keep these benefits, but enable the start time to be determined once and used for a couple builds in a row in a given environment, I propose to allow injecting the desired value. Specifically, I want to change saveVersion.sh to look for an existing value of env var HBASE_BUILD_TIME, and if it exists use it instead of calling date. One would of course set it as part of the build process (in create-release) and clear this value by unsetting the environment variable when done with the build.