Bug #13668
closed
[VERSION] add a human readable version as Default
Added by Nico César over 6 years ago.
Updated over 6 years ago.
Estimated time:
(Total: 0.00 h)
Release relationship:
Auto
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"
Workbench:
- 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
- Subject changed from [VERSION] add a human readable version as efault to [VERSION] add a human readable version as Default
- Description updated (diff)
- Project changed from 35 to Arvados
- Target version changed from To Be Groomed to 2018-07-18 Sprint
- Assigned To set to Lucas Di Pentima
- Status changed from New to In Progress
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.
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!
Updates at 2c87b580a
Test run: https://ci.curoverse.com/job/developer-run-tests/796/
- Replace
package_version
with packageVersion
on discovery document (and adding sourceVersion
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.
Yes, you're right, !x.nil?
would have messed up the assignment to cached
. Your working version is better. :)
LGTM, thanks
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Also available in: Atom
PDF