Repository navigation
fix(fly): Sprites fake answers policy/network POST with 204, no body - #2725
Merged
Merged
Conversation
The Sprites fake answered POST /v1/sprites/{id}/policy/network with 200
and the stored rules echoed back. The real Sprites API answers 204 with
no body, and every official SDK (Go, JS, Python, Elixir) treats anything
else as a failure; wisp answers 204 too. GET on the same path is
unchanged: 200 with the rules.
chant's own client (spriteApplyNetworkPolicy) already tolerates any
status below 300 and never parses the POST response body, so it needed
no change; a new test pins the fake's raw wire reply directly so a
regression here doesn't slip past that tolerance.
spritzer fixed the same bug in v0.6.1 (INTENTIUS/spritzer#26, PR #27);
bump the container-exec-mode pin (SPRITZER_CONTAINER_IMAGE), which was
sitting on the buggy 0.6.0, to pick up the fix.
Closes #2719.
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.
Summary
POST /v1/sprites/{id}/policy/networkwith200and the stored rules echoed back. The real Sprites API answers204with no body, and every official SDK (Gosprites-go, JS@fly/sprites, Pythonsprites-py, Elixirsprites) treats anything else as a failure; wisp answers 204 too.GETon the same path is unchanged (200with the rules).spriteApplyNetworkPolicyinsprite-config.ts) already tolerates any status below 300 and never parses the POST response body, so it needed no change — that's exactly why the bug went unnoticed here. A new test pins the fake's raw wire reply directly (status + empty body) so a regression can't hide behind that tolerance.SPRITZER_CONTAINER_IMAGEinemulator-images.tswas pinned to the buggy0.6.0; bumped to0.6.1to pick up the fix.Closes #2719.
Test plan
npx vitest run lexicons/fly— 336 passed, 1 skipped (unrelated, pre-existing)npx tsx scripts/typecheck.ts— 31 known failures, no regressions (matches main)npx eslint lexicons/fly/src/op/activities/sprites-fake.ts lexicons/fly/src/op/activities/sprite-config.test.ts lexicons/fly/src/op/activities/emulator-images.ts— clean