Skip to content

ci(prcheck): split pipeline script into client + thin runner#17064

Merged
christopherco merged 1 commit into
microsoft:tomls/base/mainfrom
dmcilvaney:damcilva/4.0/pipelines/delta_1_refactor
May 8, 2026
Merged

ci(prcheck): split pipeline script into client + thin runner#17064
christopherco merged 1 commit into
microsoft:tomls/base/mainfrom
dmcilvaney:damcilva/4.0/pipelines/delta_1_refactor

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

@dmcilvaney dmcilvaney commented May 6, 2026

Refactor the prcheck pipeline script in preparation for a second runner
that submits package builds. No behavior change.

  • Move .github/workflows/scripts/control-tower-prcheck/ to
    .github/workflows/scripts/control-tower/.
  • Extract HTTP/auth/polling helpers from run_control_tower_prcheck.py
    into a shared client.py module (post_scenario, get_job_status,
    poll_until_terminal, etc.).
  • Rename the runner to run_prcheck.py and reduce it to a thin CLI on
    top of client.py.
  • Update the sources-upload stages template to point at the new
    script paths.

Moved to a direct URL (no AFD), encoded as ApiBaseDirectUrl

@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/delta_1_refactor branch 4 times, most recently from e98a100 to ccb21d3 Compare May 6, 2026 21:53
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/delta_1_refactor branch 5 times, most recently from 5db19fc to 3c3b820 Compare May 7, 2026 22:35
@dmcilvaney dmcilvaney marked this pull request as ready for review May 7, 2026 22:45
Copilot AI review requested due to automatic review settings May 7, 2026 22:45
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

Refactors the Control Tower PR-check scripting used by the sources-upload Azure DevOps pipeline by extracting shared HTTP/auth/polling logic into a reusable client module and keeping the runner as a thin CLI wrapper.

Changes:

  • Added .github/workflows/scripts/control-tower/client.py with shared Control Tower HTTP helpers (token refresh, scenario POST, job polling, error formatting).
  • Added .github/workflows/scripts/control-tower/run_prcheck.py as the prcheck runner using client.py.
  • Updated the sources-upload stages template to install deps and invoke the new script path (and changed the base URL variable reference).

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/scripts/control-tower/run_prcheck.py New thin runner CLI that builds payloads, calls the prcheck scenario, and polls to terminal state.
.github/workflows/scripts/control-tower/client.py New shared module providing HTTP session setup, token refresh behavior, scenario POST, polling, and error formatting.
.github/workflows/scripts/control-tower/requirements.txt Pins Python dependencies for the Control Tower scripts.
.github/workflows/ado/templates/sources-upload-stages.yml Points dependency install + runner invocation at the new script locations; updates base URL variable usage.
.github/workflows/ado/sources-upload.yml Updates the documented required variable name for the Control Tower base URL.

Comment thread .github/workflows/scripts/control-tower/run_prcheck.py
Comment thread .github/workflows/ado/templates/sources-upload-stages.yml
Comment thread .github/workflows/scripts/control-tower/run_prcheck.py Outdated
Copy link
Copy Markdown
Collaborator

@christopherco christopherco left a comment

Choose a reason for hiding this comment

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

:shipit:

Refactor the prcheck pipeline script in preparation for a second runner
that submits package builds. No behavior change.

* Move .github/workflows/scripts/control-tower-prcheck/ to
  .github/workflows/scripts/control-tower/.
* Extract HTTP/auth/polling helpers from run_control_tower_prcheck.py
  into a shared client.py module (post_scenario, get_job_status,
  poll_until_terminal, etc.).
* Rename the runner to run_prcheck.py and reduce it to a thin CLI on
  top of client.py.
* Update the sources-upload stages template to point at the new
  script paths.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@dmcilvaney dmcilvaney force-pushed the damcilva/4.0/pipelines/delta_1_refactor branch from 47a1d83 to 0a6d4e7 Compare May 8, 2026 02:04
@christopherco christopherco merged commit 4fcb765 into microsoft:tomls/base/main May 8, 2026
9 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.

4 participants