Skip to content

ci(checks): serialize render after lock-update gate#17248

Merged
christopherco merged 2 commits into
microsoft:4.0from
dmcilvaney:damcilva/scoped-gates/serialize-gates
May 16, 2026
Merged

ci(checks): serialize render after lock-update gate#17248
christopherco merged 2 commits into
microsoft:4.0from
dmcilvaney:damcilva/scoped-gates/serialize-gates

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

@dmcilvaney dmcilvaney commented May 15, 2026

NOTE: Requires #17247 and an associated cherry-pick of the stub into the default branch: #17249

Today the 'render' and 'update_locks' jobs run in parallel and each operates on the full distro. That keeps the gate honest but leaves no room to scale render with PR size, because we have no trustworthy 'what did this PR touch' signal: 'azldev component changed' reads input fingerprints that include lock content, so its output is only reliable when locks are known-clean.

Serializing render behind a successful lock check unlocks that optimization. With a green locks gate, the follow-up commit can shrink render to just the PR-touched components and have CI confidence in the result.

The serialization is also defensive in its own right: if locks were stale, a parallel full-distro render would produce output against the wrong upstream pins, and maintainers would chase a phantom drift report that disappears the moment locks are fixed.

Skip the render PR comment when render itself was skipped (no report artifact to post; the locks PR comment already carries the fix).

Also plumb pull_request.base.sha through stub -> reusable workflow as 'pr-base-sha'. No consumer yet -- the follow-up render-scope commit needs the base SHA to compute the diff range. Declared as required now so the stub contract is stable when the consumer lands.

Copilot AI review requested due to automatic review settings May 15, 2026 05:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the rendered-specs CI workflow to run the lock-update gate before the render drift check, so stale locks prevent render from running and producing misleading drift output.

Changes:

  • Adds pr-base-sha plumbing from the stub into the reusable workflow for future scoped-render work.
  • Reorders the reusable workflow so render depends on update_locks.
  • Skips the render comment job when render is skipped due to lock-check failure.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/check-rendered-specs.yml Serializes render after lock checking and updates render comment conditions.
.github/workflows/check-rendered-specs-stub.yml Passes the PR base SHA into the reusable workflow.
Comments suppressed due to low confidence (1)

.github/workflows/check-rendered-specs.yml:245

  • This comment refers to a render-scope helper, but this job currently performs an unscoped full render (azldev component render -a --clean-stale) and never uses pr-base-sha. Keeping this as present-tense behavior will mislead future workflow debugging until the scoped helper is actually wired in.
    # Gate render on a clean lock check. `azldev component changed` (used by
    # the render-scope helper) reads input fingerprints that include lock
    # content, so stale locks would steer it toward the wrong scope. Skip

Comment thread .github/workflows/check-rendered-specs.yml
Comment thread .github/workflows/check-rendered-specs.yml
@dmcilvaney dmcilvaney force-pushed the damcilva/scoped-gates/serialize-gates branch from 0341748 to 9d421bc Compare May 15, 2026 05:55
@dmcilvaney dmcilvaney changed the base branch from tomls/base/main to 4.0 May 15, 2026 21:29
@dmcilvaney dmcilvaney force-pushed the damcilva/scoped-gates/serialize-gates branch from 9d421bc to 373f152 Compare May 15, 2026 21:33
Today the 'render' and 'update_locks' jobs run in parallel and each
operates on the full distro. That keeps the gate honest but leaves no
room to scale render with PR size, because we have no trustworthy
'what did this PR touch' signal: 'azldev component changed' reads
input fingerprints that include lock content, so its output is only
reliable when locks are known-clean.

Serializing render behind a successful lock check unlocks that
optimization. With a green locks gate, the follow-up commit can shrink
render to just the PR-touched components and have CI confidence in the
result.

The serialization is also defensive in its own right: if locks were
stale, a parallel full-distro render would produce output against the
wrong upstream pins, and maintainers would chase a phantom drift
report that disappears the moment locks are fixed.

Skip the render PR comment when render itself was skipped (no report
artifact to post; the locks PR comment already carries the fix).

Also plumb pull_request.base.sha through stub -> reusable workflow as
'pr-base-sha'. No consumer yet -- the follow-up render-scope commit
needs the base SHA to compute the diff range. Declared as required now
so the stub contract is stable when the consumer lands.
@dmcilvaney dmcilvaney force-pushed the damcilva/scoped-gates/serialize-gates branch from 373f152 to 12b786a Compare May 16, 2026 00:10
@christopherco christopherco merged commit b5ced0c into microsoft:4.0 May 16, 2026
8 checks passed
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