Skip to content

[BUG] Marketplace uninstall aliases are lost after apm update #2997

Description

Bug

After installing a plugin using plugin@marketplace, running apm update can lose the metadata needed to uninstall it by that original alias. This affects both project and global scope.

Installation stores canonical Git coordinates in apm.yml and records the marketplace alias in the lockfile. When update rebuilds the dependency's lock entry without rediscovering the marketplace, it drops discovered_via and marketplace_plugin_name. The dependency updates successfully, but uninstall can no longer resolve the alias offline and may abort at the existing registry/lock ownership guard.

Reproduction

  1. Register a marketplace and install a plugin using plugin@marketplace.
  2. Advance the plugin's tracked Git branch.
  3. Run apm update --yes in the same scope.
  4. Inspect the lockfile: the revision advances, but the marketplace alias metadata is missing.
  5. Unregister the marketplace and try to uninstall using the original alias.

The automated project/global reproduction uses a local Git remote and does not manually edit the consumer manifest or lockfile.

Expected behavior

Updating the same dependency preserves its marketplace alias metadata while refreshing its revision and content hashes. Uninstalling by the original alias should continue to work without the marketplace being available.

Environment

Originally reproduced with APM 0.30.0 and main at e38261c5, on macOS with Python 3.12.13 and the source-installed CLI.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/lockfileLockfile schema, per-file provenance, integrity hashes, drift detection.area/marketplacemarketplace.json schema, federation, authoring suite, source parity.status/acceptedHuman scope approval; verify the issue's approval record and review contact before work.theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.triage/recommendedAutomated advice completed; not human scope approval.type/bugSomething does not work as documented.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions