Skip to content

Remove apm marketplace publish and marketplace doctor alias (#1134)#1766

Open
sergio-sisternes-epam wants to merge 2 commits into
mainfrom
sergio-sisternes-epam/deprecate-marketplace-publish
Open

Remove apm marketplace publish and marketplace doctor alias (#1134)#1766
sergio-sisternes-epam wants to merge 2 commits into
mainfrom
sergio-sisternes-epam/deprecate-marketplace-publish

Conversation

@sergio-sisternes-epam

Copy link
Copy Markdown
Collaborator

TL;DR

Remove the consumer-repo fan-out workflow (apm marketplace publish) and the deprecated apm marketplace doctor subcommand alias. Net deletion: ~10,200 lines across 33 files.

Problem (WHY)

apm marketplace publish opens PRs on downstream consumer repos to bump marketplace pins -- a responsibility outside the scope of a package manager. npm/pip/cargo never push to consumers. The surface is wide (publisher, PR integration, consumer-targets file, state file) and has produced regressions (#1131). The marketplace doctor subcommand was already deprecated in favour of top-level apm doctor.

Approach (WHAT)

Single-phase direct removal in one PR:

  • Delete 3 source files: publish.py command, publisher.py library, pr_integration.py library
  • Clean marketplace __init__.py files: remove publish-related imports, helpers, __all__ entries
  • Update doctor.py: remove deprecated marketplace doctor Click alias and gh CLI check (publish-only); keep run_doctor() for top-level apm doctor
  • Update git_stderr.py: hint now says apm doctor instead of apm marketplace doctor
  • Delete 9 test files (~7,300 lines) and clean 8 more test files
  • Update docs (publish guide, CLI reference) and skills (commands.md, package-authoring.md)
  • Add CHANGELOG entries under [Unreleased] > Removed

What stays (NOT removed)

  • apm doctor (top-level) -- still calls run_doctor() from commands/marketplace/doctor.py
  • git_stderr.py -- used by ref_resolver.py and doctor.py
  • All consumer-side commands: add, list, browse, update, remove, validate
  • apm pack, apm marketplace init, check, outdated, migrate, audit, package

Migration

Consumers should run apm install --update on their own cadence instead of relying on publisher-pushed PRs.

Validation

  • uv run --extra dev ruff check src/ tests/ -- clean
  • uv run --extra dev ruff format --check src/ tests/ -- clean
  • pylint R0801 duplication check -- clean (10.00/10)
  • bash scripts/lint-auth-signals.sh -- clean
  • Unit tests: 16,902 passed
  • Integration tests for edited files: 419 passed

Closes #1134

Remove the consumer-repo fan-out workflow (marketplace publish) and
the deprecated marketplace doctor subcommand alias. The publish
surface opened PRs on downstream repos -- a responsibility outside
the scope of a package manager. Consumers should run
`apm install --update` on their own cadence instead.

Deleted:
- src/apm_cli/commands/marketplace/publish.py
- src/apm_cli/marketplace/publisher.py
- src/apm_cli/marketplace/pr_integration.py
- 9 test files (~7300 lines)

Updated:
- commands/marketplace/__init__.py: removed publish helpers/imports
- commands/marketplace/doctor.py: removed Click alias, kept run_doctor
- marketplace/__init__.py: removed publisher/PR integration exports
- git_stderr.py: hint now says 'apm doctor' not 'apm marketplace doctor'
- test_marketplace_doctor.py: invoke via cli instead of marketplace group
- test_doctor.py: removed deprecated alias test
- Docs (publish guide, CLI reference) and skills (commands.md)
- CHANGELOG.md: added Removed entries

Closes #1134

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 13, 2026 14:08

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 removes the deprecated consumer-repo fan-out workflow (apm marketplace publish) and fully drops the legacy apm marketplace doctor alias in favor of the top-level apm doctor, cleaning up the marketplace command surface and deleting the associated library + test scaffolding.

Changes:

  • Deleted the marketplace publish command and its underlying publisher / PR integration libraries, plus related tests.
  • Removed the marketplace doctor Click alias and the publish-specific gh check; kept run_doctor() for apm doctor.
  • Updated docs/skills/changelog to reflect the removed commands (with one remaining doc consistency gap noted in comments).

Reviewed changes

Copilot reviewed 33 out of 33 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/unit/marketplace/test_pr_integration.py Removes unit coverage for the deleted pr_integration module.
tests/unit/marketplace/test_marketplace_commands_surface.py Drops tests that exercised publish-only helpers removed from the marketplace command module.
tests/unit/marketplace/test_marketplace_commands_phase3.py Same as above for the phase3 test suite.
tests/unit/marketplace/test_git_stderr.py Updates hint expectation to reference apm doctor instead of the removed alias.
tests/unit/commands/test_marketplace_publish.py Removes unit tests for the deleted apm marketplace publish command.
tests/unit/commands/test_marketplace_doctor.py Re-targets tests to the top-level apm doctor entry point and removes gh-check expectations.
tests/unit/commands/test_doctor.py Ensures apm marketplace doctor is no longer registered / visible under apm marketplace.
tests/integration/test_wave3_marketplace_coverage.py Removes integration coverage snippets tied to the deleted publisher module.
tests/integration/test_marketplace_phase3w4.py Deletes integration tests for publish-only helpers and publisher types.
tests/integration/test_marketplace_e2e_surface.py Deletes e2e surface tests for publish-only helpers and publisher types.
tests/integration/test_deep_coverage_adapters.py Removes the publisher module from the deep-coverage “miss list” header.
tests/integration/test_commands_mcp_phase3c.py Drops tests for _load_targets_file / _outcome_symbol (publish-only).
tests/integration/test_commands_mcp_flow.py Drops tests for _load_targets_file / _outcome_symbol (publish-only).
tests/integration/marketplace/test_publish_integration.py Removes integration tests for the deleted apm marketplace publish flow.
src/apm_cli/marketplace/yml_schema.py Updates docstring wording from “publisher” to “authoring” config.
src/apm_cli/marketplace/version_check.py Updates docstring to reflect apm doctor as the consumer of version alignment checks.
src/apm_cli/marketplace/validator.py Removes mention of apm marketplace publish from module docs.
src/apm_cli/marketplace/publisher.py Deletes the publisher implementation.
src/apm_cli/marketplace/pr_integration.py Deletes gh PR integration wrapper for publish.
src/apm_cli/marketplace/git_stderr.py Updates AUTH hint to direct users to apm doctor.
src/apm_cli/marketplace/init.py Removes publish-related exports from the marketplace package surface.
src/apm_cli/commands/marketplace/publish.py Deletes the apm marketplace publish command.
src/apm_cli/commands/marketplace/doctor.py Removes legacy alias wiring and publish-only gh check; keeps run_doctor().
src/apm_cli/commands/marketplace/init.py Removes publish/doctor command registration and publish-only helper implementations.
src/apm_cli/commands/doctor.py Updates top-level apm doctor wrapper docstring to reflect current ownership.
packages/apm-guide/.apm/skills/apm-usage/package-authoring.md Removes publish from the referenced marketplace authoring workflow list.
packages/apm-guide/.apm/skills/apm-usage/commands.md Replaces marketplace-subcommand references with the top-level apm doctor.
docs/src/content/docs/reference/cli/marketplace.md Removes the doctor/publish subcommand sections (but still contains stale references elsewhere; see comments).
docs/src/content/docs/producer/publish-to-a-marketplace.md Replaces apm marketplace doctor with apm doctor and removes the fan-out publish section.
CHANGELOG.md Adds [Unreleased] > Removed entries for the removed command surfaces.
Comments suppressed due to low confidence (1)

docs/src/content/docs/reference/cli/marketplace.md:227

  • The apm marketplace doctor / apm marketplace publish sections were removed below, but this page still documents those commands earlier (Synopsis lists both; Description says authors ship updates via apm marketplace publish; and the Examples section still shows apm marketplace publish). That leaves the CLI reference internally inconsistent after the removal.
### `apm marketplace outdated`

Show packages in the authoring config that have newer upstream
versions available.

Comment thread CHANGELOG.md Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Deprecate and remove apm marketplace publish (consumer-repo fan-out)

2 participants