ci: update CT python tools to support new endpoints#18027
Merged
reubeno merged 2 commits intoJul 15, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates Control Tower package builds to the new official and scratch endpoints while separating their execution paths.
Changes:
- Splits official and scratch package-build helpers and updates ADO pipelines.
- Adds shared submission logic, stronger typing, and endpoint contract tests.
- Adds Control Tower tests to dependency smoke CI and documents Python test conventions.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
scripts/ci/control-tower/tests/test_package_build.py |
Tests endpoint payload contracts. |
scripts/ci/control-tower/tests/requirements.txt |
Adds pinned test dependencies. |
scripts/ci/control-tower/tests/conftest.py |
Configures helper imports. |
scripts/ci/control-tower/run_scratch_package_build.py |
Adds scratch-build entry point. |
scripts/ci/control-tower/run_prcheck.py |
Refactors payload construction and typing. |
scripts/ci/control-tower/run_package_build.py |
Removes deprecated combined entry point. |
scripts/ci/control-tower/run_official_package_build.py |
Adds official-build entry point. |
scripts/ci/control-tower/package_build.py |
Centralizes package-build mechanics. |
scripts/ci/control-tower/client.py |
Strengthens JSON typing and diagnostics. |
.github/workflows/dependency-smoke.yml |
Runs Control Tower tests. |
.github/workflows/ado/templates/pr-check-ct-stages.yml |
Uses the scratch endpoint helper. |
.github/workflows/ado/templates/package-build-stages.yml |
Uses the official endpoint helper. |
.github/workflows/ado/pr-check-ct.yml |
Configures scratch build environment. |
.github/workflows/ado/package-build.yml |
Configures official build environment. |
.github/instructions/python.instructions.md |
Documents Python testing practices. |
| set -euo pipefail | ||
|
|
||
| python3 scripts/ci/control-tower/run_package_build.py \ | ||
| python3 scripts/ci/control-tower/run_scratch_package_build.py \ |
reubeno
reviewed
Jul 15, 2026
| @@ -0,0 +1,166 @@ | |||
| """Shared mechanics for Control Tower package-build entry points.""" | |||
Member
There was a problem hiding this comment.
[Non-blocking] How far are we away from autogen'ing a proper python client library from CT OpenAPI?
reubeno
approved these changes
Jul 15, 2026
dmcilvaney
force-pushed
the
damcilva/4.0/pipelines/move_to_official_builds
branch
from
July 15, 2026 23:40
6f56d94 to
d61d01d
Compare
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.
CT endpoints are changing.
/api/Scenario/packageis being deprecated in favor of:/api/Scenario/official/packagesand/api/Scenario/packages(which takes different inputs).Clean up the linter issues in the CT package while refactoring to split the official and non-official build paths to avoid future footguns.