You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ozone.apache.org by Attila Doroszlai <ad...@apache.org> on 2026/10/21 10:22:20 UTC

[DISCUSS] drop pull_request trigger for CI

Hi Ozone developers,

I am proposing a change to the way CI checks are triggered in Ozone repos.  Please let me know what you think.

-Attila


## Proposal

Stop triggering workflows on `pull_request` events.

- Make CI run in fork "mandatory".  Reviewers should verify CI results from the fork for each PR, even if created by committer.  This will be _easier_ than before, since each commit carries its own status, which is visible directly in the PR until hidden by the PR's own status.  This means we will no longer have to navigate to the fork to find the CI run.
- Check PR title via scheduled job, which should add a "review" with the results in the PR: -1 or 0.  Allow committers to manually trigger the same check for a specific PR.

## Details

I will use `master` as an example below, but the same applies to other long-lived (feature or release) branches.

### Background

- Workflows are triggered by events.  The most important ones for our purposes: `push`, `pull_request`, `schedule`, manual.
- They run in the repo where the event occurs, e.g. `push` to your fork, `pull_request` created in the Apache repo.
- Runners execute the workflow's jobs in parallel within limits, and wait in queues until runners are available.
- Merging a PR also results in `push` to the target repo.
- Ozone has "selective checks" for PRs, which tries to limit the set of checks to run based on what is being changed.
- We completely skip CI for draft PRs.

### Apache vs. forks

- ASF has a pool of few hundred runners shared among over 3.2k repos of 290+ Apache projects, with widely varying level of workflow usage.  ASF runners are a rather limited resource.
- Workflows in Apache repos are automatically triggered for authors who are committers on any Apache project.
- External contributors' workflows in Apache repos need to be approved manually.
- ASF has a policy on runner usage [1].  Per-project limits are not strongly enforced, we are trusted to limit our own usage, and rely on others to do the same.
- Projects have no way to directly limit their usage to meet the policy, GitHub does not provide tools for that.
- Free public repos (contributor forks) get 20 runners from GitHub, unrelated to the ASF.

### Why PR runs are not that useful

Ozone CI is triggered for both `push` and `pull_request` events.  The rationale was that the dev branch may not be fully up-to-date with `master`, but the `pull_request` takes those extra commits and runs checks on the combined state.  However, it does so only as of the time the PR is opened or synchronized (new commit pushed).  There may be further commits added to `master` between that time and when the PR is merged.  Integration with these is not tested, so a passing PR CI run does not guarantee passing run on `master`.  We do occasionally merge old PRs with outdated CI results only to realize it after the fact.  More commits on `master` increase both the probability of problems and the time for PR CI to complete.

If the dev branch is updated from `master` (usually due to conflicts), the `pull_request` run unnecessarily duplicates the `push` run's work.

Thus, I don't think `pull_request` runs have much benefit in practice.

### What problems PR runs contribute to

1. They compete for limited resources, with both other projects and our own other workflows.  ASF shared runners do not scale (with the increase in number of projects, contributors, more PRs per contributor, more checks, additional test cases, etc.)
2. Draft PR state is ambiguous: is work genuinely in progress, or is the PR draft just to defer CI?  Draft PRs are more likely to get ignored.
3. Contributor workflow approval and "ready for review" events sometimes get mixed up, resulting in unexpected cancellations.
4. Committers from other Apache projects may be more trustworthy than external contributors, but their changes may still need more iterations, since they may be unfamiliar with Ozone.
5. On the flip side of (4), external contributors with more experience on Ozone but not yet committers still need manual approval.
6. Due to the need for workflow approval and the difference in event triggers, sometimes a "pass" result from the humble "pull request title" check is confused with full CI.

### How the proposal mitigates or fixes those problems

1. Reduces load on shared runners, since we eliminate a large portion of the runs.  This frees up resources for other workflows, so we can merge PRs more frequently.  It scales with the number of contributors.  It is an incentive for contributors to pace their pull requests, for which reviewer capacity is also limited.  It also helps other Apache projects.
2. No need to piggyback on draft state to skip PR CI.
3. No unexpected cancellation, since workflow does not need approval.
4-5. No distinction wrt. CI runs between committers from other Apache projects and external contributors.
6. PR title check result cannot be confused with full CI.

### Possible future improvements

- We can add more information to the PR via scheduled job.  Currently we have one to label PRs based on the paths being changed.  It can be expanded to indicate the size of the change, how far the fork branch is behind `master`, etc.  These would provide more information to reviewers at a glance in the PR list.
- See if we can apply existing "selective checks" to reduce time needed for CI runs in fork.
- Jarek in the Apache Airflow community is working [2] on sophisticated ways to inform PR status from fork CI status.  When it is ready, we can explore if/how to adapt it.

[1] https://infra.apache.org/github-actions-policy.html
[2] https://github.com/apache/airflow/pull/73378

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
For additional commands, e-mail: dev-help@ozone.apache.org


Re: [DISCUSS] drop pull_request trigger for CI

Posted by Attila Doroszlai <ad...@apache.org>.
> > If push status is visible in the PR, I don't see the need for such a
> workflow.
> 
> From my experience, when submitting a PR from a fork, this status sometimes
> shows along with the latest commit, sometimes in the CI status section, and
> sometimes not at all.

You are right.  It seems to work only within the same repo, so the PR in my
own repo was a wrong example for this.  Then ideally we need this workflow together
with the main change.  I have looked at the workflows Hadoop and Spark have for this
purpose, and they seem to be very fragile and hard to test.  I would rather wait for
for Airflow's implementation, for which they plan to publish reusable bits.  In
the meantime let's look for other alternatives.

-Attila

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
For additional commands, e-mail: dev-help@ozone.apache.org


Re: [DISCUSS] drop pull_request trigger for CI

Posted by Peter Lee <pe...@apache.org>.
+1

> a single workflow that fetches the fork's overall CI status and
propagates it.

I think we at least need one pull request CI to either check the fork's CI
status or update the latest fork CI link in the PR description, so
reviewers don't always need to click into the fork's branch and then click
the little x/yellow/red dot to see the CI result. This also enables more
advanced usage in the future, e.g. auto-merge, or only allowing merge if
the PR CI passed.

> If push status is visible in the PR, I don't see the need for such a
workflow.

From my experience, when submitting a PR from a fork, this status sometimes
shows along with the latest commit, sometimes in the CI status section, and
sometimes not at all. Depending on this is too fragile.

> Need to update .github/ci.md <https://bitli.pro/2WjoA_5c70c3a9> and
CONTRIBUTING.md <https://bitli.pro/2WjoB_6fdeeebd> accordingly when this
lands.

If we have the pull request CI above, we can do some checks and show some
hints in it (of course along with the failed CI status), which lowers the
onboarding barrier for contributors.

- Peter

On Thu, Oct 22, 2026 at 4:00 AM Siyao Meng <si...@apache.org> wrote:

> +1
>
> Need to update .github/ci.md and CONTRIBUTING.md accordingly when this
> lands.
>
> -Siyao
>
> On Wed, Oct 21, 2026 at 10:12 AM Attila Doroszlai <ad...@apache.org>
> wrote:
>
> > > Looking at https://github.com/adoroszlai/ozone/pull/64 it would be
> nice
> > if
> > > we could replace the "16 skipped checks" with a single workflow that
> > > fetches the fork's overall CI status and propagates it.
> >
> > That's because they were really skipped, only build-info was enabled,
> like
> > a draft PR.
> > I just pushed another commit with all checks enabled, running now.
> >
> > > The current view [...] does not provide a link to the CI
> > > result that actually matters when merging. That result is attached to
> the
> > > last commit which is less visible.
> >
> > I think that's the same with pull_request runs currently, there is no
> > direct link
> > to the "Summary" page at the bottom of PRs.  (At least I could not find
> it
> > so far.)
> >
> > -Attila
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
> > For additional commands, e-mail: dev-help@ozone.apache.org
> >
> >
>

Re: [DISCUSS] drop pull_request trigger for CI

Posted by Siyao Meng <si...@apache.org>.
+1

Need to update .github/ci.md and CONTRIBUTING.md accordingly when this
lands.

-Siyao

On Wed, Oct 21, 2026 at 10:12 AM Attila Doroszlai <ad...@apache.org>
wrote:

> > Looking at https://github.com/adoroszlai/ozone/pull/64 it would be nice
> if
> > we could replace the "16 skipped checks" with a single workflow that
> > fetches the fork's overall CI status and propagates it.
>
> That's because they were really skipped, only build-info was enabled, like
> a draft PR.
> I just pushed another commit with all checks enabled, running now.
>
> > The current view [...] does not provide a link to the CI
> > result that actually matters when merging. That result is attached to the
> > last commit which is less visible.
>
> I think that's the same with pull_request runs currently, there is no
> direct link
> to the "Summary" page at the bottom of PRs.  (At least I could not find it
> so far.)
>
> -Attila
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
> For additional commands, e-mail: dev-help@ozone.apache.org
>
>

Re: [DISCUSS] drop pull_request trigger for CI

Posted by Attila Doroszlai <ad...@apache.org>.
> Looking at https://github.com/adoroszlai/ozone/pull/64 it would be nice if
> we could replace the "16 skipped checks" with a single workflow that
> fetches the fork's overall CI status and propagates it.

That's because they were really skipped, only build-info was enabled, like a draft PR.
I just pushed another commit with all checks enabled, running now.

> The current view [...] does not provide a link to the CI
> result that actually matters when merging. That result is attached to the
> last commit which is less visible.

I think that's the same with pull_request runs currently, there is no direct link
to the "Summary" page at the bottom of PRs.  (At least I could not find it so far.)

-Attila

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
For additional commands, e-mail: dev-help@ozone.apache.org


Re: [DISCUSS] drop pull_request trigger for CI

Posted by Ethan Rose <er...@apache.org>.
+1 for this approach. This also lets non-committers retrigger workflows for
potentially flaky tests.

Looking at https://github.com/adoroszlai/ozone/pull/64 it would be nice if
we could replace the "16 skipped checks" with a single workflow that
fetches the fork's overall CI status and propagates it. The current view
makes it look like no tests ran, and does not provide a link to the CI
result that actually matters when merging. That result is attached to the
last commit which is less visible.

Ethan

On Wed, Oct 21, 2026 at 12:28 PM Attila Doroszlai <ad...@apache.org>
wrote:

> Thanks Chi-Hsuan for the response.
>
> > > This will be _easier_ than before, since each commit carries its own
> > > status, which is visible directly in the PR until hidden by the PR's
> own
> > > status.
> >
> > I might be missing something here, but I don't see the fork CI status on
> > the PR. For example, the fork CI for #11663 passed, but the PR shows 0
> > checks and no status next to the commit.
>
> The workflow for #11663 was approved in the meantime, but I checked some
> others
> and can confirm: no status is visible.  I guess that might happen because
> the
> pull_request trigger still exists, it just needs approval to start.
>
> I have created a POC pull request [5] in my fork, which removes all
> pull_request
> triggers.  There the status from push run is visible.  It would be great
> if someone
> without write access to apache/ozone could open a PR there for this
> change, to test
> what it looks like in that case.
>
> > I noticed that Spark [3] and Hadoop [4] already use a small workflow to
> > report fork CI status on the PR. Perhaps we could adopt a similar
> > lightweight approach in Ozone, assuming the additional runner usage is
> > minimal? This would make it easier for reviewers to verify CI results
> > without navigating to the fork.
>
> Sure, if the push status discussed above turns out to work only for
> committers,
> we can adopt one of those workflows sooner.  If push status is visible in
> the PR,
> I don't see the need for such a workflow.
>
> > Another thing worth considering is whether the fork CI actually ran as
> > expected. For example, the fork might have an outdated or modified
> > workflow, or it might skip required checks.
>
> That's a good point.  Currently the labeler adds "CI" label if the PR
> changes any
> workflows, checks or related files.  We can make that label more prominent,
> add a comment on the PR, or similar.
>
> > For PRs that really need additional validation, I think we could still
> let
> > committers manually trigger integration CI against the latest master
> before
> > merging. This could address the concern about changes to master after the
> > fork CI passes, without running PR CI on every update.
>
> Committers can already do this by merging master into the PR branch, as
> long as
> the "Allow edits and access to secrets by maintainers" checkbox is
> checked, which
> is the default.  Otherwise we can ask the author do the same.
>
> An "Update branch" button [6] can also be enabled for pull requests in
> repository
> settings available via .asf.yaml [7], which should make it even easier.  I
> have not
> tried this yet, but see it in .asf.yaml of some other repos like Airflow
> and Pulsar.
> I assume the button would be visible to PR author and those with write
> access.
>
> -Attila
>
> [5] https://github.com/adoroszlai/ozone/pull/64
> [6]
> https://docs.github.com/en/pull-requests/how-tos/create-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch#updating-your-pull-request-branch
> [7] https://github.com/apache/infrastructure-asfyaml#pull-request-settings
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
> For additional commands, e-mail: dev-help@ozone.apache.org
>
>

Re: [DISCUSS] drop pull_request trigger for CI

Posted by Attila Doroszlai <ad...@apache.org>.
Thanks Chi-Hsuan for the response.

> > This will be _easier_ than before, since each commit carries its own
> > status, which is visible directly in the PR until hidden by the PR's own
> > status.
> 
> I might be missing something here, but I don't see the fork CI status on
> the PR. For example, the fork CI for #11663 passed, but the PR shows 0
> checks and no status next to the commit.

The workflow for #11663 was approved in the meantime, but I checked some others
and can confirm: no status is visible.  I guess that might happen because the
pull_request trigger still exists, it just needs approval to start.

I have created a POC pull request [5] in my fork, which removes all pull_request
triggers.  There the status from push run is visible.  It would be great if someone
without write access to apache/ozone could open a PR there for this change, to test
what it looks like in that case.

> I noticed that Spark [3] and Hadoop [4] already use a small workflow to
> report fork CI status on the PR. Perhaps we could adopt a similar
> lightweight approach in Ozone, assuming the additional runner usage is
> minimal? This would make it easier for reviewers to verify CI results
> without navigating to the fork.

Sure, if the push status discussed above turns out to work only for committers,
we can adopt one of those workflows sooner.  If push status is visible in the PR,
I don't see the need for such a workflow.

> Another thing worth considering is whether the fork CI actually ran as
> expected. For example, the fork might have an outdated or modified
> workflow, or it might skip required checks.

That's a good point.  Currently the labeler adds "CI" label if the PR changes any
workflows, checks or related files.  We can make that label more prominent,
add a comment on the PR, or similar.

> For PRs that really need additional validation, I think we could still let
> committers manually trigger integration CI against the latest master before
> merging. This could address the concern about changes to master after the
> fork CI passes, without running PR CI on every update.

Committers can already do this by merging master into the PR branch, as long as
the "Allow edits and access to secrets by maintainers" checkbox is checked, which
is the default.  Otherwise we can ask the author do the same.

An "Update branch" button [6] can also be enabled for pull requests in repository
settings available via .asf.yaml [7], which should make it even easier.  I have not
tried this yet, but see it in .asf.yaml of some other repos like Airflow and Pulsar.
I assume the button would be visible to PR author and those with write access.

-Attila

[5] https://github.com/adoroszlai/ozone/pull/64
[6] https://docs.github.com/en/pull-requests/how-tos/create-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch#updating-your-pull-request-branch
[7] https://github.com/apache/infrastructure-asfyaml#pull-request-settings

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
For additional commands, e-mail: dev-help@ozone.apache.org


Re: [DISCUSS] drop pull_request trigger for CI

Posted by Stephen O'Donnell via dev <de...@ozone.apache.org>.
> Free public repos (contributor forks) get 20 runners from GitHub,
unrelated to the ASF.

My immediate concern was how many minutes does GH allow on the 20 runners?
My research suggests the allowance is unlimited, which is great.

Does an Ozone PR consume all 20 runners for a significant amount of time?
The 20 runners could be the limiting factor for CI. If a PR occupies all 20
runners for an hour, then in a working day the most PRs someone could push
is 8. This is probably plenty but for someone with a very large PR flow it
may take a while to get completed runs.

That said, jobs already queue in Apache quite often. So overall I am +1 on
this, as it avoids running the PRs twice as they do now.


On Wed, Oct 21, 2026 at 3:28 PM Chi-Hsuan Huang <ch...@apache.org> wrote:

> Hi Attila,
>
> Thanks for the detailed write-up, +1 from me. I've also noticed CI slowing
> down merges. For PRs from external contributors, we need to approve the
> run, wait about an hour, and then check whether any failures are related to
> the changes before deciding to rerun the tests.
>
> If the dev branch is updated from `master` (usually due to conflicts), the
> > `pull_request` run unnecessarily duplicates the `push` run's work.
> >
>
> I agree. This duplication also happens on committers' PRs even without
> merging from master. Each commit can trigger the full CI twice, once in the
> fork and once in the PR.  For example, #11404 consumed about 30 hours of
> runner time in total across both runs (the jobs run in parallel).
>
> This will be _easier_ than before, since each commit carries its own
> > status, which is visible directly in the PR until hidden by the PR's own
> > status.
>
>
> I might be missing something here, but I don't see the fork CI status on
> the PR. For example, the fork CI for #11663 passed, but the PR shows 0
> checks and no status next to the commit.
>
> Jarek in the Apache Airflow community is working [2] on sophisticated ways
> > to inform PR status from fork CI status.
>
>
> I noticed that Spark [3] and Hadoop [4] already use a small workflow to
> report fork CI status on the PR. Perhaps we could adopt a similar
> lightweight approach in Ozone, assuming the additional runner usage is
> minimal? This would make it easier for reviewers to verify CI results
> without navigating to the fork.
>
> Another thing worth considering is whether the fork CI actually ran as
> expected. For example, the fork might have an outdated or modified
> workflow, or it might skip required checks. Perhaps a simple script or an
> AI agent skill could help reviewers identify these issues.
>
> For PRs that really need additional validation, I think we could still let
> committers manually trigger integration CI against the latest master before
> merging. This could address the concern about changes to master after the
> fork CI passes, without running PR CI on every update.
>
> Thanks again for working on this!
> [3]
>
> https://github.com/apache/spark/blob/master/.github/workflows/notify_test_workflow.yml
> [4]
>
> https://github.com/apache/hadoop/blob/trunk/.github/workflows/notify_test_workflow.yml
>
> Chi-Hsuan
>
> On Wed, Oct 21, 2026 at 6:22 PM Attila Doroszlai <ad...@apache.org>
> wrote:
>
> > Hi Ozone developers,
> >
> > I am proposing a change to the way CI checks are triggered in Ozone
> > repos.  Please let me know what you think.
> >
> > -Attila
> >
> >
> > ## Proposal
> >
> > Stop triggering workflows on `pull_request` events.
> >
> > - Make CI run in fork "mandatory".  Reviewers should verify CI results
> > from the fork for each PR, even if created by committer.  This will be
> > _easier_ than before, since each commit carries its own status, which is
> > visible directly in the PR until hidden by the PR's own status.  This
> means
> > we will no longer have to navigate to the fork to find the CI run.
> > - Check PR title via scheduled job, which should add a "review" with the
> > results in the PR: -1 or 0.  Allow committers to manually trigger the
> same
> > check for a specific PR.
> >
> > ## Details
> >
> > I will use `master` as an example below, but the same applies to other
> > long-lived (feature or release) branches.
> >
> > ### Background
> >
> > - Workflows are triggered by events.  The most important ones for our
> > purposes: `push`, `pull_request`, `schedule`, manual.
> > - They run in the repo where the event occurs, e.g. `push` to your fork,
> > `pull_request` created in the Apache repo.
> > - Runners execute the workflow's jobs in parallel within limits, and wait
> > in queues until runners are available.
> > - Merging a PR also results in `push` to the target repo.
> > - Ozone has "selective checks" for PRs, which tries to limit the set of
> > checks to run based on what is being changed.
> > - We completely skip CI for draft PRs.
> >
> > ### Apache vs. forks
> >
> > - ASF has a pool of few hundred runners shared among over 3.2k repos of
> > 290+ Apache projects, with widely varying level of workflow usage.  ASF
> > runners are a rather limited resource.
> > - Workflows in Apache repos are automatically triggered for authors who
> > are committers on any Apache project.
> > - External contributors' workflows in Apache repos need to be approved
> > manually.
> > - ASF has a policy on runner usage [1].  Per-project limits are not
> > strongly enforced, we are trusted to limit our own usage, and rely on
> > others to do the same.
> > - Projects have no way to directly limit their usage to meet the policy,
> > GitHub does not provide tools for that.
> > - Free public repos (contributor forks) get 20 runners from GitHub,
> > unrelated to the ASF.
> >
> > ### Why PR runs are not that useful
> >
> > Ozone CI is triggered for both `push` and `pull_request` events.  The
> > rationale was that the dev branch may not be fully up-to-date with
> > `master`, but the `pull_request` takes those extra commits and runs
> checks
> > on the combined state.  However, it does so only as of the time the PR is
> > opened or synchronized (new commit pushed).  There may be further commits
> > added to `master` between that time and when the PR is merged.
> Integration
> > with these is not tested, so a passing PR CI run does not guarantee
> passing
> > run on `master`.  We do occasionally merge old PRs with outdated CI
> results
> > only to realize it after the fact.  More commits on `master` increase
> both
> > the probability of problems and the time for PR CI to complete.
> >
> > If the dev branch is updated from `master` (usually due to conflicts),
> the
> > `pull_request` run unnecessarily duplicates the `push` run's work.
> >
> > Thus, I don't think `pull_request` runs have much benefit in practice.
> >
> > ### What problems PR runs contribute to
> >
> > 1. They compete for limited resources, with both other projects and our
> > own other workflows.  ASF shared runners do not scale (with the increase
> in
> > number of projects, contributors, more PRs per contributor, more checks,
> > additional test cases, etc.)
> > 2. Draft PR state is ambiguous: is work genuinely in progress, or is the
> > PR draft just to defer CI?  Draft PRs are more likely to get ignored.
> > 3. Contributor workflow approval and "ready for review" events sometimes
> > get mixed up, resulting in unexpected cancellations.
> > 4. Committers from other Apache projects may be more trustworthy than
> > external contributors, but their changes may still need more iterations,
> > since they may be unfamiliar with Ozone.
> > 5. On the flip side of (4), external contributors with more experience on
> > Ozone but not yet committers still need manual approval.
> > 6. Due to the need for workflow approval and the difference in event
> > triggers, sometimes a "pass" result from the humble "pull request title"
> > check is confused with full CI.
> >
> > ### How the proposal mitigates or fixes those problems
> >
> > 1. Reduces load on shared runners, since we eliminate a large portion of
> > the runs.  This frees up resources for other workflows, so we can merge
> PRs
> > more frequently.  It scales with the number of contributors.  It is an
> > incentive for contributors to pace their pull requests, for which
> reviewer
> > capacity is also limited.  It also helps other Apache projects.
> > 2. No need to piggyback on draft state to skip PR CI.
> > 3. No unexpected cancellation, since workflow does not need approval.
> > 4-5. No distinction wrt. CI runs between committers from other Apache
> > projects and external contributors.
> > 6. PR title check result cannot be confused with full CI.
> >
> > ### Possible future improvements
> >
> > - We can add more information to the PR via scheduled job.  Currently we
> > have one to label PRs based on the paths being changed.  It can be
> expanded
> > to indicate the size of the change, how far the fork branch is behind
> > `master`, etc.  These would provide more information to reviewers at a
> > glance in the PR list.
> > - See if we can apply existing "selective checks" to reduce time needed
> > for CI runs in fork.
> > - Jarek in the Apache Airflow community is working [2] on sophisticated
> > ways to inform PR status from fork CI status.  When it is ready, we can
> > explore if/how to adapt it.
> >
> > [1] https://infra.apache.org/github-actions-policy.html
> > [2] https://github.com/apache/airflow/pull/73378
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
> > For additional commands, e-mail: dev-help@ozone.apache.org
> >
> >
>

Re: [DISCUSS] drop pull_request trigger for CI

Posted by Chi-Hsuan Huang <ch...@apache.org>.
Hi Attila,

Thanks for the detailed write-up, +1 from me. I've also noticed CI slowing
down merges. For PRs from external contributors, we need to approve the
run, wait about an hour, and then check whether any failures are related to
the changes before deciding to rerun the tests.

If the dev branch is updated from `master` (usually due to conflicts), the
> `pull_request` run unnecessarily duplicates the `push` run's work.
>

I agree. This duplication also happens on committers' PRs even without
merging from master. Each commit can trigger the full CI twice, once in the
fork and once in the PR.  For example, #11404 consumed about 30 hours of
runner time in total across both runs (the jobs run in parallel).

This will be _easier_ than before, since each commit carries its own
> status, which is visible directly in the PR until hidden by the PR's own
> status.


I might be missing something here, but I don't see the fork CI status on
the PR. For example, the fork CI for #11663 passed, but the PR shows 0
checks and no status next to the commit.

Jarek in the Apache Airflow community is working [2] on sophisticated ways
> to inform PR status from fork CI status.


I noticed that Spark [3] and Hadoop [4] already use a small workflow to
report fork CI status on the PR. Perhaps we could adopt a similar
lightweight approach in Ozone, assuming the additional runner usage is
minimal? This would make it easier for reviewers to verify CI results
without navigating to the fork.

Another thing worth considering is whether the fork CI actually ran as
expected. For example, the fork might have an outdated or modified
workflow, or it might skip required checks. Perhaps a simple script or an
AI agent skill could help reviewers identify these issues.

For PRs that really need additional validation, I think we could still let
committers manually trigger integration CI against the latest master before
merging. This could address the concern about changes to master after the
fork CI passes, without running PR CI on every update.

Thanks again for working on this!
[3]
https://github.com/apache/spark/blob/master/.github/workflows/notify_test_workflow.yml
[4]
https://github.com/apache/hadoop/blob/trunk/.github/workflows/notify_test_workflow.yml

Chi-Hsuan

On Wed, Oct 21, 2026 at 6:22 PM Attila Doroszlai <ad...@apache.org>
wrote:

> Hi Ozone developers,
>
> I am proposing a change to the way CI checks are triggered in Ozone
> repos.  Please let me know what you think.
>
> -Attila
>
>
> ## Proposal
>
> Stop triggering workflows on `pull_request` events.
>
> - Make CI run in fork "mandatory".  Reviewers should verify CI results
> from the fork for each PR, even if created by committer.  This will be
> _easier_ than before, since each commit carries its own status, which is
> visible directly in the PR until hidden by the PR's own status.  This means
> we will no longer have to navigate to the fork to find the CI run.
> - Check PR title via scheduled job, which should add a "review" with the
> results in the PR: -1 or 0.  Allow committers to manually trigger the same
> check for a specific PR.
>
> ## Details
>
> I will use `master` as an example below, but the same applies to other
> long-lived (feature or release) branches.
>
> ### Background
>
> - Workflows are triggered by events.  The most important ones for our
> purposes: `push`, `pull_request`, `schedule`, manual.
> - They run in the repo where the event occurs, e.g. `push` to your fork,
> `pull_request` created in the Apache repo.
> - Runners execute the workflow's jobs in parallel within limits, and wait
> in queues until runners are available.
> - Merging a PR also results in `push` to the target repo.
> - Ozone has "selective checks" for PRs, which tries to limit the set of
> checks to run based on what is being changed.
> - We completely skip CI for draft PRs.
>
> ### Apache vs. forks
>
> - ASF has a pool of few hundred runners shared among over 3.2k repos of
> 290+ Apache projects, with widely varying level of workflow usage.  ASF
> runners are a rather limited resource.
> - Workflows in Apache repos are automatically triggered for authors who
> are committers on any Apache project.
> - External contributors' workflows in Apache repos need to be approved
> manually.
> - ASF has a policy on runner usage [1].  Per-project limits are not
> strongly enforced, we are trusted to limit our own usage, and rely on
> others to do the same.
> - Projects have no way to directly limit their usage to meet the policy,
> GitHub does not provide tools for that.
> - Free public repos (contributor forks) get 20 runners from GitHub,
> unrelated to the ASF.
>
> ### Why PR runs are not that useful
>
> Ozone CI is triggered for both `push` and `pull_request` events.  The
> rationale was that the dev branch may not be fully up-to-date with
> `master`, but the `pull_request` takes those extra commits and runs checks
> on the combined state.  However, it does so only as of the time the PR is
> opened or synchronized (new commit pushed).  There may be further commits
> added to `master` between that time and when the PR is merged.  Integration
> with these is not tested, so a passing PR CI run does not guarantee passing
> run on `master`.  We do occasionally merge old PRs with outdated CI results
> only to realize it after the fact.  More commits on `master` increase both
> the probability of problems and the time for PR CI to complete.
>
> If the dev branch is updated from `master` (usually due to conflicts), the
> `pull_request` run unnecessarily duplicates the `push` run's work.
>
> Thus, I don't think `pull_request` runs have much benefit in practice.
>
> ### What problems PR runs contribute to
>
> 1. They compete for limited resources, with both other projects and our
> own other workflows.  ASF shared runners do not scale (with the increase in
> number of projects, contributors, more PRs per contributor, more checks,
> additional test cases, etc.)
> 2. Draft PR state is ambiguous: is work genuinely in progress, or is the
> PR draft just to defer CI?  Draft PRs are more likely to get ignored.
> 3. Contributor workflow approval and "ready for review" events sometimes
> get mixed up, resulting in unexpected cancellations.
> 4. Committers from other Apache projects may be more trustworthy than
> external contributors, but their changes may still need more iterations,
> since they may be unfamiliar with Ozone.
> 5. On the flip side of (4), external contributors with more experience on
> Ozone but not yet committers still need manual approval.
> 6. Due to the need for workflow approval and the difference in event
> triggers, sometimes a "pass" result from the humble "pull request title"
> check is confused with full CI.
>
> ### How the proposal mitigates or fixes those problems
>
> 1. Reduces load on shared runners, since we eliminate a large portion of
> the runs.  This frees up resources for other workflows, so we can merge PRs
> more frequently.  It scales with the number of contributors.  It is an
> incentive for contributors to pace their pull requests, for which reviewer
> capacity is also limited.  It also helps other Apache projects.
> 2. No need to piggyback on draft state to skip PR CI.
> 3. No unexpected cancellation, since workflow does not need approval.
> 4-5. No distinction wrt. CI runs between committers from other Apache
> projects and external contributors.
> 6. PR title check result cannot be confused with full CI.
>
> ### Possible future improvements
>
> - We can add more information to the PR via scheduled job.  Currently we
> have one to label PRs based on the paths being changed.  It can be expanded
> to indicate the size of the change, how far the fork branch is behind
> `master`, etc.  These would provide more information to reviewers at a
> glance in the PR list.
> - See if we can apply existing "selective checks" to reduce time needed
> for CI runs in fork.
> - Jarek in the Apache Airflow community is working [2] on sophisticated
> ways to inform PR status from fork CI status.  When it is ready, we can
> explore if/how to adapt it.
>
> [1] https://infra.apache.org/github-actions-policy.html
> [2] https://github.com/apache/airflow/pull/73378
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
> For additional commands, e-mail: dev-help@ozone.apache.org
>
>