mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-06 15:49:59 +00:00
fix(release): skip_tests silently skipped smoke and soak too
Run 30504814537 built all eight platforms successfully with skip_tests=true, and
reported:
test: skipped (intended)
smoke: skipped (NOT intended)
soak: skipped (NOT intended)
release-draft: running
GitHub propagates "skipped" TRANSITIVELY down the needs graph. `build` carried
`!cancelled() && !failure()` so it overrode the skipped `test` and ran; `smoke`
had no `if:` and `soak` only checked soak_level, so both inherited the skip.
Nothing failed. Nothing announced it. The run then proceeded toward publishing
binaries that had never been smoke-tested or soaked -- the exact opposite of what
skip_tests was for, which was to skip a phase already proven green, not to
quietly stop testing the artifacts.
The second half of the defect is worse than the first: `release-draft` guarded
itself with a bare `!cancelled() && !failure()`, which is fail-OPEN. A skipped
job is neither cancelled nor failed, so a skipped smoke sails straight through
it. The draft was one gate away from being cut from unverified binaries, and the
only reason it was not is that the run was cancelled by hand.
Fixes, both directions:
- smoke and soak get `!cancelled() && !failure()`, so a deliberately skipped
ancestor no longer skips them;
- release-draft now requires `needs.smoke.result == 'success'` and enumerates
`needs.soak.result` explicitly, so a SKIPPED smoke BLOCKS the draft, and a
legitimately skipped soak (soak_level=none) stays distinguishable from a soak
that never ran.
tests/test_release_gate_chain_contract.sh pins both properties: every job
downstream of the optional phase must carry the override, and the draft must
demand smoke success rather than smoke non-failure. Verified in both directions
-- it passes on this workflow and fails with 2 violations when the previous
smoke/soak conditions are restored.
Nothing was published: the release remained a draft (isDraft=true,
publishedAt=null) and the run is cancelled.
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
1 parent
c16da50288
commit
1670414211
2 files changed
+112
-2
No files matched your search
@@ -80,7 +80,15 @@ jobs:
|
||||
attest: true
|
||||
|
||||
# ── 4. Smoke test every binary ──────────────────────────────────
|
||||
# !cancelled() && !failure(): GitHub propagates "skipped" TRANSITIVELY down the
|
||||
# needs graph, so with skip_tests=true a skipped `test` skipped smoke and soak
|
||||
# too — even though `build` overrode the same condition and succeeded. Nothing
|
||||
# failed and nothing said so; the pipeline simply carried on toward publishing
|
||||
# artifacts that had never been smoke-tested or soaked. Every job downstream of
|
||||
# an optional phase needs this override, or the phase being optional silently
|
||||
# makes the phases after it optional as well.
|
||||
smoke:
|
||||
if: ${{ !cancelled() && !failure() }}
|
||||
needs: [build]
|
||||
uses: ./.github/workflows/_smoke.yml
|
||||
with:
|
||||
@@ -88,7 +96,7 @@ jobs:
|
||||
|
||||
# ── 5. Soak tests ──────────────────────────────────────────────
|
||||
soak:
|
||||
if: ${{ inputs.soak_level != 'none' }}
|
||||
if: ${{ !cancelled() && !failure() && inputs.soak_level != 'none' }}
|
||||
needs: [build]
|
||||
uses: ./.github/workflows/_soak.yml
|
||||
with:
|
||||
@@ -97,9 +105,17 @@ jobs:
|
||||
version: ${{ inputs.version }}
|
||||
|
||||
# ── 6. Create DRAFT release ────────────────────────────────────
|
||||
# Requires smoke to have actually SUCCEEDED, not merely "not failed". The bare
|
||||
# !cancelled() && !failure() form is fail-OPEN: a skipped smoke is neither
|
||||
# cancelled nor failed, so a draft was one condition away from being cut from
|
||||
# binaries nobody had run. soak may legitimately be 'skipped' (soak_level=none),
|
||||
# so that one is enumerated explicitly rather than lumped in.
|
||||
release-draft:
|
||||
needs: [smoke, soak]
|
||||
if: ${{ !cancelled() && !failure() }}
|
||||
if: >-
|
||||
${{ !cancelled() && !failure()
|
||||
&& needs.smoke.result == 'success'
|
||||
&& (needs.soak.result == 'success' || needs.soak.result == 'skipped') }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
Reference in new issue
Block a user