fix(workflows): retire deleted definitions atomically - #7689
Draft
ngthuydiem wants to merge 2 commits into
Draft
ngthuydiem wants to merge 2 commits into
ngthuydiem wants to merge 2 commits into
Conversation
Signed-off-by: Diem Nguyen <diem@squareup.com>
🔐 Codex Security Review
|
Signed-off-by: Diem Nguyen <diem@squareup.com>
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
Workflow deletion succeeds but leaves its definition visible in
getandlist. Commit the signed deletion, definition retirement, and executable-row removal together. Lock against concurrent definition writes, preserve newer definitions, and let retries repair old orphan definitions.Review order: relay
workflow_deletion::persistrecognizes a UUID deletion → databasedelete_in_transactionretires both rows → the relay commits and invalidates caches. Legacy name deletion, already-running actions, and bulk cleanup remain outside this change.Related issue
Related: #717 and #2879. Overlaps unmerged proposals #4234 and #6639.
Testing
Compare local baseline
213092074with0322e9975, using dedicated accounts and an isolated relay. Both HTTP regressions fail on the baseline and pass on the patch:Run
cargo test -p buzz-test-client --test e2e_workflow_deletion -- --ignored --test-threads=1with the test's documented fixture variables. Two HTTP tests cover visibility, authorization, replay, and execution. Four Postgres tests cover rollback, orphan cleanup, tenant/owner boundaries, timestamp ordering, writer locking, and scheduled-claim denial.Two cron workflows each fired before deletion. After delete/retry and relay restart, both remained absent and produced no new messages over 133 seconds. CLI/relay evidence only; native UI was not tested.
Validation gaps: Full affected-package checks still fail in
observability_source(also reproduced on the baseline) and relaydemo_join_forwarded_arm_round_trips_echo. The full isolated Postgres suite has 253 passes and four existing push-matcher failures; all four deletion regressions pass.just cipasses static checks but fails ACP keepalive/configuration tests; later build/test phases remain unvalidated. The prior head also has failing GitHub checks, including profile-status smoke; this draft is not merge-ready. The fixed-containerjust testrecipe was replaced with full affected-package suites and isolated Postgres/live-relay checks to preserve test isolation.Generated with Codex