Skip to content

Find fork PRs in the review-threads reconciliation - #130491

Closed
Algunenano wants to merge 1 commit into
ClickHouse:masterfrom
Algunenano:rerun-review-threads-fork-prs
Closed

Algunenano wants to merge 1 commit into
ClickHouse:masterfrom
Algunenano:rerun-review-threads-fork-prs

Conversation

@Algunenano

@Algunenano Algunenano commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

commits/<sha>/pulls returns nothing for a commit that lives in a fork, and workflow_run.pull_requests is empty for fork PRs. So when the PR workflow of a fork PR finished after its review threads were resolved, rerun_on_review_threads.yml logged No PR associated with the event - nothing to do. and the skipped jobs were only re-run if the scheduled poll job succeeded later. For example, #130354 stayed at resolved during the run - the full CI suite will be re-run until the reconciliation was dispatched by hand.

The same lookup made retry_infra_failures.yml skip fork PRs, and made the shared-head-commit checks (shared_sha_prs in the workflow, other_open_prs_on_head in can_be_merged.py) never see fork PRs.

This change resolves the PR of a run by its head branch (pulls?head=<owner>:<branch>), and finds the other open PRs with a given head commit with a GitHub search by the commit as well.

Related: #114729

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Workflow [PR]
Sync PR [sync-upstream/pr/130491]

`commits/<sha>/pulls` returns nothing for a commit that lives in a fork, and
`workflow_run.pull_requests` is empty for fork PRs. So a completed `PR` run of
a fork PR was never reconciled ("No PR associated with the event"), and only
the scheduled poll could re-run the skipped jobs. The same lookup made
`retry_infra_failures.yml` skip fork PRs, and made the shared-head-commit
checks (`shared_sha_prs`, `other_open_prs_on_head`) blind to fork PRs.

Resolve the PR of a run by its head branch instead, and find the other PRs
with a given head commit with a search by the commit as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [1e22b7a]

Summary: ✅


AI Review

Summary

Adds fork-aware PR discovery and extends other_open_prs_on_head to protect commit statuses shared by multiple PRs. No actionable findings in the reviewed Python change at 1e22b7acb2eb2d99f50862ff28e031acabb45cc3.

Missing context / blind spots
  • ⚠️ The review skill explicitly excludes .github/workflows/*; the workflow changes and end-to-end rerun behavior remain outside this review. A separate workflow review and a completed fork-PR reconciliation would close that gap.
Final Verdict

Status: ✅ Approve for the reviewed Python change.

@clickhouse-gh clickhouse-gh Bot added pr-ci comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). labels Nov 10, 2026
@Algunenano
Algunenano marked this pull request as draft November 10, 2026 13:53
@Algunenano

Copy link
Copy Markdown
Member Author

The main change was reverted

@Algunenano

Copy link
Copy Markdown
Member Author

Included in #130509

@Algunenano Algunenano closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). pr-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant