Skip to content

fix(cli): point version-check hint to apm self-update#1943

Open
syf2211 wants to merge 1 commit into
microsoft:mainfrom
syf2211:fix/update-hint-self-update
Open

fix(cli): point version-check hint to apm self-update#1943
syf2211 wants to merge 1 commit into
microsoft:mainfrom
syf2211:fix/update-hint-self-update

Conversation

@syf2211

@syf2211 syf2211 commented Jun 28, 2026

Copy link
Copy Markdown

Description

When APM detects a newer CLI release at startup, the notification hint now
suggests apm self-update instead of the deprecated apm update command.
Following the old hint sent users to a command that immediately warned about
its own deprecation.

Fixes #1939

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Updated existing unit and integration tests that assert the startup hint text.

Spec conformance (OpenAPM v0.1)

  • Spec edit: docs/src/content/docs/specs/openapm-v0.1.md updated
  • Manifest edit: docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.yml updated
  • Test edit: a @pytest.mark.req("req-XXX") test under tests/spec_conformance/ added or extended.
  • CONFORMANCE.{md,json} regenerated
  • N/A -- this PR does not change OpenAPM-observable behaviour.

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
Copilot AI review requested due to automatic review settings June 28, 2026 13:03
@syf2211

syf2211 commented Jun 28, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@syf2211

syf2211 commented Jun 28, 2026

Copy link
Copy Markdown
Author

recheck

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@syf2211

syf2211 commented Jun 28, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

[BUG] Update hint uses the deprecated update command

2 participants