Repository navigation
Run fork PR test suites in contributor forks - #11788
Conversation
|
The CI runs on my fork https://github.com/sdf-jkl/arrow-rs/actions/runs/39688408876 🎉 |
|
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 |
|
Thank you for pushing this along @sdf-jkl |
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 |
| 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)); |
There was a problem hiding this comment.
We can catch errors per PR, continue the sweep, then fail the job after reporting the errors.
| 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', |
There was a problem hiding this comment.
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.
|
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 😢 |
|
I did some poking around in DataFusion I think that the CI is working nicely there. Let's try it here too |
| --> | ||
|
|
||
| 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 |
There was a problem hiding this comment.
I think this documentation should go
- In the contributor guide so it is clear what is happening
- The description of what each job does (e.g. ``fork_ci_status.yml
mirrors fork results in an informationalCI (fork)` check,`) I think should be comments in the scripts themselves along with the commands to test
| 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 |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
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
I think it's a good idea. I'll do that now |
|
added the @kumarUjjawal's and @alamb's suggestions above.
@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 |
|
I would still think we need to follow DF practices, especially that 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 |
|
DF migration example apache/datafusion#26683 |
The changes in this PR already use
🙏 I will file a follow up based on this later. I think the goal should is to make the CI usable again first. |
|
oh boy -here we go! |
|
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?
|
|
i clicked 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 |
|
I thought it was weird when the 60.1 release merged on the mq so fast. I'll triage |
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?
main. Same-repository and release-branch PRs retain existing upstream testing; the merge queue still runs every suite, including Miri.CI (fork)check linking to the fork run for the current commit. A status bridge usesworkflow_runand 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.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_runand 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.