fix(cli): point version-check hint to apm self-update#1943
Open
syf2211 wants to merge 1 commit into
Open
Conversation
When a newer APM release is detected at startup, the CLI now suggests `apm self-update` instead of the deprecated `apm update` command. Fixes microsoft#1939
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the startup “new version available” hint to recommend apm self-update (the correct CLI self-upgrader) instead of the deprecated apm update shim, and updates the tests that assert this text.
Changes:
- Update
get_update_hint_message()to return “Run apm self-update to upgrade” when self-update is enabled. - Update unit and integration tests to assert the new hint text.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/apm_cli/update_policy.py |
Updates the startup update-hint string to point to apm self-update. |
tests/unit/test_update_policy.py |
Updates the unit assertion and test name for the new hint text. |
tests/integration/test_version_notification.py |
Updates integration assertions to look for/avoid apm self-update. |
tests/integration/test_utils_logic_phase4w3.py |
Updates integration assertion to match the new hint text. |
Author
|
@microsoft-github-policy-service agree |
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.
Description
When APM detects a newer CLI release at startup, the notification hint now
suggests
apm self-updateinstead of the deprecatedapm updatecommand.Following the old hint sent users to a command that immediately warned about
its own deprecation.
Fixes #1939
Type of change
Testing
Updated existing unit and integration tests that assert the startup hint text.
Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdateddocs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated