Repository navigation
[fix](build) Allow TeamCity comment triggers on draft PRs - #70605
Merged
mrhhsg merged 1 commit intoNov 16, 2026
Merged
Conversation
### Background PR comment commands use a shared TeamCity helper to verify the PR before submitting builds or writing file-filter skip statuses. ### What problem does this PR solve? Issue Number: None Related PR: apache#70459 (introduced the draft restriction), apache#70515 (retained it) PR Type: Bugfix Problem Summary: Authorized `run buildall` and individual commands fail on open draft PRs, including when a lane should only write a skip status. Allow draft PRs through the shared gate while retaining the open-state, exact head and target-branch checks. ### Details - **Frequency:** Every comment-triggered build or skip for a draft PR. - **Root cause:** The common PR identity check also required `draft == false`. - **Why existing tests missed it:** Existing dispatch tests replaced the PR check with a freshness stub. - **Fix:** Remove only the draft predicate. New tests exercise the real PR predicate for both enqueue and skip paths. - **Other paths and branches:** The shared helper covers all supported comment-triggered lanes and branches. Workflow commenter authorization and file filters are unchanged. ### Testing - `python3 regression-test/pipeline/common/tests/test_teamcity_utils.py`: 29 tests passed locally. - The new draft acceptance test fails against the original predicate. - Negative coverage verifies closed PRs, changed heads and changed target branches cannot enqueue builds or write skip statuses. - `bash -n regression-test/pipeline/common/teamcity-utils.sh` and `git diff --check` passed. - No live CI rerun performed for this change. ### Release note None. ### Check List (For Author) - Behavior changed: Yes (open draft PRs accept authorized comment triggers). - Does this need documentation: No. - Pre-submission status: Ready. ### AI Disclosure - Tool: OpenAI Codex. - Generated: Code change, tests and PR description. - Human review: Pending.
Contributor
Author
|
skip buildall |
mrhhsg
approved these changes
Nov 16, 2026
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.
Background
PR comment commands use a shared TeamCity helper to verify the PR before submitting builds or writing file-filter skip statuses.
What problem does this PR solve?
Issue Number: None
Related PR: #70459 (introduced the draft restriction), #70515 (retained it)
PR Type: Bugfix
Problem Summary:
Authorized
run buildalland individual commands fail on open draft PRs, including when a lane should only write a skip status. Allow draft PRs through the shared gate while retaining the open-state, exact head and target-branch checks.Details
draft == false.Testing
python3 regression-test/pipeline/common/tests/test_teamcity_utils.py: 29 tests passed locally.bash -n regression-test/pipeline/common/teamcity-utils.shandgit diff --checkpassed.Release note
None.
Check List (For Author)
AI Disclosure