Skip to content

chore(ci): simplify ADO npm publish pipeline - #9743

Closed
Krrish Mittal (takyyon) wants to merge 2 commits into
hotfix/v1.23123from
takyyon-simplify-ado-npm-publish
Closed

Krrish Mittal (takyyon) wants to merge 2 commits into
hotfix/v1.23123from
takyyon-simplify-ado-npm-publish

Conversation

@takyyon

@takyyon Krrish Mittal (takyyon) commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: cfc48e9f53d5a9950de4deb02c12c3d804ed5983

Dimension Assessment Rationale
Change confidence 9/10 ↑ E2E ADO run 193120731 built and published all 9 packages for 5.1025.0 with Component Governance passing.
↑ Local Biome check, 10/10 unit tests (node --test scripts/ado-npm-publisher.test.cjs), and YAML parsing all passed after restoring the main/hotfix/v* branch gate.
↓ GitHub Actions PR CI checks and code review are still pending at PR creation.

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

Simplifies the Azure Pipelines npm release publisher (.azure-pipelines/npm-publish.yml and scripts/ado-npm-publisher.cjs) to match the straightforward flow in .github/workflows/version-release.yml and remove unnecessary verification layers that caused failures due to Azure Artifacts eventual-consistency lag on post-publish readbacks.

Summary of Changes

  • .azure-pipelines/npm-publish.yml: Collapsed from multiple verification stages/jobs and inline Python scripts into a single Publish stage and BuildAndPublish job.
    • Preserves the 1ES Official template (v1/1ES.Official.PipelineTemplate.yml@1esPipelines at refs/tags/release), Azure-Pipelines-1ESPT-ExDShared pool, and sdl.componentgovernance.useAgentBuildDirectory: true.
    • Gates the Publish stage to refs/heads/main and refs/heads/hotfix/v* via and(succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/v'))).
    • Preserves WIF authentication via npmAuthenticate@0 (workloadIdentityServiceConnection: 21d5a1d8-11d3-425c-8d3a-e7f088725481, feedUrl: 'https://pkgs.dev.azure.com/msazure/One/_packaging/microsoft-logic-apps/npm/registry/').
  • scripts/ado-npm-publisher.cjs: Consolidated into a single self-contained script with build and publish commands:
    • Resolves refs/tags/v<releaseVersion> locally and checks it out into a clean detached worktree (retained under Agent.BuildDirectory for Component Governance).
    • Bootstraps pnpm from the 1ES npm mirror using the version declared in package.json (packageManager) to work under 1ES Linux network isolation.
    • Runs pnpm install --recursive --frozen-lockfile --strict-peer-dependencies, node scripts/update-versions.js <releaseVersion>, pnpm run build:lib, and packs all 9 publishable workspace packages so workspace:* references resolve cleanly.
    • For each package, checks if <name>@<releaseVersion> already exists in the feed (npm view) and skips it if present; otherwise runs npm publish <tarball> --tag latest with visible stdout/stderr and no post-publish readback or latest > target blocks.
  • Removed obsolete files:
    • .azure-pipelines/npm-verify-release.steps.yml
    • scripts/ado-npm-publisher-artifact.cjs
    • scripts/ado-npm-publisher-lib.cjs
    • scripts/ado-npm-publisher-test-feed.cjs
  • scripts/ado-npm-publisher.test.cjs: Replaced the legacy verification test suite with focused unit tests for the simplified build/publish flow and pipeline YAML invariants.

Impact of Change

  • Users: No runtime or product UI changes.
  • Developers: Release engineers running the manual ADO npm publish pipeline get a simpler single-stage workflow with direct npm publish output and idempotent skipping of already-published versions.
  • System: Changes the production npm publishing workflow and removes redundant artifact upload/download, SHA-256 manifest verification, and post-publish registry readback polling. Production package publishing now relies on pre-publish existence checks (npm view) and direct npm publish exit status without post-publish readback, matching .github/workflows/version-release.yml (which remains untouched).

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: Local Node 22 / Biome + Hosted 1ES ADO Pipeline 489908

Validation Results

  • npx biome check scripts/ado-npm-publisher.cjs scripts/ado-npm-publisher.test.cjs — passed (0 errors)
  • node --test scripts/ado-npm-publisher.test.cjs — passed (10/10 tests)
  • ruby -ryaml -e "YAML.load_file('.azure-pipelines/npm-publish.yml')" — passed (YAML OK)
  • Manual Hosted ADO Validation Run: Build 193120731 — succeeded; built from v5.1025.0, published all 9 packages for 5.1025.0 to the Azure Artifacts npm feed, and passed Component Governance.

Contributors

Krrish Mittal (@takyyon)

Screenshots/Videos

N/A (CI pipeline and release script only)

Collapse .azure-pipelines/npm-publish.yml to a single Publish stage and
simplify scripts/ado-npm-publisher.cjs to build from the release tag,
skip packages already in the feed, and run npm publish without extra
verification or post-publish readbacks. Temporarily omit the
Build.SourceBranch filter on this test branch for E2E validation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…peline

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

✅ PR Title

  • Current: chore(ci): simplify ADO npm publish pipeline
  • Issue: The title is specific, accurately identifies the maintenance/tooling nature of the change, and describes the affected pipeline.
  • Recommendation: No change required.

✅ Commit Type

  • Properly selected (chore - Maintenance/tooling).
  • Only one commit type is selected, which is appropriate for this pipeline and release-script maintenance.

✅ Risk Level

  • The selected High risk level is appropriate. The diff changes the production Azure DevOps npm publishing workflow, authentication flow, package publication behavior, and removes post-publish verification and reconciliation logic.
  • The risk:high label is present and matches the risk level selected in the PR body. The advised risk is the same as submitted, not higher or lower.

✅ What & Why

  • Current: The PR explains that the ADO npm release publisher and script are being simplified, identifies the affected files, and explains that the change removes verification layers affected by Azure Artifacts eventual-consistency delays.
  • Issue: No required information is missing. The additional summary gives useful context for the substantial pipeline changes.
  • Recommendation: No change required. Keep the explanation focused on the publishing-flow changes and their motivation.

✅ Impact of Change

  • The impact section addresses users, developers, and the system. It correctly distinguishes the lack of runtime/UI changes from the significant impact to the production npm publishing workflow.
  • Recommendation:
    • Users: The statement that there are no direct runtime or product UI changes is appropriate.
    • Developers: The impact on release engineers and the simplified single-stage publishing workflow is clearly described.
    • System: The removal of artifact verification, registry readback, and reconciliation is explicitly documented. This is important for reviewers because it explains why the change is high risk.

✅ Test Plan

  • Unit tests are marked as added/updated, and the diff includes substantial updates to scripts/ado-npm-publisher.test.cjs covering version parsing, tag resolution, pnpm bootstrapping, build/pack behavior, feed checks, publishing, and pipeline invariants.
  • Manual testing is also marked and includes concrete local validation commands and a successful hosted Azure DevOps validation run.
  • The test plan passes because unit tests are present in the diff; E2E tests are not required when unit tests adequately cover the change.

✅ Contributors

  • @takyyon is listed as a contributor.
  • No action is required. Consider crediting PMs, designers, or reviewers if they contributed, but this is optional.

✅ Screenshots/Videos

  • The PR correctly states N/A because this is a CI pipeline and release-script change with no visual product changes.

Summary Table

Section Status Recommendation
Title ✅ No change required
Commit Type ✅ Keep chore selected only
Risk Level ✅ Keep High risk and the matching risk:high label
What & Why ✅ No change required
Impact of Change ✅ No change required
Test Plan ✅ Unit-test and manual validation evidence is present
Contributors ✅ Optional: add other contributors if applicable
Screenshots/Videos ✅ N/A is appropriate

PR title and body review passed. The submitted High risk level is appropriate and matches the risk:high label.


Powered by: Logic App (fallback) | Last updated: Wed, 25 Nov 2026 03:37:46 GMT

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Check

No source files changed in this PR.

@takyyon Krrish Mittal (takyyon) added the risk:high High risk change requiring careful review label Nov 25, 2026
@takyyon

Copy link
Copy Markdown
Collaborator Author

Closing in favor of #9744 targeting main.

@takyyon
Krrish Mittal (takyyon) deleted the takyyon-simplify-ado-npm-publish branch November 25, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:high High risk change requiring careful review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant