Update stream deletion assertions for the new async DELETE contract - #126
Open
prabhaks wants to merge 1 commit into
Open
Update stream deletion assertions for the new async DELETE contract#126prabhaks wants to merge 1 commit into
prabhaks wants to merge 1 commit into
Conversation
parseablehq/parseable#1770 makes DELETE /logstream/{stream} return 202 Accepted instead of 200 OK, since deletion now runs in the background rather than blocking the response. It also makes recreating a stream immediately after deleting it return 409 while the old stream's deletion is still in flight, instead of succeeding right away. Updates DeleteStream to expect 202, and adds a bounded retry-on-409 to the stream creation helpers so tests that delete and immediately recreate the same stream name (a common setup/teardown pattern here) keep working without needing changes at every call site.
6 tasks
prabhaks
marked this pull request as ready for review
August 26, 2026 15:43
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
Companion to parseablehq/parseable#1770, which makes stream deletion asynchronous:
DELETE /logstream/{stream}now returns202 Acceptedinstead of200 OK, since the actual deletion runs in the background rather than blocking the response.409 Conflict("being deleted, please retry shortly") instead of succeeding right away, if the old stream's background deletion hasn't finished yet.Without this update, essentially every test in this suite that deletes and recreates a stream as part of its own setup/teardown (a very common pattern here) fails, either directly on the
DeleteStreamassertion or on aCreateStream*call racing the still-in-flight deletion of a same-named stream from a prior test. See the CI logs on parseable#1770 for the concrete failures this caused.Changes
DeleteStreamnow expects202instead of200.CreateStream,CreateStreamWithHeader,CreateStreamWithCustompartitionError, andCreateStreamWithSchemaBodynow retry (bounded to 15s, 200ms between attempts) while the server returns409, via a small shareddoWithRetryOn409helper, instead of asserting on the first response. This means no changes are needed at the dozens of individual call sites that already assumeDeleteStreamfollowed byCreateStream*just works.DELETEassertion incheckAPIAccess(the RBAC "editor" case, which should succeed) updated from200to202; the403cases (writer/reader/ingestor, correctly denied) are unaffected.Test plan
No test-runner CI is configured for PRs in this repo (only a push-to-
mainDocker publish), and running the actual suite requires a live Parseable cluster. Verified instead with a local Go 1.21 toolchain:go build ./...go vet ./...go test -c ./...(compiles the test binary exactly as the Dockerfile's owngo test -cstep does)gofmt -l .(clean)Once parseable#1770 is available to test against (e.g. via a locally built image), running this suite's
TestDeleteStream,TestSmokeCreateStream,TestSmokeListLogStream, andTestSmokeGetAlert/TestSmokeSetRetention/TestSmokeGetRetentionwould confirm the fix end to end.