Skip to content

feat(ng-dev/release): create recover-ci-publish CLI command#3794

Open
josephperrott wants to merge 1 commit into
angular:mainfrom
josephperrott:recovery-cli-command-v2
Open

feat(ng-dev/release): create recover-ci-publish CLI command#3794
josephperrott wants to merge 1 commit into
angular:mainfrom
josephperrott:recovery-cli-command-v2

Conversation

@josephperrott

Copy link
Copy Markdown
Member

Registers the new command `recover-ci-publish` in `ng-dev/release/cli.ts` and implements it.
The command allows release managers to download build artifacts (`.tgz` packages) from a failed GitHub Actions run and publish them locally (break-glass recovery) using their local Wombat token session.

NOTE: This PR builds on top of changes in PR #3793 (which implements resilient and idempotent package publishing).

@angular-robot angular-robot Bot added the detected: feature PR contains a feature commit label Jun 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new recover-ci-publish CLI command and tool to recover failed CI release publish runs locally by downloading built artifacts from GitHub Actions and publishing them. The feedback highlights a potential compilation and runtime issue because PublishCiTool does not yet support the useLocalNpmConfig and skipTagging options. Additionally, it is recommended to handle potential errors when spawning the native unzip utility, rename the --publishRegistry CLI option to --publish-registry for kebab-case consistency, and clean up unused variables and mocks in the test suite.

Comment thread ng-dev/release/recover-ci-publish/recover-ci-publish.ts
Comment thread ng-dev/release/recover-ci-publish/recover-ci-publish.ts Outdated
Comment thread ng-dev/release/recover-ci-publish/cli.ts Outdated
Comment thread ng-dev/release/recover-ci-publish/test/recover-ci-publish.spec.ts Outdated
Comment thread ng-dev/release/recover-ci-publish/test/recover-ci-publish.spec.ts Outdated
@josephperrott josephperrott force-pushed the recovery-cli-command-v2 branch from 34ded43 to 5ecefde Compare June 17, 2026 17:01
@josephperrott josephperrott changed the title feat(release): create recover-ci-publish CLI command feat(ng-dev/release): create recover-ci-publish CLI command Jun 17, 2026
josephperrott added a commit to josephperrott/dev-infra that referenced this pull request Jun 17, 2026
@josephperrott

Copy link
Copy Markdown
Member Author

JOEYBOT: I have addressed the feedback:

  1. Unzip error handling: Wrapped the ChildProcess.spawn('unzip') call in a try-catch block and handled ENOENT explicitly to throw a helpful error message if the unzip utility is missing in the PATH.
  2. Option naming: Renamed the CLI option from publishRegistry to publish-registry for kebab-case consistency.
  3. Test cleanup: Cleaned up the unused fetchSpy spy variable declaration and assignment in recover-ci-publish.spec.ts.

Regarding the compilation error for useLocalNpmConfig and skipTagging: as discussed, this is because PR #3794 is based on main and depends on API changes in PR #3793. Once PR #3793 is merged into main, we will rebase this branch onto main to resolve the build errors and make the GHA checks pass.

Please let me know if you have any other comments!

Comment thread ng-dev/release/recover-ci-publish/test/recover-ci-publish.spec.ts Outdated
Comment thread ng-dev/release/recover-ci-publish/recover-ci-publish.ts Outdated
josephperrott added a commit to josephperrott/dev-infra that referenced this pull request Jun 18, 2026
@josephperrott josephperrott force-pushed the recovery-cli-command-v2 branch from cec5407 to 840779b Compare June 18, 2026 14:52
- Registered the new command `recover-ci-publish` in `ng-dev/release/cli.ts` and updated `ng-dev/release/BUILD.bazel` to depend on it.
- Created `ReleaseRecoverCiPublishTool` to download packages zip from GHA run, unzip it, and invoke `PublishCiTool` with local config enabled.
- Created yargs module `cli.ts` to configure positional run-id, dry-run, and registry options.
- Extended visibility in `github-actions/release/publish/BUILD.bazel` to allow `ng-dev/release/recover-ci-publish` to import `PublishCiTool`.
- Created comprehensive unit tests in `recover-ci-publish.spec.ts`.
@josephperrott josephperrott force-pushed the recovery-cli-command-v2 branch from 52fd614 to b69ff40 Compare June 18, 2026 15:02
@josephperrott josephperrott added the action: merge The PR is ready for merge by the caretaker label Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants