ci(scripts): add compute_change_set.sh; CT pipeline adopts it#17247
Merged
christopherco merged 1 commit intoMay 15, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR centralizes PR-scoped component change-set computation for the Control Tower ADO pipeline by adding a shared component helper and replacing the deleted Control Tower-specific render helper.
Changes:
- Adds
compute_change_set.shto produce changed-components, specs-diff, and render-set outputs. - Updates the Control Tower ADO stages to call the shared helper and render-check from
render-set.txt. - Documents the shared helper directory and updates ADO pipeline authoring guidance.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/scripts/control-tower/render_and_verify.sh |
Removes the old Control Tower-specific render/change-set helper. |
.github/workflows/scripts/components/README.md |
Documents shared component helper scripts and their intended callers. |
.github/workflows/scripts/components/compute_change_set.sh |
Adds shared change-set orchestration for changed components and rendered spec diffs. |
.github/workflows/ado/templates/sources-upload-stages.yml |
Wires the Control Tower pipeline to compute a change set and render-check from the generated render set. |
.github/workflows/ado/sources-upload.yml |
Updates comments describing helper script locations. |
.github/instructions/ado-pipeline.instructions.md |
Extends helper-script layout guidance to cover shared component helpers. |
Comments suppressed due to low confidence (1)
.github/workflows/scripts/components/compute_change_set.sh:35
- The script only checks that the commit arguments are non-empty before passing them to
azldev/git diff. The ADO pipeline security guidance requires strict regex validation of PR-supplied commit SHAs before using them in shell commands, so validatesource_commitandtarget_commitas expected SHA values here rather than relying on each caller.
[[ -z "${output_dir:-}" || -z "${source_commit:-}" || -z "${target_commit:-}" ]] && usage
Introduces .github/workflows/scripts/components/compute_change_set.sh, which wraps the three-step compute used by every PR-scoped gate: 1. azldev component changed --from <base> --to <head> 2. git diff --name-only -- <renderedSpecsDir> 3. compute_render_set.py over both, drop deleted components into a single script that writes 'changed-components.json', 'specs-diff.txt', and 'render-set.txt' to a caller-chosen output directory. All azldev invocations use an inline AZLDEV_ALLOW_ROOT=1 prefix per .github/instructions/ado-pipeline.instructions.md. CT's render_and_verify.sh used to do the same thing with a slightly different argument shape, so it is deleted and the CT pipeline's 'Compute changed components' + 'Verify rendered specs' steps are restructured to call compute_change_set.sh + an inline 'xargs azldev component render --check-only --' over the resulting render-set.txt. xargs gets '-x' to fail loudly if a multi-batch invocation would silently hide drift in batches past the first. Also tightens the CT render-check step to fail loud when the renderSetFile is unset/missing (distinguishing a 'Prepare change set' crash from a legitimately empty change set), so a job-level continueOnError cannot mask an upstream supply-chain tripwire. The GH render gate adopts this helper in a follow-up commit. Adds a README.md to scripts/components/ documenting the shared-library status and the inline AZLDEV_ALLOW_ROOT=1 convention.
542950d to
6f17dfa
Compare
christopherco
approved these changes
May 15, 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.
Introduces .github/workflows/scripts/components/compute_change_set.sh, which wraps the three-step compute used by every PR-scoped gate:
into a single script that writes 'changed-components.json', 'specs-diff.txt', and 'render-set.txt' to a caller-chosen output directory. All azldev invocations use an inline AZLDEV_ALLOW_ROOT=1 prefix per .github/instructions/ado-pipeline.instructions.md.
CT's render_and_verify.sh used to do the same thing with a slightly different argument shape, so it is deleted and the CT pipeline's 'Compute changed components' + 'Verify rendered specs' steps are restructured to call compute_change_set.sh + an inline 'xargs azldev component render --check-only --' over the resulting render-set.txt. xargs gets '-x' to fail loudly if a multi-batch invocation would silently hide drift in batches past the first.
Also tightens the CT render-check step to fail loud when the renderSetFile is unset/missing (distinguishing a 'Prepare change set' crash from a legitimately empty change set), so a job-level continueOnError cannot mask an upstream supply-chain tripwire.
The GH render gate adopts this helper in a follow-up commit.
Adds a README.md to scripts/components/ documenting the shared-library status and the inline AZLDEV_ALLOW_ROOT=1 convention.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
What does the PR accomplish, why was it needed?
Change Log
Does this affect the toolchain?
YES/NO
Associated issues
Links to CVEs
Test Methodology