Skip to content

Run fork PR test suites in contributor forks - #11788

Merged
sdf-jkl merged 8 commits into
apache:mainfrom
sdf-jkl:codex/fork-pr-ci
Oct 23, 2026
Merged

sdf-jkl merged 8 commits into
apache:mainfrom
sdf-jkl:codex/fork-pr-ci

Conversation

@sdf-jkl

@sdf-jkl sdf-jkl commented Oct 21, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

No linked Arrow issue. Adapts the approach in apache/datafusion#25591.

Rationale for this change

Fork pull requests currently run their test suites upstream, consuming ASF's shared CI capacity before the merge queue validates the merged result. This change moves that initial test feedback to contributors' forks while retaining full upstream validation in the merge queue.

What changes are included in this PR?

  • Run all regular CI suites, excluding Miri, on fork branch pushes and manual runs. This includes documentation-only pushes. Superseded pushes to the same fork branch cancel earlier runs.
  • Keep lightweight checks upstream for fork PRs to main. Same-repository and release-branch PRs retain existing upstream testing; the merge queue still runs every suite, including Miri.
  • Show an informational CI (fork) check linking to the fork run for the current commit. A status bridge uses workflow_run and scheduled polling to discover results and reruns. It reads fork run metadata and writes upstream checks without checking out PR code or consuming PR artifacts.
  • Keep docs deployment upstream-only and add contributor setup instructions and CI configuration checks.

Fork results are informational because contributors control their workflows. They do not replace the required merge-queue checks.

Are these changes tested?

Routing and configuration tests cover fork pushes, PR targets, manual runs, and merge-queue validation. Bridge tests use mocked GitHub APIs to cover missing runs, reruns, stale commits, API failures, polling, and cancellation. All 8 routing/configuration tests and 29 bridge tests passed locally, along with workflow linting, spelling, and Markdown formatting checks.

Hosted end-to-end validation remains outstanding. The bridge must be installed on a test repository's default branch to exercise workflow_run and scheduled updates.

Are there any significant user-facing changes?

Contributors must enable Actions in their forks and update their branches to include these workflows. Results and reruns are available in the fork's Actions tab; the upstream status check may update later. No library API changes.

@github-actions github-actions Bot added the development-process Internal changes; PRs with this label are excluded from changelog label Oct 21, 2026
@sdf-jkl

sdf-jkl commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

The CI runs on my fork https://github.com/sdf-jkl/arrow-rs/actions/runs/39688408876 🎉

@sdf-jkl

sdf-jkl commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

@kumarUjjawal @Jefffrey @neilconway @comphead PTAL 😎

@sdf-jkl
sdf-jkl marked this pull request as ready for review October 21, 2026 22:48
@alamb

alamb commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Are we sure this process is working well in DataFusion? I noticed a bunch fo the Ci today was broken / red. I haven't had time to investigate but maybe we can wait to see how it goes over there before merging this in

@alamb

alamb commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Thank you for pushing this along @sdf-jkl

@neilconway

Copy link
Copy Markdown
Contributor

Are we sure this process is working well in DataFusion? I noticed a bunch fo the Ci today was broken / red. I haven't had time to investigate but maybe we can wait to see how it goes over there before merging this in

CI failures were due to an unrelated issue (security audit), I believe.

@alamb

alamb commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Are we sure this process is working well in DataFusion? I noticed a bunch fo the Ci today was broken / red. I haven't had time to investigate but maybe we can wait to see how it goes over there before merging this in

CI failures were due to an unrelated issue (security audit), I believe.

thanks -- I have been somewhat overwhelmed trying to get this arrow release out I haven't had much time for DataFusion recently or seen the effects of the merge queue improements

Comment thread .github/workflows/fork_ci_status.yml Outdated
for (const pr of page.data) {
if (new Date(pr.updated_at).getTime() < cutoff) { stale = true; break; }
seen.add(pr.number);
await syncCheck(pr, sweepNumbers.has(pr.number));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We can catch errors per PR, continue the sweep, then fail the job after reporting the errors.

Comment thread .github/workflows/fork_ci_status.yml Outdated
pr.head.repo.full_name.toLowerCase() !== repository.toLowerCase() && pr.base.ref === 'main';
const externalId = (pr) => 'arrow-rs-fork-ci:' + pr.number;
const conclusions = new Set([
'action_required', 'cancelled', 'failure', 'neutral', 'skipped', 'stale', 'success', 'timed_out',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this allows stale through to check creation/update, although GitHub reserves that conclusion for itself. Map it to failure, as already done for startup_failure, so encountering it does not break the bridge.

@comphead

Copy link
Copy Markdown
Contributor

I would prob let DF to run for 2-3 weeks to fix the issues and then we can port the changes to other repos.

@sdf-jkl

sdf-jkl commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

I would prob let DF to run for 2-3 weeks to fix the issues and then we can port the changes to other repos.

Given the current state of CI I don't think we can wait 😢

@alamb

alamb commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

I did some poking around in DataFusion I think that the CI is working nicely there. Let's try it here too

@alamb alamb 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.

Thank you @sdf-jkl -- this makes sense to me and I think shifts the accounting to where it belongs (the submitter). I agree that we should give this a try

Comment thread .github/workflows/README.md Outdated
-->

CI runs a subset of checks on pull requests, selected by the changed files.
CI runs lightweight checks upstream for fork pull requests to `main`. Fork

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.

I think this documentation should go

  1. In the contributor guide so it is clear what is happening
  2. The description of what each job does (e.g. ``fork_ci_status.ymlmirrors fork results in an informationalCI (fork)` check,`) I think should be comments in the scripts themselves along with the commands to test

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
3. Push your branch, or manually run `CI` from your fork's **Actions** tab.
View results and rerun failed jobs there; the PR's `CI (fork)` check may lag.

Fork results are informational. The merge queue tests the proposed merge with

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.

Maybe we could phrase this like "When your PR is approved and added to the merge queue, the final CI checks are run using the ASF runners"

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

@kumarUjjawal kumarUjjawal left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good 🚀

@comphead comphead 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.

it looks good to me, but 2 cents here is:
can we make the flow and scripts/yml be DF alike, ideally copy-paste, it would make much easier to port fixes.

In Apache Spark they follow the same rules/strategy for user forks across repos, and it is super easy to adopt user forks on a new repo whenever its created

@sdf-jkl

sdf-jkl commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

can we make the flow and scripts/yml be DF alike, ideally copy-paste, it would makes much easier to port fixes.

I think it's a good idea. I'll do that now

@sdf-jkl

sdf-jkl commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

added the @kumarUjjawal's and @alamb's suggestions above.

can we make the flow and scripts/yml be DF alike, ideally copy-paste, it would makes much easier to port fixes.

I think it's a good idea. I'll do that now

@comphead On a second thought, fully copy and pasting adds more churn and would require another round of review, so I'd defer the unification

@sdf-jkl
sdf-jkl enabled auto-merge October 23, 2026 19:23
@sdf-jkl
sdf-jkl added this pull request to the merge queue Oct 23, 2026
@comphead

comphead commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

I would still think we need to follow DF practices, especially that pull_request_target is restricted after Dec 2026, which makes this approach already obsolete.

we need to follow https://issues.apache.org/jira/browse/SPARK-60440

its fine to have this PR for now, but we later we need to adopt approach based on workflow_run

@comphead

Copy link
Copy Markdown
Contributor

DF migration example apache/datafusion#26683

@sdf-jkl

sdf-jkl commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

its fine to have this PR for now, but we later we need to adopt approach based on workflow_run

The changes in this PR already use workflow_run. I didn't touch the old usage of pull_request_target

DF migration example apache/datafusion#26683

🙏 I will file a follow up based on this later. I think the goal should is to make the CI usable again first.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 23, 2026
@sdf-jkl
sdf-jkl enabled auto-merge October 23, 2026 23:14
@sdf-jkl
sdf-jkl added this pull request to the merge queue Oct 23, 2026
Merged via the queue into apache:main with commit a1eb450 Oct 23, 2026
20 checks passed
@alamb

alamb commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

oh boy -here we go!

@sdf-jkl
sdf-jkl deleted the codex/fork-pr-ci branch October 24, 2026 04:21
@Jefffrey

Copy link
Copy Markdown
Contributor

sorry i wasnt able to keep up with this, thanks for adding it in

one question, what impact did this have on the merge queue? assuming it was this PR, i noticed PRs are now speeding through the merge queue. are the checks not run in merge queue anymore?

@Jefffrey

Jefffrey commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

i clicked merge when ready for this PR #11745 and it went straight to the merge queue (and then merged) without waiting for all the checks to complete 🤔

fyi @Rich-T-kid @etseidl if you plan to merge PRs, things might be funky so probably need to babysit the PRs to ensure they actuallly run their CI first

@sdf-jkl

sdf-jkl commented Oct 24, 2026

Copy link
Copy Markdown
Member Author

I thought it was weird when the 60.1 release merged on the mq so fast. I'll triage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Internal changes; PRs with this label are excluded from changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants