Skip to content

[CI] Remove management plan workarounds - #49659

Open
Travis Prescott (tjprescott) wants to merge 2 commits into
mainfrom
arh/ReleasePipelines
Open

Travis Prescott (tjprescott) wants to merge 2 commits into
mainfrom
arh/ReleasePipelines

Conversation

@tjprescott

@tjprescott Travis Prescott (tjprescott) commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Now that ARH is unblocked and mgmt vs. data plane is covered by ARH's release policy, this PR streamlines the Python CI by removing workarounds specific to management plane.

Since the pipepline still avoids generating APIView tokenfiles for management (preserved) and requires those files to generate api.md and thus apiHash, this PR simply passes "dummy" as the hash, which allows ARH to consult it's release policy and determine that mgmt packages do not require review.

If in the future we change the way api.md is generated for Python or decide to generate APIView token files, we could update this.

Here's the pipeline showing that this works, using keyvault as an example. The azure-mgmt-keyvault library is marked approved because a review is not required.
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6990084&view=logs&j=d6f1acbb-226c-50d6-30b3-c4fb734e1f95&t=330c4823-4120-5766-6b35-8be9ddd756cd

Copilot AI balanced review requested due to automatic review settings October 22, 2026 17:29
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 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.

🟡 Changes recommended

Removing the selection guards causes approval failures for targeted builds and runs with no configured artifacts.

2 open issues
What changed in this PR

This PR moves management-plane package approval decisions to API Review Hub’s release policy, removing Python-specific filtering while preserving the existing token-generation behavior.

Changes:

  • Remove the management-package filtering script and intermediate pipeline job.
  • Pass configured artifacts directly to the approval check.
  • Send "dummy" for missing API hashes and add tests for that behavior.
File Description
eng/​scripts/​Filter-PackageInfoForPackageApproval.ps1 Deletes the package-selection helper.
eng/​pipelines/​templates/​stages/​archetype-sdk-client.yml Consolidates approval checking into one job.
eng/​common/​scripts/​tests/​Get-PackageApprovalStatus.Tests.ps1 Tests dummy hashes and management-package approval responses.
eng/​common/​scripts/​Get-PackageApprovalStatus.ps1 Supplies a dummy hash when metadata lacks one.

Review effort: Balanced

- ${{ if and(eq(variables['System.TeamProject'], 'internal'), or(in(variables['Build.Reason'], 'Manual', ''), and(eq(variables['Build.Reason'], 'IndividualCI'), eq(variables['Build.SourceBranch'], 'refs/heads/main')))) }}:
- job: FilterPackageInfo
displayName: Filter PackageInfo files for package approval
- job: CheckPackageApproval
Comment on lines +203 to +204
- ${{ each artifact in parameters.Artifacts }}:
- packages_extended/PackageInfo/${{ artifact.name }}.json
Copilot AI balanced review requested due to automatic review settings October 22, 2026 18:46

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.

🔵 Needs a closer look

Runtime-targeted builds can pass nonexistent PackageInfo paths to the approval check, causing otherwise valid builds to fail.

2 open issues

Review effort: Balanced

raise ValueError(f"apiHash was not found in {metadata_path}")
else:
api_hash = package_info.get("ApiHash")
if not isinstance(api_hash, str) or not api_hash.strip():

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so any package without api metadata will get a dummy hash? Does that mean data plane sdks could accidentally get an "approved"?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants