feat(publish): route publish workers by workspace#371
Merged
Conversation
Publish workers need tenant routing before project-domain tables can move toward Citus distribution. Add workspace ids to publish job payloads and scope publication, schedule, account, activity, and replay lookups through the project workspace. Mismatched worker payloads are discarded after releasing their publish lock while legacy payloads derive a workspace from the project.
Publish queue tests need to pin the tenant routing behavior added to durable worker payloads. Assert workspace ids in queue and outbox payloads, including legacy outbox replay derivation. Cover mismatched workspace jobs so they leave publication state untouched and release their lock.
Phase 5 needs explicit constraint and join evidence before distributed-table rehearsal. Add a constraint review manifest and update table-group readiness terms with required primary-key, unique, and partition follow-ups. Update the database optimization plan to mark the review and worker-routing evidence as completed.
The constraint review should stay machine-checkable as Phase 5 routing evidence evolves. Add a Minitest guard for required unique, partition, foreign-key, join, and worker-payload review sections. Also ensure table-group readiness terms no longer defer unresolved review work behind generic labels.
Workspace-aware publish helpers replaced the project-only private wrappers during worker routing. Remove the unused compatibility methods that now only forward to workspace-scoped implementations. This keeps backend lint clean without changing publish behavior.
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.
Title: feat(publish): route publish workers by workspace
Feature Description
workspace_idthrough publish jobs, outbox replay, scheduled publication dispatch, lifecycle transitions, idempotency replay, and activity/event writes.Implementation Approach
Testing
golangci-lint run ./...frombackend/passed.bash script/ci/backend.shpassed.ruby script/db/test_citus_constraint_review.rbpassed.ruby script/db/test_citus_table_groups.rbpassed.