doctor's version hint blames the server when it's the CLI escript that's behind (server 0.1.68 @ X, CLI 0.1.67 @ X → "restart the server") - #1956
Open
ryanrborn wants to merge 7 commits into
Conversation
When the server is newer than the CLI, doctor was blaming the server and advising restarting it instead of rebuilding/reinstalling the CLI. Determine the direction of the mismatch and give appropriate guidance.
…version-hint-blames-server
…version-hint-blames-server
…version-hint-blames-server
…tor tests (bd-42rnnq)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
arb server doctordetects a version mismatch between the CLI and the server in dev/source mode, it previously always assumed the server's compiled version was stale and advised restarting the server. However, if the server is newer than the CLI (e.g. after tagging a new release, or if the server was updated while the escript was built earlier), the CLI is the component that is stale.This change inspects the direction of the mismatch in
ArbiterCli.Cmd.Doctor.Checks:arbCLI (arb install-cli).Test plan
apps/arbiter_cli/test/arbiter_cli/cmd/doctor_test.exs:dev/source install with server version newer than CLI hints to rebuild and reinstall CLIdev/source install with server version older than CLI hints to restart the servermix testacrossarbiter_cli(all 800 tests pass).mix format --check-formattedpasses.References: bd-42rnnq
Closes #1946