Repository navigation
chore: mark the paths that need a hardware smoke, and gate unset template fields - #688
Merged
Merged
Conversation
…late fields
v0.118.0 shipped eleven fixes. Four were findable only on real hardware
while the unit suite stayed green, and three pre-existing tests asserted
the broken behaviour as correct. This is the testing response.
scripts/hardware-sensitive.txt names the paths whose correctness is not
provable without an instance, each with the bug that earned it a place.
`make smoke-needed` reports whether anything since the last tag touched
them, excluding test files — changing a test cannot change what an
instance does.
`make smoke` is the hand-assembled verification from that session written
down: MPI rank spread across every node, cloud-init status, --mpi-command
argument preservation, fi_pingpong EFA fabric check, and an INDEPENDENT
leak check that asks AWS rather than trusting the terminate calls.
TestMemberUserDataHasNoEmptyInterpolations renders user-data through the
production builder and fails on unset-field signatures (s3:///, malformed
ARNs, unresolved {{...}}, <no value>). The test that should have caught
#684 set BinariesBucket itself, so it proved the template could
interpolate a bucket while never checking that a caller did. Confirmed to
fail when #684 is reintroduced.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 4, 2026
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.
Answers "what can we test without hardware every release, and can we mark the code that does need it?"
Starting point: v0.118.0 shipped eleven fixes. Four were findable only on hardware while the unit suite stayed green, and three pre-existing tests asserted the broken behaviour as correct. So "add more unit tests" is not the lesson on its own.
What the bugs actually had in common
Sorting this session's bugs by why they escaped is more useful than by subsystem:
The dominant route is the first, and it is not about hardware at all. #683's drain filtered
Tags["spawn:job-array-id"], whichListInstancesnever populates — a test with a hand-builtInstanceInfothat put the tag inTagspasses forever. #684a's region test setBinariesBucketitself, proving the template could interpolate a bucket while never checking a caller did.The fix for that class is to render through the production builder, not a literal. That's the one gate I implemented here.
Implemented
1.
TestMemberUserDataHasNoEmptyInterpolations— renders user-data viabuildJobArrayMemberConfig(the shipping path) across five launch shapes, and fails on unset-field signatures:s3:///, malformed ARNs, unresolved{{...}}, literal<no value>, path-lessmkdir -p. Confirmed to fail when #684 is reintroduced. Costs nothing and runs in the normal suite.2.
scripts/hardware-sensitive.txt— your marking idea. Each path carries the bug that earned it a place, so the list can be argued with rather than inherited:3.
make smoke-needed— reports whether anything since the last tag touched those paths. Excludes_test.go, because changing a test cannot change what an instance does and a noisy signal gets ignored. Tied to the tag, not the PR: you don't need a smoke per commit, you need one per release that touched these areas.4.
make smoke— this session's verification, written down. MPI rank spread across every node,cloud-init status,--mpi-commandargument preservation,fi_pingpong -p efa, then an independent leak check that asks AWS rather than trusting its own terminate calls — because a drain that silently terminated nothing was one of the bugs. ~$0.05, ~10 minutes,NODES=andSKIP_EFA=knobs.The point of (4) is that today's verification took an afternoon because it was improvised. Next time it's a command.
Deliberately not built yet
Three more that I think are worth doing, in value order, but each is its own piece of work and I'd rather propose than half-build:
A. Substrate tag round-trip contract — launch into substrate with spawn's real tag-writing code, read back via
ListInstances, assert every field spawn later reads is populated. This catches #683 directly and generically: it tests that producer and consumer agree, instead of trusting a fixture. Highest value of the three.B. AL2023 container checks — run the enrollment probe and bootstrap fragments inside
public.ecr.aws/amazonlinux/amazonlinux:2023with openmpi installed. This is the only non-hardware way to catch #684b, because "is the binary on PATH in a non-login shell" is a property of the image. Caveat worth stating: a container has no IMDS, no cloud-init and no systemd, so it tests fragments, not the bootstrap — which is why it supplements the smoke rather than replacing it.C.
shellcheckon rendered user-data — cheap, and would likely have caught the quoting class (#660) and flagged the unboundedwhile [ ! -f ]wait (#684). Needs a baseline pass first since the existing templates will light up.What this does not claim
It does not claim the smoke becomes unnecessary. #659's SRD traffic and #684b's PATH are genuinely different in kind: one needs the fabric, the other needs the image. What it claims is narrower — that the largest category this session was tests trusting their own fixtures, which is free to fix, and that the remaining hardware-only set is small enough to name, mark, and smoke in ten minutes.
I'd also suggest filing the 16-node assembly flake if it recurs; it failed once and passed once, and one data point isn't a bug report.
Gates
gofmt -lempty,go vet ./...,go test -short ./..., changelog gate. Both scriptsbash -nclean and exercised in both directions (make smoke-neededagainst the current tag → "No changes"; against v0.117.0 → the six areas with reasons).Two bugs found in my own tooling while writing it, both worth noting because they're the same shapes this repo keeps hitting:
--tag spawn:smoke=…is rejected (thespawn:prefix is reserved), and pipinggit diffstraight intogrepmade grep's "no matches" exit status read as a git failure underpipefail— it reported "cannot diff" right after a successful tag.