Skip to content

Commit ec43119

Browse files
compheadOmega359
authored andcommitted
ci: skip queue-verified Dev and Dependencies jobs on pushes to main (apache#25443)
## Which issue does this PR close? - Part of apache#25148. This PR does not close the issue. - Follow-up to apache#25365, which did the same for `rust.yml`. Answers apache#25365 (comment). ## Rationale for this change The inflated test count on the `main` commits page is duplicated checks. Every commit is checked twice at the same SHA, once by the merge queue and once by the push that follows. > The `merge_group` event is separate from the `pull_request` and `push` events. > > — [Events that trigger workflows](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#merge_group) Neither event knows the other ran, so a workflow listing both runs twice. At 3ab72e6 the two `Dev` runs share a `head_sha` and differ only in event and ref: [35262885559](https://github.com/apache/datafusion/actions/runs/35262885559) (`merge_group`, `gh-readonly-queue/main/pr-25383-98b26c5f9…`) and [35263735243](https://github.com/apache/datafusion/actions/runs/35263735243) (`push`, `main`). `Dependencies` is the same pair. `GET /commits/3ab72e61…/check-runs` returns each of these seven names twice: ``` Check License Header Circular Dependency Check Check Markdown Links Detect Unused Dependencies Spell Check with Typos Use prettier to check formatting of documents Validate required_status_checks in .asf.yaml ``` The existing `branches-ignore: 'gh-readonly-queue/**'` does not prevent this. It suppresses a *third* run, the push event on the queue's own temporary branch, not the push to `main`. Scale: from September 9 to 17, 2026 each workflow ran 156 times for pushes to `main`, and all 156 SHAs already had a `merge_group` run of the same workflow at the same SHA. Over the seven full days September 10 to 16 there were 120 such commits, at 1.81 (`Dev`) plus 4.69 (`Dependencies`) mean runner-minutes each, so about 780 runner-minutes per week. All seven jobs report `runner_group: "GitHub Actions"` and none use Runs-On, so every minute saved comes off the shared GitHub-hosted quota apache#25148 is about. Seven other names are also doubled at that SHA. Those are the `rust.yml` jobs apache#25365 deliberately kept on `main` for caches, coverage, and the non-required FFI check. This PR leaves them alone. ## What changes are included in this PR? `main` is added to the existing `branches-ignore` list in `.github/workflows/dev.yml` and `.github/workflows/dependencies.yml`. | Event | Dev / Dependencies jobs | | --- | --: | | Push to `main` | 0 | | Merge group, pull request, push to any other branch | 7 | | `workflow_dispatch` (`Dependencies`) | 2 | Unlike `rust.yml`, neither workflow has a job worth keeping post-merge: none uses `actions/cache` or `rust-cache`, none uploads an artifact or coverage, and all seven are required checks the merge queue already satisfies. With nothing to preserve, excluding the event at the trigger is simpler and cheaper than a per-job `if:`, since no run is created at all. Keeping `branches-ignore` rather than a positive `branches:` list is deliberate: the merge queue is configured only for `main`, so release branches have no pre-merge run to inherit and must keep post-push coverage.
1 parent a91195f commit ec43119

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎.github/workflows/dependencies.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ concurrency:
2424
on:
2525
push:
2626
branches-ignore:
27+
# Commits reach main through the merge queue, which runs this workflow at
28+
# the same SHA, so do not repeat the jobs after the merge. Release
29+
# branches and every other branch keep their post-push runs.
30+
- 'main'
2731
- 'gh-readonly-queue/**'
2832
- 'dependabot/**'
2933
pull_request:

‎.github/workflows/dev.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ name: Dev
1919
on:
2020
push:
2121
branches-ignore:
22+
# Commits reach main through the merge queue, which runs this workflow at
23+
# the same SHA, so do not repeat the jobs after the merge. Release
24+
# branches and every other branch keep their post-push runs.
25+
- 'main'
2226
- 'gh-readonly-queue/**'
2327
- 'dependabot/**'
2428
pull_request:

0 commit comments

Comments
 (0)