Skip to content

[GLUTEN-13541][CI] Keep started fork runs in progress and ask forks to allow all actions - #13644

Merged
LuciferYang merged 5 commits into
apache:mainfrom
LuciferYang:fork-ci-followup
Nov 17, 2026
Merged

LuciferYang merged 5 commits into
apache:mainfrom
LuciferYang:fork-ci-followup

Conversation

@LuciferYang

@LuciferYang LuciferYang commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Fixes for #13535's fork status sync, from its first days:

How was this patch tested?

A unit check of the script with a stubbed GitHub client covers each case above. In luciferyang-ci-demo/gluten, which plays apache/gluten, the statuses show on a passing PR and a failing PR. A fork run with no relevant change now passes detect-changes.

Was this patch authored or co-authored using generative AI tooling?

Yes. Generated-by: Claude Opus 5.5

Related issue: #13541

Co-Authored-By: Claude Code <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 14, 2026 09:51
@prestodb-ci

Copy link
Copy Markdown

Failed to query issues imported from #13644:

Error 1045 (28000): Access denied for user 'presto'@'10.167.107.7' (using password: YES)

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

LuciferYang and others added 2 commits November 16, 2026 08:44
… when its jobs can't be read

Co-Authored-By: Claude Code <noreply@anthropic.com>
…k run

Co-Authored-By: Claude Code <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 16, 2026 00:48

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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

Looks good to merge for new PRs on updated branches. Existing action_required checks from the old script are retained when no fork run is found, but fresh commits get the new commit statuses correctly. I’d treat migration of those old checks as optional cleanup, not a merge blocker.

const next = statusOf(run, await jobsOf(pr, run));
const same = current && ['state', 'description', 'target_url'].every((k) => current[k] == next[k]);
if (!same) await setStatus(pr, w, next);
} else if (!current && !legacyOf(w).some((c) => c.conclusion == 'action_required')) {

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.

For optional migration cleanup, we could change the no-run branch to else if (!current) so an old action_required check doesn't suppress the new error commit status. In the retirement loop, skip only checks already marked neutral and remove hasRun. This creates the replacement status before retiring the legacy check. Fresh commits already work correctly, so this doesn't need to block merging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 82a4309: a commit without a fork run gets the error status first, and the old check is marked neutral after it.

Copilot AI balanced review requested due to automatic review settings November 16, 2026 07:50

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@LuciferYang

Copy link
Copy Markdown
Contributor Author

cc @philo-he @zhztheplayer Could you take a look? This fixes the fork status sync from #13535: fork runs are reported as commit statuses so the merge box always lists them, and docs-only PRs no longer fail at detect-changes.

@philo-he philo-he left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good overall. Thanks!

Nit: ' so far' is a literal in both statusOf and isFinal. Could it be a constant like UNLISTED, so rewording it later keeps the two in sync?

Copilot AI balanced review requested due to automatic review settings November 17, 2026 09:19

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@LuciferYang

Copy link
Copy Markdown
Contributor Author

@philo-he Done in 4804fdf.

@LuciferYang
LuciferYang merged commit 6068556 into apache:main Nov 17, 2026
39 checks passed
@LuciferYang

Copy link
Copy Markdown
Contributor Author

Merged into main. Thank you @felipepessoto @philo-he

ReemaAlzaid pushed a commit to ReemaAlzaid/gluten that referenced this pull request Nov 23, 2026
…o allow all actions (apache#13644)

## What changes are proposed in this pull request?

Fixes for apache#13535's fork status sync, from its first days:

- Fork runs are reported as commit statuses, not check runs. A check run joins another workflow run's check suite. On apache#13563 the three checks sat under an older PR Bot run, and the merge box didn't list them. Check runs from earlier passes are marked neutral after their statuses are written.
- If a fork run's jobs can't be read, the status still follows the run. On apache#13563 each read got a 502, so a rerun was never reported. Jobs are read 30 at a time, and 5xx responses are retried.
- A queued run with a started job shows as running.
- A fork run with no relevant change no longer checks out a merged commit it never published, which failed docs-only PRs such as apache#13413.
- `CONTRIBUTING.md` asks forks to allow all actions, after apache#13561's fork allowed only its own.

## How was this patch tested?

A unit check of the script with a stubbed GitHub client covers each case above. In luciferyang-ci-demo/gluten, which plays apache/gluten, the statuses show on a [passing PR](https://github.com/luciferyang-ci-demo/gluten/pull/1) and a [failing PR](https://github.com/luciferyang-ci-demo/gluten/pull/3). A fork run with no relevant change now passes `detect-changes`.

## Was this patch authored or co-authored using generative AI tooling?

Yes. Generated-by: Claude Opus 5.5


Related issue: apache#13541
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants