Skip to content

ci: queue a scratch build using CT for PRs that change packages.#17778

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

ci: queue a scratch build using CT for PRs that change packages.#17778
dmcilvaney wants to merge 1 commit into
microsoft:4.0from
dmcilvaney:damcilva/4.0/pipelines/pr_build_check_ado

Conversation

@dmcilvaney

@dmcilvaney dmcilvaney commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Add a stopgap scratch build as a PR gate until CT's complete endpoint is ready for this work.

Copilot AI review requested due to automatic review settings June 20, 2026 02:27

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

This PR adds a temporary/stopgap ADO pipeline that builds the components a pull request changes, run as a PR check. It exists because Control Tower cannot yet trigger builds from PRs, and GitHub-hosted PR check runners time out before slow packages (>5h) finish — running azldev component build in an ADO/OneBranch job lifts that ceiling.

The pipeline follows the repo's wrapper + raw-stages split: the wrapper owns the OneBranch wiring (NonOfficial variant, since it touches no production resources), and the raw stages template resolves the PR commit range from the merge commit's parents (HEAD^1/HEAD^2), computes the changed-component set with the shared compute_change_set.sh, and builds those components inside the azldev-runner container (mock hangs when run directly on the OneBranch host). The Dockerfile change forwards the host's internal Go proxy into the image build via a new GOPROXY build-arg.

Changes:

  • New wrapper pipeline pr-package-build.yml (OneBranch NonOfficial, 12h timeout, no service connection/variable group).
  • New raw stages template pr-package-build-stages.yml (git unshallow + config normalization, host azldev install, container build, PR-range resolution with SHA validation, change-set compute, containerized build with mock sandbox flags, failure-only log dump).
  • azldev-runner.Dockerfile: add optional ARG GOPROXY so callers behind an internal-only proxy can forward it to go install (empty/omitted = Go's built-in default; backward-compatible for the GitHub gates).

Reviewed changes

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

File Description
.github/workflows/ado/pr-package-build.yml New OneBranch wrapper entrypoint for the PR package-build check.
.github/workflows/ado/templates/pr-package-build-stages.yml New OneBranch-agnostic stages template doing PR-range detection, change-set compute, and containerized build.
.github/workflows/containers/azldev-runner.Dockerfile Adds an optional GOPROXY build-arg forwarded to go install.

Notable review notes (see inline comments): two steps interpolate custom pipeline variables ($(sourceCommit), $(targetCommit), $(renderSetFile)) directly in the script body instead of binding them through the step env: block as the sibling pipelines do; the failure-only log-dump step can itself fail if the logs directory is absent; and the wrapper's "directly on the agent" wording doesn't match the containerized build design.

Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml
Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml Outdated
Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml Outdated
Comment thread .github/workflows/ado/pr-package-build.yml Outdated
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/pr_build_check_ado branch from b3ebb6e to 88bc8d0 Compare June 23, 2026 01:30
@dmcilvaney dmcilvaney marked this pull request as ready for review June 23, 2026 16:35
Copilot AI review requested due to automatic review settings June 23, 2026 16:35
@dmcilvaney dmcilvaney requested a review from a team as a code owner June 23, 2026 16:35

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 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml Outdated
Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml
Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml Outdated
Copilot AI review requested due to automatic review settings June 23, 2026 17:02
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/pr_build_check_ado branch from 12fd072 to f6a5159 Compare June 23, 2026 17: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 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/containers/azldev-runner.Dockerfile Outdated
Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml Outdated
@dmcilvaney dmcilvaney marked this pull request as draft June 23, 2026 18:17
@dmcilvaney dmcilvaney changed the title ci: queue a package build using azldev in ADO as a PR check ci: queue a scratch build using CT for PRs that change packages. Jun 23, 2026
@dmcilvaney dmcilvaney marked this pull request as ready for review June 23, 2026 22:05
Copilot AI review requested due to automatic review settings June 23, 2026 22:05
Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml Outdated
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/pr_build_check_ado branch 3 times, most recently from 345efc5 to 16c15f5 Compare June 23, 2026 22:13

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 7 out of 7 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/containers/azldev-runner.Dockerfile Outdated
Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml Outdated
Comment thread .github/workflows/ado/pr-package-build.yml Outdated
Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml Outdated

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 7 out of 7 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/ado/templates/pr-package-build-stages.yml Outdated
Comment thread .github/workflows/containers/azldev-runner.Dockerfile Outdated
Comment thread scripts/ci/control-tower/client.py Outdated
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/pr_build_check_ado branch from 16c15f5 to cd9a731 Compare June 24, 2026 00:29
Copilot AI review requested due to automatic review settings June 24, 2026 00:40
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/pr_build_check_ado branch from cd9a731 to 5f62ca7 Compare June 24, 2026 00:40
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/pr_build_check_ado branch from 5f62ca7 to 6011d04 Compare June 24, 2026 00:42

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 7 out of 7 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings June 24, 2026 01:05
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/pr_build_check_ado branch from 6011d04 to 4a5542d Compare June 24, 2026 01:05

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 7 out of 7 changed files in this pull request and generated 1 comment.

Comment on lines 68 to +78
for entry in entries:
if not isinstance(entry, dict):
continue
if entry.get("changeType") in build_change_types:
name = entry.get("component")
if isinstance(name, str) and name:
components.append(name)
change_type = entry.get("changeType")
if change_type not in known_change_types:
print(
f"##[error]--changed-components-file {path!s} has an unrecognized "
f"changeType {change_type!r} (known: {sorted(known_change_types)}); "
"refusing to guess the build set."
)
raise SystemExit(1)
if change_type in build_change_types:
components.append(entry["component"])
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