You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/07/15 01:56:57 UTC

[GitHub] wohali opened a new issue #1309: CouchDB should always report its git hash at runtime

wohali opened a new issue #1309: CouchDB should always report its git hash at runtime
URL: https://github.com/apache/couchdb/issues/1309
 
 
   ## Current and expected behaviour
   Currently, if you are running a CouchDB master build, you will see the matching git version when performing a `GET /`:
   ```
   {"couchdb":"Welcome","version":"2.2.0-47a38d3d0","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
   ```
   
   And you see it in the log output at the `info` level:
   ```
   [info] 2018-05-02T18:33:16.364837Z node1@127.0.0.1 <0.237.0> -------- Apache CouchDB 2.2.0-47a38d3d0 is starting.
   ```
   
   When building a release, this information vanishes:
   ```
   {"couchdb":"Welcome","version":"2.1.1","features":["scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
   ```
   
   It's not even in the log anymore:
   ```
   [info] 2018-05-02T18:54:01.657777Z couchdb@127.0.0.1 <0.204.0> -------- Apache CouchDB 2.1.1 is starting.
   ```
   
   This makes build audits painful, and makes release candidates impossible to distinguish from one actual releases. This, in turn, has lead to actual problems in the field, where people install an RC that has serious problems but it looks like it's an actual release.
   
   ## Proposal
   1. Change the version number response as follows:
       1. When a build is built off of a release-like tag (regex: `^[0-9]+\.[0-9]\.[0-9]+(-RC[0-9]+)?$$`), give the build the version number `X.Y.Z`.
       1. When the regex doesn't match, label the build `X.Y.Z-dev`.
   1. Always return the above version number, as well as the git hash (short or long, long might be better) info on `GET /` as a subkey. Examples:
   ```json
   {"couchdb":"Welcome","version":"2.2.0-dev","git_hash":"47a38d3d0","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
   {"couchdb":"Welcome","version":"2.1.1","git_hash":"f84faa532","features":["scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
   ```
   5. Always print the version number and the git hash at info level into the log on startup. Examples:
   ```
   [info] 2018-05-02T18:33:16.364837Z node1@127.0.0.1 <0.237.0> -------- Apache CouchDB 2.2.0-dev (git hash 47a38d3d0) is starting.
   [info] 2018-05-02T18:54:01.657777Z couchdb@127.0.0.1 <0.204.0> -------- Apache CouchDB 2.1.1 (git hash f84faa532) is starting.
   ```
   
   ## Context
   As a release manager, I want to ensure that any and all builds of CouchDB are traceable to the exact source code used to build them. This extends to and includes all development builds, release candidate builds, and official release builds.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services