Project

General

Profile

Actions

Bug #13668

closed

[VERSION] add a human readable version as Default

Added by Nico César almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
1.0
Release:
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

Subtasks 1 (0 open1 closed)

Task #13726: Review 13668-api-wb-package-versionClosedLucas Di Pentima07/09/2018Actions
Actions #2

Updated by Nico César almost 6 years ago

  • Subject changed from [VERSION] add a human readable version as efault to [VERSION] add a human readable version as Default
Actions #3

Updated by Tom Clegg almost 6 years ago

  • Description updated (diff)
Actions #4

Updated by Tom Clegg almost 6 years ago

  • Story points set to 1.0
Actions #5

Updated by Tom Morris almost 6 years ago

  • Project changed from 35 to Arvados
  • Target version changed from To Be Groomed to 2018-07-18 Sprint
Actions #6

Updated by Lucas Di Pentima almost 6 years ago

  • Assigned To set to Lucas Di Pentima
Actions #7

Updated by Lucas Di Pentima almost 6 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Lucas Di Pentima almost 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.

Actions #9

Updated by Tom Clegg almost 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!

Actions #10

Updated by Lucas Di Pentima almost 6 years ago

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.

Actions #11

Updated by Tom Clegg almost 6 years ago

Yes, you're right, !x.nil? would have messed up the assignment to cached. Your working version is better. :)

LGTM, thanks

Actions #12

Updated by Lucas Di Pentima almost 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Tom Morris almost 6 years ago

  • Release set to 13
Actions

Also available in: Atom PDF