You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Matthew Foley (Jira)" <ji...@apache.org> on 2020/06/23 01:01:01 UTC

[jira] [Created] (HBASE-24617) Enable injecting build start time value as part of build

Matthew Foley created HBASE-24617:
-------------------------------------

             Summary: Enable injecting build start time value as part of build
                 Key: HBASE-24617
                 URL: https://issues.apache.org/jira/browse/HBASE-24617
             Project: HBase
          Issue Type: Improvement
          Components: create-release, UI
    Affects Versions: 3.0.0-alpha-1, 2.3.0
            Reporter: Matthew Foley
            Assignee: Matthew Foley


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)