Skip to content

ci: render specs against the post-merge azldev version#17777

Open
dmcilvaney wants to merge 1 commit into
microsoft:4.0from
dmcilvaney:damcilva/4.0/pipelines/improve_azldev_checks
Open

ci: render specs against the post-merge azldev version#17777
dmcilvaney wants to merge 1 commit into
microsoft:4.0from
dmcilvaney:damcilva/4.0/pipelines/improve_azldev_checks

Conversation

@dmcilvaney

Copy link
Copy Markdown
Contributor

The rendered-specs check built azldev from the PR head's .azldev-version and gated the full re-render on a two-dot base..head diff of .azldev-version. Both are wrong for a branch that is merely behind base on the pin: the head value is stale (not what runs on 4.0 after merge), and the two-dot diff fires a spurious full re-render that can only ever find no drift.

Resolve the version that will actually be in effect on 4.0 after the PR merges: read .azldev-version from GitHub's test-merge commit (merge_commit_sha) via the Contents API -- no merge tree is checked out, only a single regex-validated string crosses to the host. GitHub computes mergeability asynchronously (the event's merge_commit_sha is usually null on a freshly opened PR), so poll the PR endpoint until it is computed and fail closed on a genuinely non-mergeable PR.

A full re-render now runs only when the post-merge version differs from the base branch's current pin -- i.e. when the PR actually changes the azldev binary on 4.0 -- otherwise the normal PR-scoped render runs. Adds pull-requests:read to the build/render jobs for the poll and logs the resolved version + render-all decision.

@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/improve_azldev_checks branch from efeb5dc to 7795f7c Compare June 20, 2026 01:55
@dmcilvaney dmcilvaney marked this pull request as ready for review June 20, 2026 01:55
@dmcilvaney dmcilvaney requested a review from a team as a code owner June 20, 2026 01:55
Copilot AI review requested due to automatic review settings June 20, 2026 01:55

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.

Pull request overview

Updates the rendered-specs drift check workflow to resolve and use the post-merge .azldev-version (from GitHub’s test-merge commit) so PRs are validated against the azldev binary that will actually run on 4.0 after merge, and to avoid unnecessary full renders when a PR is merely behind the base pin.

Changes:

  • Poll PR mergeability to obtain merge_commit_sha, then read .azldev-version from that test-merge commit via the Contents API (no merge tree checkout).
  • Emit the resolved azldev version + a render-all decision as update_locks job outputs and consume them in render.
  • Switch full-render gating from a base..head .azldev-version diff to the computed RENDER_ALL flag.

Comment thread .github/workflows/check-rendered-specs.yml
Comment thread .github/workflows/check-rendered-specs.yml
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/improve_azldev_checks branch from 7795f7c to f3727c4 Compare June 20, 2026 02:01
@dmcilvaney dmcilvaney requested a review from Copilot June 20, 2026 02:03

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.

Pull request overview

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

Comment thread .github/workflows/check-rendered-specs.yml
Comment thread .github/workflows/check-rendered-specs.yml
@dmcilvaney dmcilvaney marked this pull request as draft June 20, 2026 02:07
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/improve_azldev_checks branch 2 times, most recently from bada665 to 019e7e0 Compare June 23, 2026 22:01
Copilot AI review requested due to automatic review settings June 23, 2026 22:01

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/check-rendered-specs.yml Outdated
Copilot AI review requested due to automatic review settings June 23, 2026 22:25
The rendered-specs check built azldev from the PR head's .azldev-version and gated the full re-render on a two-dot `base..head` diff of .azldev-version. Both are wrong for a branch merely behind base on the pin: the head value is stale (not what runs on 4.0 after merge), and the two-dot diff fires a spurious full re-render that can only ever find no drift.

Resolve the version that will actually be in effect on 4.0 after the PR merges: read .azldev-version from GitHub's test-merge commit via the Contents API -- no merge tree is checked out, only a single regex-validated string crosses to the host. GitHub computes mergeability asynchronously and the event's merge_commit_sha can be empty or stale, so poll the PR endpoint for the authoritative value and fail closed on a genuinely non-mergeable PR.

Resolve once in update_locks (which polls mergeability, hence pull-requests:read) and expose azldev-version + render-all as job outputs that the render job consumes, so both jobs check drift against the same binary. A full re-render runs only when that post-merge version differs from the base pin -- i.e. the PR changes the azldev binary on 4.0 -- otherwise the normal PR-scoped render runs.
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/improve_azldev_checks branch from e97823d to 95c938d Compare June 23, 2026 22:25
@dmcilvaney dmcilvaney marked this pull request as ready for review June 23, 2026 22:26

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

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.

2 participants