Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

ci: one concurrency group for pushes to main, release commits keep theirs (#1374)

Alpamys Makazhanc374aedeb788
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 076a68ea..7921205f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -33,8 +33,21 @@ on:
# a row now leave results for the third only. That is a signal the review rule
# already discards -- merge requires green on the CURRENT head -- which is why
# it is the right thing to trade.
+#
+# 2026-09-28: pushes to `main` now share ONE group, keyed 'main-push'. Measured
+# that morning: 24 of 70 queued runs were full matrices for main commits (about
+# 15 merges plus credit commits in a day), each alone in its per-commit group,
+# so main's own history consumed roughly a third of the queue while every
+# merged change had already passed the matrix on its pull request. In the shared
+# group a RUNNING main run still finishes (cancel-in-progress stays PR-only), and
+# a newer push supersedes only the PENDING one, so main carries at most one
+# running and one pending run and the newest commit always gets a result.
+# What this costs: intermediate main commits may show 'cancelled' instead of a
+# result, so a breakage is bisected over a range rather than read off one
+# commit. `release/**` keeps the per-commit key, because the release checklist
+# needs a green matrix on the exact commit being tagged.
concurrency:
- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || (github.ref == 'refs/heads/main' && 'main-push' || github.sha) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Bound every job explicitly.
diff --git a/.github/workflows/recipe-validation.yml b/.github/workflows/recipe-validation.yml
index c8929e3b..d1f6a4aa 100644
--- a/.github/workflows/recipe-validation.yml
+++ b/.github/workflows/recipe-validation.yml
@@ -56,8 +56,21 @@ on:
# a row now leave results for the third only. That is a signal the review rule
# already discards -- merge requires green on the CURRENT head -- which is why
# it is the right thing to trade.
+#
+# 2026-09-28: pushes to `main` now share ONE group, keyed 'main-push'. Measured
+# that morning: 24 of 70 queued runs were full matrices for main commits (about
+# 15 merges plus credit commits in a day), each alone in its per-commit group,
+# so main's own history consumed roughly a third of the queue while every
+# merged change had already passed the matrix on its pull request. In the shared
+# group a RUNNING main run still finishes (cancel-in-progress stays PR-only), and
+# a newer push supersedes only the PENDING one, so main carries at most one
+# running and one pending run and the newest commit always gets a result.
+# What this costs: intermediate main commits may show 'cancelled' instead of a
+# result, so a breakage is bisected over a range rather than read off one
+# commit. `release/**` keeps the per-commit key, because the release checklist
+# needs a green matrix on the exact commit being tagged.
concurrency:
- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
+ group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || (github.ref == 'refs/heads/main' && 'main-push' || github.sha) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
diff --git a/tests/test_issue1017_merge_freshness.py b/tests/test_issue1017_merge_freshness.py
index 520340b2..da472aff 100644
--- a/tests/test_issue1017_merge_freshness.py
+++ b/tests/test_issue1017_merge_freshness.py
@@ -557,10 +557,18 @@ class TestWorkflowPins:
]
assert any("main:refs/remotes/origin/main" in run for run in runs)
- def test_concurrency_is_untouched_in_ci_yml(self):
- """#1017's concurrency half is already on main; this PR must not edit it."""
+ def test_ci_yml_concurrency_keys_prs_main_and_releases_apart(self):
+ """A PR supersedes itself, main pushes share one group, a release keeps its commit.
+
+ The key is the enforcement, not ``cancel-in-progress``: a pending run is
+ superseded by a newer one in the same group whatever that flag says.
+ """
text = CI.read_text(encoding="utf-8")
- assert "github.event_name == 'pull_request' && github.ref || github.sha" in text
+ assert (
+ "github.event_name == 'pull_request' && github.ref"
+ " || (github.ref == 'refs/heads/main' && 'main-push' || github.sha)"
+ ) in text
+ assert "cancel-in-progress: ${{ github.event_name == 'pull_request' }}" in text
def test_the_script_uses_merge_tree_not_git_merge(self):
src = SCRIPT.read_text(encoding="utf-8")