test(conformance): supply d tag for workflow definitions after relay schema change - #5146
Open
iroiro147 wants to merge 1 commit into
Open
test(conformance): supply d tag for workflow definitions after relay schema change#5146iroiro147 wants to merge 1 commit into
iroiro147 wants to merge 1 commit into
Conversation
…schema change
The relay's handle_workflow_def now requires clients to supply the
workflow_id via a `d` tag and rejects definitions without one
("invalid: missing d tag (workflow_id)", command_executor.rs:668).
The workflow_trigger_is_community_confined conformance row was still
written against the older server-generates-the-id contract: it passed
only `h` + `name` tags and read the id out of the accept response.
Definitions were rejected at setup, so the isolation assertion (A's
workflow id can't be fired under B's community) never ran — a false red.
Update define_workflow to generate a fresh UUID locally, tag it via `d`
alongside `h` and `name`, and return it directly (no response parsing).
The trigger path already passes `d` with the same UUID, so no other
change is needed.
Refs block#5101
Signed-off-by: iroiro147 <sarthak.singh@mastersunion.org>
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
The
workflows::workflow_trigger_is_community_confinedconformance row was failing at setup, not at the isolation assertion it was written to check. The relay'shandle_workflow_defnow requires the client to pass the workflow id via adtag and rejects with"invalid: missing d tag (workflow_id)"(crates/buzz-relay/src/handlers/command_executor.rs:668). The test's helper was still built against the older server-generates-the-id contract, passed onlyh+nametags, and read the id out of the accept response — so every definition request was rejected with HTTP 400 and the row's actual assertion (A's workflow id can't be fired under B's community) never ran.A false red hides a real relay property. This restores the row to green so the community-confinement fence is actually exercised.
Closes #5101.
What changed
In
crates/buzz-test-client/tests/conformance_multitenant.rs, insidemod workflows:define_workflownow generates a freshuuid::Uuid::new_v4()locally, tags it viadalongsidehandname, and returns it directly (no response parsing needed; the id was never server-generated, so there's nothing new to read out of the accept message).trigger_workflow) already passdwith the same UUID; no change there.Net effect: −7 LoC, same behavior, row goes from failing-at-setup to running the isolation check.
Test plan
cargo check -p buzz-test-client --tests— clean.HTTP 400); after this change the row exercises the confinement assertion end-to-end when run against a live relay + Postgres (the standard conformance harness, which we do not run in CI for non-owning lanes).