Skip to content

Sync eng/common directory with azure-sdk-tools for PR 16660 - #7385

Open
azure-sdk-automation[bot] wants to merge 13 commits into
mainfrom
sync-eng-common-arh/ReleaseScripts-16660
Open

Sync eng/common directory with azure-sdk-tools for PR 16660#7385
azure-sdk-automation[bot] wants to merge 13 commits into
mainfrom
sync-eng-common-arh/ReleaseScripts-16660

Conversation

@azure-sdk-automation

Copy link
Copy Markdown
Contributor

Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#16660 See eng/common workflow

Copilot AI lite review requested due to automatic review settings August 28, 2026 21:59
@azure-sdk-automation
azure-sdk-automation Bot requested a review from a team as a code owner August 28, 2026 21:59
@azure-sdk-automation azure-sdk-automation Bot added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Aug 28, 2026
@azure-pipelines

Copy link
Copy Markdown
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.

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

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-ApiViewRevision assumes PackageInfo.ArtifactName is always populated when checking for an existing review-token file. If a package-info JSON only contains Name (common in some pipelines), this will look for _cpp.json and 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',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants