Repository navigation
[CI] Remove management plan workarounds - #49659
Open
Travis Prescott (tjprescott) wants to merge 2 commits into
Open
Travis Prescott (tjprescott) wants to merge 2 commits into
Travis Prescott (tjprescott) wants to merge 2 commits into
Conversation
Travis Prescott (tjprescott)
requested review from
a team,
jenny (JennyPng),
Daniel Jurek (danieljurek) and
Libba Lawrence (l0lawrence)
as code owners
October 22, 2026 17:29
|
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. |
Contributor
There was a problem hiding this comment.
🟡 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 |
| 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(): |
There was a problem hiding this comment.
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
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.

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-keyvaultlibrary 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