Sync eng/common directory with azure-sdk-tools for PR 16660 - #7385
Open
azure-sdk-automation[bot] wants to merge 13 commits into
Open
Sync eng/common directory with azure-sdk-tools for PR 16660#7385azure-sdk-automation[bot] wants to merge 13 commits into
azure-sdk-automation[bot] wants to merge 13 commits into
Conversation
…'t ready for release.
|
Azure Pipelines: Successfully started running 2 pipeline(s). 8 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Syncs eng/common with azure-sdk-tools PR 16660 by introducing new API review–related pipeline templates plus supporting PowerShell scripts (and tests) that integrate with the azsdk CLI and APIView.
Changes:
- Add
azsdk-based scripts to check package approval status and to mark packages released, with Pester coverage. - Add a script + pipeline step template to create APIView revisions (upload artifacts or create from review-token files).
- Add shared command-invocation helpers (
Invoke-AzSdkCliCommand, version gating, argument formatting) and a break-glass variable template for skip authorization.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/common/scripts/tests/Mark-PackageReleased.Tests.ps1 | Adds Pester tests for Mark-PackageReleased.ps1 azsdk argument construction + error handling. |
| eng/common/scripts/tests/Get-PackageApprovalStatus.Tests.ps1 | Adds Pester tests for Get-PackageApprovalStatus.ps1 success/failure paths and logging. |
| eng/common/scripts/tests/Create-APIViewRevision.Tests.ps1 | Adds Pester tests for APIView upload vs token-based revision creation. |
| eng/common/scripts/Mark-PackageReleased.ps1 | New script to call azsdk package mark-released and surface backend results. |
| eng/common/scripts/Helpers/CommandInvocation-Helpers.ps1 | Adds reusable helpers to invoke azsdk, format args, and enforce a minimum CLI version. |
| eng/common/scripts/Get-PackageApprovalStatus.ps1 | New script to call azsdk package get-approval-status and enforce approval gating. |
| eng/common/scripts/Create-APIViewRevision.ps1 | New script to upload artifacts to APIView or create revisions from review tokens. |
| eng/common/pipelines/templates/variables/api-review-break-glass.yml | Adds a break-glass authorization variable based on requester email. |
| eng/common/pipelines/templates/steps/mark-package-released.yml | Adds pipeline step template to run Mark-PackageReleased.ps1. |
| eng/common/pipelines/templates/steps/get-package-approval-status.yml | Adds pipeline step template to run Get-PackageApprovalStatus.ps1. |
| eng/common/pipelines/templates/steps/create-apiview-revision.yml | Adds pipeline step template to run Create-APIViewRevision.ps1. |
Suppressed comments (1)
eng/common/scripts/Create-APIViewRevision.ps1:170
Submit-ApiViewRevisionassumesPackageInfo.ArtifactNameis always populated when checking for an existing review-token file. If a package-info JSON only containsName(common in some pipelines), this will look for_cpp.jsonand fail token creation unnecessarily.
function Submit-ApiViewRevision([object] $PackageInfo, [string] $PackagePath) {
$apiLabel = "Source Branch:$SourceBranch"
$reviewTokenFileName = Get-ApiReviewTokenFileName $PackageInfo.ArtifactName
if ($reviewTokenFileName) {
Invoke-ApiViewTokenCreation $PackageInfo $apiLabel $reviewTokenFileName $PackagePath
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+154
to
+164
| function Get-ApiReviewTokenFileName([string] $ArtifactName) { | ||
| $reviewTokenFileName = "${ArtifactName}_${LanguageShort}.json" | ||
| $tokenFilePath = Join-Path $ArtifactPath $ArtifactName $reviewTokenFileName | ||
| if (Test-Path $tokenFilePath) { | ||
| Write-Host "Review token file is present at $tokenFilePath" | ||
| return $reviewTokenFileName | ||
| } | ||
|
|
||
| Write-Host "Review token file is not present at $tokenFilePath" | ||
| return $null | ||
| } |
| $hashDescription = if ([string]::IsNullOrWhiteSpace($ApiHash)) { "not provided" } else { $ApiHash } | ||
| Write-Host "Marking package released: language=$LanguageShort, package=$PackageName, version=$PackageVersion, apiHash=$hashDescription" | ||
| $formattedArguments = @($arguments | ForEach-Object { Format-CommandArgument $_ }) | ||
| Write-Host "Command: azsdk $($formattedArguments -join ' ')" |
| $hashDescription = if ([string]::IsNullOrWhiteSpace($ApiHash)) { "not provided" } else { $ApiHash } | ||
| Write-Host "Checking package approval: language=$LanguageShort, package=$PackageName, version=$PackageVersion, apiHash=$hashDescription" | ||
| $formattedArguments = @($arguments | ForEach-Object { Format-CommandArgument $_ }) | ||
| Write-Host "Command: azsdk $($formattedArguments -join ' ')" |
Comment on lines
+2
to
+6
| IsRequesterAuthorizedToSkipApiReview: >- | ||
| $[in( | ||
| lower(variables['Build.RequestedForEmail']), | ||
| 'bebroder@microsoft.com', | ||
| 'mharder@microsoft.com', |
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.
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#16660 See eng/common workflow