Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server and CLI use version from release and versionChecking constant and commit revision #4308

Merged
merged 13 commits into from
Jul 31, 2021

Conversation

longquanzheng
Copy link
Contributor

@longquanzheng longquanzheng commented Jul 9, 2021

What changed?
CLI and server use version from versionChecking constant

Why?
See Slack/StackOverflow and Github issues. There are lots of complaints recently.

One thing we need to improve is the versioning of CLI and server

The original intention of the current version is to track updates on the CLI development, with major.minor.patch semantics.
However, it turns out to be difficult to maintain this way.
And this information is usually not useful.

There is other more useful information is the version that CLI is sending request with.
https://github.com/uber/cadence/blob/c185ad8c149b47114df1bc547a0cfd82f2c60d12/tools/cli/factory.go#L127

And also usually the best way to make sure compatibility is the CLI is from the same release as server.

Using those versions will be more meaningful to understand the compatibility, and less/no maintenance required for development.

How did you test it?

(qlong-cli-version)$export CADENCE_RELEASE_VERSION=0.22.0; rm cadence ; make cadence ; ./cadence
compiling cadence with OS: darwin, ARCH: amd64
NAME:
   cadence - A command-line tool for cadence users

USAGE:
   cadence [global options] command [command options] [arguments...]

VERSION:
   CLI feature version: 1.7.0
   Release version: 0.22.0
   Build commit: 2021-07-30T16:54:06-07:00-3b30dd962
   Note: CLI feature version is for compatibility checking between server and CLI if enabled feature checking. Server is always backward compatible to older CLI versions, but not accepting newer than it can support.

COMMANDS:
   domain, d     Operate cadence domain
...
...
...

Server:

(qlong-cli-version)$export CADENCE_RELEASE_VERSION=0.22.0; rm cadence-server ; make cadence-server ; ./cadence-server
rm: cannot remove 'cadence-server': No such file or directory
compiling cadence-server with OS: darwin, ARCH: amd64
NAME:
   cadence - Cadence server

USAGE:
   cadence-server [global options] command [command options] [arguments...]

VERSION:
   Release version: 0.22.0
   Build commit: 2021-07-30T17:12:13-07:00-382f43354
   Max Support CLI feature version: 1.7.0
   Max Support GoSDK feature version: 1.7.0
   Max Support JavaSDK feature version: 1.5.0
   Note:  Feature version is for compatibility checking between server and clients if enabled feature checking. Server is always backward compatible to older CLI versions, but not accepting newer than it can support.

COMMANDS:
   start,   start cadence server

CLI Docker image:

(qlong-cli-version)$docker build . -t ubercadence/cli:0.test.0 --build-arg TARGET=cli --build-arg RELEASE_VERSION=0.test.0

and then

(qlong-cli-version)$docker run --rm ubercadence/cli:0.test.0
NAME:
   cadence - A command-line tool for cadence users

USAGE:
   cadence [global options] command [command options] [arguments...]

VERSION:
   CLI feature version: 1.7.0
   Release version: 0.test.0
   Build commit: 2021-07-30T17:12:13-07:00-382f43354
   Note: CLI feature version is for compatibility checking between server and CLI if enabled feature checking. Server is always backward compatible to older CLI versions, but not accepting newer than it can support.

COMMANDS:
   domain, d     Operate cadence domain

Potential risks
No.

Release notes
Users may be confused about this version change from 0.19 to 1.7.0
Should add clarification of this change in the release notes.

Documentation Changes
No

@coveralls
Copy link

coveralls commented Jul 9, 2021

Pull Request Test Coverage Report for Build 962bdeb4-aafe-48e3-a8fb-eeb3fe36bbb1

  • 8 of 17 (47.06%) changed or added relevant lines in 3 files are covered.
  • 88 unchanged lines in 11 files lost coverage.
  • Overall coverage decreased (-0.05%) to 56.823%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/server/cadence/cadence.go 0 9 0.0%
Files with Coverage Reduction New Missed Lines %
common/task/weightedRoundRobinTaskScheduler.go 1 89.64%
common/persistence/executionManager.go 2 75.75%
common/persistence/statsComputer.go 2 96.43%
common/task/fifoTaskScheduler.go 2 87.63%
service/history/queue/transfer_queue_processor.go 2 57.18%
common/persistence/dataManagerInterfaces.go 3 64.83%
service/history/shard/context.go 9 66.02%
common/persistence/nosql/nosqlplugin/cassandra/tasks.go 14 72.8%
common/persistence/nosql/nosqlTaskStore.go 16 58.37%
service/history/execution/context.go 17 69.22%
Totals Coverage Status
Change from base Build cc528a93-ca28-4ed3-91d3-a1b08c520ca0: -0.05%
Covered Lines: 78004
Relevant Lines: 137275

💛 - Coveralls

@longquanzheng longquanzheng changed the title CLI use version from versionChecking constant CLI use version from release and versionChecking constant and commit revision Jul 9, 2021
@longquanzheng longquanzheng requested review from yux0 and Groxx July 9, 2021 19:58
@longquanzheng
Copy link
Contributor Author

This will improve #4305

@github-actions github-actions bot force-pushed the qlong-cli-version branch from a3c20bc to 6fc1379 Compare July 23, 2021 18:04
@longquanzheng longquanzheng requested a review from yycptt July 23, 2021 18:04
@longquanzheng longquanzheng changed the title CLI use version from release and versionChecking constant and commit revision All binaries use version from release and versionChecking constant and commit revision Jul 31, 2021
@longquanzheng longquanzheng changed the title All binaries use version from release and versionChecking constant and commit revision Server and CLI use version from release and versionChecking constant and commit revision Jul 31, 2021
@longquanzheng longquanzheng merged commit 28e0489 into master Jul 31, 2021
@longquanzheng longquanzheng deleted the qlong-cli-version branch July 31, 2021 01:20
yycptt pushed a commit that referenced this pull request Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants