Repository navigation
fix: a failing test fails the Test and Integration tests steps - #158
Merged
Merged
Conversation
Both steps pipe dotnet test into tee. A step that names no shell runs as
bash -e {0}, without pipefail, so the pipe's status was tee's, and the check
that follows asks only whether one test passed: a run with failing tests was
green, as a pull request's check and as the lanes release.yml calls.
The workflow now sets shell: bash for every run step, which is
bash --noprofile --norc -eo pipefail {0}. release.yml sets the same for its
own steps, and a caller's default does not reach the workflow it calls.
Closes #150
Co-Authored-By: Claude Fable 5.2 <[email protected]>
CaffeinatedCoder
force-pushed
the
fix/ci-pipefail
branch
from
November 16, 2026 14:20
6ca1eee to
dec05db
Compare
CaffeinatedCoder
marked this pull request as ready for review
November 16, 2026 14:24
CaffeinatedCoder
added a commit
that referenced
this pull request
Nov 16, 2026
… since #158 The step set pipefail for itself while #150 was open. The file's default shell has it now, for every script, and says why it is not set per script. Co-Authored-By: Claude Fable 5.2 <[email protected]>
CaffeinatedCoder
added a commit
that referenced
this pull request
Nov 16, 2026
… since #158 The step set pipefail for itself while #150 was open. The file's default shell has it now, for every script, and says why it is not set per script. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This was referenced Nov 16, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #150
Problem
The steps
TestandIntegration testsof.github/workflows/dotnet.ymlpipedotnet testintotee. A step that names no shell runs asbash -e {0}, withoutpipefail, so the status of the pipe istee's, and the check that follows asks only whether one test passed. A run with failing tests was green: as the check a pull request needs, and as the lanesrelease.ymlcalls before it packs. #150 showed it with the step's script on a workstation; it had not been seen in CI.Change
One block in
dotnet.yml, and nothing else:shell: bashisbash --noprofile --norc -eo pipefail {0}. The two scripts are as they were, the check that at least one test ran included.Why the workflow's default and not
set -o pipefailin the two scriptsrelease.ymlhas had this block all along, which is why its ownPack checksstep, the same pipe intotee, was never affected and is not changed here.pr-hygiene.ymlhas onerun:and no pipe. So no other workflow needed the fix.set -o pipefailas the first line of theTestscript sits right above the line test: a second provider against the public contract, on SQL Server 2022 and SQLite, and the SQL Server lane #157 changes, and the two conflict (git merge-treeagainst test: a second provider against the public contract, on SQL Server 2022 and SQLite, and the SQL Server lane #157's head3a00e18). This block merges with test: a second provider against the public contract, on SQL Server 2022 and SQLite, and the SQL Server lane #157 cleanly, whichever goes first, and with Spike D: SqlOperations in idempotent scripts and bundles #146, test: six tests assert the rule they are named for #147, fix: two legacy readers for one annotation are refused #148, fix: a conversion in a checked context is translated as it is unchecked #149 and test: the rest of the 5.x port: convention tests, nightly.yml, the SBOMs and the skills #154.What else it changes. Every
run:step of the file gets the shell, so each was read for a pipe:Build,Image digest(twice),Pack,Smoke test,Compile probes,Run every spike project,Run every spike script,Every lane succeededSpike E, the impact tablecat "$table" | tee -a …,echo | tee -a …catfailed, on a file the glob has just matched--noprofile --norcchange nothing for a script: bash reads those files as a login or an interactive shell only.Two things a reviewer may want to know:
Teststopped after the kernel's tests and never ran the PostgreSQL package's. That is-ewith a pipe that reports its status, and it is the smallest change; running every project and failing at the end would be a rewrite of the loop.set -o pipefailthen says what is already true. ItsImage digestreads the version throughdocker exec … | tr: adocker execthat fails ends the step at that line instead of at the comparison below it. Red either way;v="$(false | tr -d x)"goes on underbash -eand exits 1 under the new shell.Tests
Seen in CI, each of the two steps red with one failing test and green without it. The failing tests were a unit test in
CodoMetis.EFCore.SchemaKit.Tests(the first project of the loop) and a test of the categoryIntegrationinCodoMetis.EFCore.SchemaKit.PostgreSQL.Tests(the second), so the two steps between them show both places in the loop..NET, as a pull request runs itTestIntegration tests(PostgreSQL 16 and 18)6ca1eee)Failed: 1, Passed: 654, exit code 1Failed: 1, Passed: 72, exit code 1main's workflow and the same two tests (fc0879c, #159)Failed: 1, Passed: 654in its logFailed: 1, Passed: 72in its logdec05db)The second row is the defect. The logs name the shell:
/usr/bin/bash -e {0}in the second row,/usr/bin/bash --noprofile --norc -e -o pipefail {0}in the other two. In the first row the gateCIfailed with the lanes.As
release.ymlcalls it. The default is the called workflow's own, so whether it holds underworkflow_callhad to be seen too, andrelease.ymlis not mine to run. The two throwaway commits also held a workflow that does what itscijob does:defaults: run: shell: bashat the top, asrelease.ymlhas, and one job withuses: ./.github/workflows/dotnet.yml.dotnet.yml, calledTestand bothIntegration testsbash --noprofile --norc -e -o pipefail {0}main's workflow and the same two testsbash -e {0}So a caller's default does not reach the workflow it calls, which is how a tag was checked by lanes that could not fail although
release.ymlsets the default; and the called workflow's own default does hold.The two failing tests and the throwaway workflow are gone from this branch (it was force-pushed from
6ca1eeetodec05db; the diff is the block above and its comment). #159 is closed unmerged and its branch is deleted.Not done here:
release.ymlitself was not run. The guard that would fail when a pipedrun:script losespipefailis owed and tracked as #160: it belongs inConventions/WorkflowGateConventionTests.cs, which arrives with #154 and is not onmain.🤖 Generated with Claude Code