Require exactly one npm ESRP owner in release pipeline (release/13.4)#18219
Open
adamint wants to merge 1 commit into
Open
Require exactly one npm ESRP owner in release pipeline (release/13.4)#18219adamint wants to merge 1 commit into
adamint wants to merge 1 commit into
Conversation
The npm ESRP publish validation previously allowed multiple owner aliases as long as at least one was a required release owner. Restrict owners to a single alias (matching the existing single-approver rule) so ownership of the @microsoft/aspire-cli package maps to one accountable alias. - Add Assert-SingleNpmReleaseAlias for owners before the required-owner check, mirrored in both validate-npm-release-aliases.ps1 and the inline helpers in release-publish-nuget.yml. - Change NpmPublishOwners default from 'joperezr,ankj' to 'joperezr' (the old multi-owner default would now fail validation) and update the param displayName/spec doc to describe the single-owner rule. - Update Infrastructure.Tests to cover multi-owner rejection and the new default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18219Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18219" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enforces that the NpmPublishOwners pipeline parameter must resolve to exactly one alias (previously multiple were allowed), ensuring single-accountable ownership for the @microsoft/aspire-cli npm package in the ESRP release flow. This mirrors the same change already made against main in PR #18218 but targets the release/13.4 branch.
Changes:
- Added
Assert-SingleNpmReleaseAliascall for owners in both the validation script and the mirrored inline pipeline YAML, changing the validation order to reject multiple owners before checking the required-owner set. - Updated the
NpmPublishOwnersparameter default from'joperezr,ankj'to'joperezr'and changed display names/docs from plural "owners" to singular "owner". - Added/updated tests to cover the new single-owner enforcement and adjusted the dedup test to use multiple spellings of one alias.
Show a summary per file
| File | Description |
|---|---|
| eng/scripts/validate-npm-release-aliases.ps1 | Added single-owner assertion call and updated doc comments to reflect singular owner semantics |
| eng/pipelines/release-publish-nuget.yml | Changed parameter default/displayName to singular, added mirrored single-owner assertion in inline script |
| docs/specs/npm-cli-package.md | Updated spec paragraph to describe single-owner requirement instead of multi-owner |
| tests/Infrastructure.Tests/PowerShellScripts/ValidateNpmReleaseAliasesTests.cs | Added FailsWhenOwnersHasMultipleAliases test, updated dedup test for single-owner scenario |
| tests/Infrastructure.Tests/Pipelines/ReleasePublishNugetPipelineTests.cs | Updated assertions for new displayName, default value, and single-owner assertion presence |
| tests/Infrastructure.Tests/Pipelines/NpmCliPackageTests.cs | Updated default value assertion from multi-owner to single-owner |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 0
Contributor
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
mitchdenny
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The npm ESRP publishing step in the release pipeline previously accepted multiple owner aliases as long as at least one matched a configured required owner. This left ownership of the
@microsoft/aspire-clipackage ambiguous when several aliases were supplied. This change requires the owner to be a single alias, matching the rule that already applied to the approver, so package ownership maps to one accountable alias.Operator-facing behavior:
NpmPublishOwnerspipeline parameter must now resolve to exactly one alias (after normalization), and that alias must still be one of the required ESRP owners (joperezrorankj).NpmPublishOwners must contain exactly one Microsoft alias or @microsoft.com email address.joperezr,ankjtojoperezr, because the old two-owner default would now fail the single-owner check. TheNPM_PUBLISH_REQUIRED_OWNERSset staysjoperezr,ankj— it is the set of allowed owners, and the single configured owner must be one of them.displayName, the script doc comments, anddocs/specs/npm-cli-package.mdwere updated from plural "owners" to singular "owner".Implementation details:
Assert-SingleNpmReleaseAlias $normalizedOwners 'NpmPublishOwners'in the owners validation path, before the required-owner check. This is mirrored in botheng/scripts/validate-npm-release-aliases.ps1and the inline helper region ineng/pipelines/release-publish-nuget.yml(the release job runs withcheckout: none, so the helpers are duplicated and kept in sync byReleasePublishNugetPipelineTests.NpmAliasValidationHelpersMatchScript).Validation
FailsWhenOwnersHasMultipleAliasesand updated the dedup test to feed duplicate spellings of a single owner.Infrastructure.Testspass locally (59/59), including the helper-sync test.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?