ci: remove max-parallel: 3 so one approval covers the whole matrix - #1270
Merged
Conversation
LeonardCareer
requested review from
alyssa1303,
liyu-ma,
sumanthreddy29,
vittoriasalim,
wonderyl and
xinWeiWei24
as code owners
July 28, 2026 02:39
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Terraform Integration GitHub Actions workflow to reduce repeated environment approval prompts by allowing the entire terraform-plan matrix to enter the waiting state at once, so a single terraform-privileged approval can cover the full matrix batch.
Changes:
- Remove
strategy.max-parallel: 3from theterraform-planmatrix job so all matrix jobs are created/scheduled simultaneously. - Preserve existing matrix behavior (
fail-fast: false, same matrix source) while changing only the scheduling/approval batching behavior.
Two changes to terraform-integration.yml: 1. Remove max-parallel: 3 from terraform-plan. GitHub creates matrix jobs in waves of max-parallel size, and each wave is its own deployment request, so terraform-privileged approval had to be clicked once per wave (7-8 clicks for ~20 tfvars). Without max-parallel, all matrix jobs pend as one batch and are covered by a single approval. 2. Delete the authorize job. It was a no-op placeholder that only existed to attach environment: terraform-privileged. terraform-test and terraform-plan already carry the same environment (added in #1269), so the approval gate lives on those jobs directly. Same security guarantee, one fewer job in the DAG. Runner concurrency: telescope has no self-hosted runners; workflows run on the Azure org's shared GitHub-hosted Ubuntu pool (Enterprise cap ~500 concurrent). ~20 tfvars is well within budget; excess would just queue behind the approved batch, not fail.
LeonardCareer
force-pushed
the
remove-max-parallel
branch
from
July 28, 2026 02:57
af5a938 to
bfed1c9
Compare
liyu-ma
approved these changes
Jul 28, 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.
Follow-up to #1266 / #1269 / MSRC #127928 — approval-fatigue fix.
Problem
With
max-parallel: 3onterraform-plan, GitHub creates matrix jobs in waves of 3. Each wave is a separateterraform-privilegeddeployment request, so approving the environment covers only the current wave. For ~20 tfvars this means 7-8 approval clicks per push (see retest #1267 run #4).Additionally, the
authorizejob was a no-op placeholder that only existed to attachenvironment: terraform-privileged. After #1269 bothterraform-testandterraform-plancarry that environment themselves, soauthorizeno longer serves a purpose.Fix
Two changes:
Delete
max-parallel: 3. All matrix jobs now pend simultaneously as one batch. GitHub deduplicates approval per batch, so a single click covers the entire matrix.Delete the
authorizejob and theneeds: authorizereferences onterraform-test,setup-matrix, andterraform-plan. The approval gate now lives directly on the jobs that actually use the OIDC token (terraform-test,terraform-plan). Same security guarantee — an environment approval is still required before any privileged step can run — just one fewer job in the DAG.Runner concurrency
telescope has no self-hosted runners; workflows run on the Azure org's shared GitHub-hosted Ubuntu pool. Azure is on GitHub Enterprise Cloud, which caps Ubuntu concurrency at ~500 per org. With ~20 matrix jobs this is well within budget; if org-wide contention ever exhausts the pool, extra jobs simply queue behind the currently-approved batch — they don't fail.
Verification plan
After merge, trigger a Terraform-touching PR and confirm:
terraform-test,setup-matrix,terraform-planmatrix) pend simultaneouslyterraform-privilegedapproves the whole batch/cc @wonderyl @liyu-ma