You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flake: classify-paths large-input case fails with want == got #559
but the failure branch reports only $big_rc and $big_out. So when the chain
fails for any reason other than those two values — either grep pipeline
returning non-zero under set -o pipefail, for instance — the message prints
a want/got pair that looks like a match and names nothing that differs.
That is exactly what happened here, and it is why this report cannot say what
the underlying cause was.
Reproduction attempts — none succeeded
40 serial runs of scripts/classify-paths.test.sh: 0 failures.
42 runs at 14-way parallelism (matching make verify's -j 14): 0 failures.
A pipefail + SIGPIPE interaction was the obvious first hypothesis, since
that is the bug fix(ci): make classify-paths fail loudly when grep fails #549 fixed inside classify-paths.sh itself. It does not
apply here: grep -qx 'docs=true' matches only the last line, so grep must
consume all input and never exits early. Verified directly at 200 KB and at
the real ~20-byte payload — both pipelines return 0.
So the mechanism is unknown, and the flake is rare.
Ask
Make the assertion self-diagnosing, so the next occurrence explains itself
rather than costing another investigation:
Split the three conditions and report which one failed.
Print $big_out unambiguously (delimited or through od -c), not through tr '\n' ' ' — the current transform makes a single-line output and a
correct two-line output print identically, which is one of the few
explanations the evidence cannot rule out.
Consider grep -qx … <<<"$big_out" instead of the printf | grep pipeline,
which removes the pipeline exit status from the assertion entirely. Cheap,
and it eliminates a whole class of cause whether or not it was this one.
Provenance
Introduced with the classify-paths behavioral test in #549. Observed while
gating stack/3-content-type (#552); a re-run passed. Filing rather than
guessing at a fix, since the cause is not established.
What happened
make cifailed once on theclassify-paths teststep:Note the reported
wantandgotare identical. The exit code was 0 andthe classifier's output was exactly what the case wants.
Why the message can't be trusted to explain it
scripts/classify-paths.test.sh(thelarge-inputcase) asserts three thingsin one
&&chain:but the failure branch reports only
$big_rcand$big_out. So when the chainfails for any reason other than those two values — either
greppipelinereturning non-zero under
set -o pipefail, for instance — the message printsa
want/gotpair that looks like a match and names nothing that differs.That is exactly what happened here, and it is why this report cannot say what
the underlying cause was.
Reproduction attempts — none succeeded
scripts/classify-paths.test.sh: 0 failures.make verify's-j 14): 0 failures.pipefail+SIGPIPEinteraction was the obvious first hypothesis, sincethat is the bug fix(ci): make classify-paths fail loudly when grep fails #549 fixed inside
classify-paths.shitself. It does notapply here:
grep -qx 'docs=true'matches only the last line, so grep mustconsume all input and never exits early. Verified directly at 200 KB and at
the real ~20-byte payload — both pipelines return 0.
So the mechanism is unknown, and the flake is rare.
Ask
Make the assertion self-diagnosing, so the next occurrence explains itself
rather than costing another investigation:
$big_outunambiguously (delimited or throughod -c), not throughtr '\n' ' '— the current transform makes a single-line output and acorrect two-line output print identically, which is one of the few
explanations the evidence cannot rule out.
grep -qx … <<<"$big_out"instead of theprintf | greppipeline,which removes the pipeline exit status from the assertion entirely. Cheap,
and it eliminates a whole class of cause whether or not it was this one.
Provenance
Introduced with the
classify-pathsbehavioral test in #549. Observed whilegating
stack/3-content-type(#552); a re-run passed. Filing rather thanguessing at a fix, since the cause is not established.