Bug #13668
closed[VERSION] add a human readable version as Default
100%
Description
after #13667 is done /var/www/arvados-api/current/package-build.version will be available
making simple changes to lib/app_version.rb will make use of this to display:
1.1.4-1 (ff353df24)
in the version dialog in workbench.
API server:- add package_version config to application.yml so sysadmin can specify/override
- add "package_version" method to AppVersion that uses the configured package version or reads the package.version file
- add "packageVersion" to discovery doc, alongside "source_version"
- add package_version config to application.yml so sysadmin can specify/override
- add "package_version" method to AppVersion that uses the configured package version or reads the package.version file
- report both package version and source version in the dialog box
- source version still links to the commit in redmine
- ...for both apiserver and workbench versions
Updated by Nico César over 6 years ago
- Subject changed from [VERSION] add a human readable version as efault to [VERSION] add a human readable version as Default
Updated by Tom Morris over 6 years ago
- Project changed from 35 to Arvados
- Target version changed from To Be Groomed to 2018-07-18 Sprint
Updated by Lucas Di Pentima over 6 years ago
- Assigned To set to Lucas Di Pentima
Updated by Lucas Di Pentima over 6 years ago
- Status changed from New to In Progress
Updated by Lucas Di Pentima over 6 years ago
Updates at 6dd60d7c7 - branch 13668-api-wb-package-version
Test run: https://ci.curoverse.com/job/developer-run-tests/792/
Added package version information on both API & Workbench.
Package versions are displayed on WB's dialogs alongside source versions (commit hashes).
Although this story is blocked by #13667, I think it can be merged without it as it defaults to package version "unknown"
when the package-build.version
doesn't exist.
Updated by Tom Clegg over 6 years ago
In the Ruby code, package_version is right, but in the discovery doc, the key should be packageVersion, to match [all but one of] the other config keys in the discovery doc. This is probably a good time to add sourceVersion, too (with same value as source_version) -- later we can update workbench to use sourceVersion, and then eventually remove the misfit source_version.
In AppVersion.package_version, if the package-build.version file doesn't exist, set @package_version
to false, and change the || @package_version
test to || !@package_version.nil?
-- that way, if the file doesn't exist, it won't keep retrying on every page load. (This matters less on the API side because the discovery doc itself is cached, but we should fix it anyway just so the two copies of the code remain identical.)
The rest LGTM, thanks!
Updated by Lucas Di Pentima over 6 years ago
Updates at 2c87b580a
Test run: https://ci.curoverse.com/job/developer-run-tests/796/
- Replace
package_version
withpackageVersion
on discovery document (and addingsourceVersion
too). - Enhanced package version caching on api server & wb.
Regarding the suggestion about using
if (cached = Rails.configuration.package_version || !@package_version.nil?) return cached end
...I think that won't achieve the objective of not retrying reading the file. Instead what I did is assigning "unknown"
to @package_version when the file doesn't exist.
Updated by Tom Clegg over 6 years ago
Yes, you're right, !x.nil?
would have messed up the assignment to cached
. Your working version is better. :)
LGTM, thanks
Updated by Lucas Di Pentima over 6 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|eead78e2eb11528af8cb862dcb6f9a41737a8a14.