Conversation
…or-selector-compute
…ctrlplane into use-queue-for-selector-compute
|
Caution Review failedThe pull request is closed. WalkthroughThis update introduces a major refactor of resource selector computation and release target management across the backend, API, and end-to-end test suites. The core change is the removal of the previous selector compute builder classes and mutex-based concurrency logic from the database package, replaced by new worker-based event-driven computation pipelines in the event-worker app. New workers are introduced for computing environment and deployment resource selectors, policy target release target selectors, and system release targets, all orchestrated via Redis-based concurrency primitives. The API is updated to support new endpoints and improved OpenAPI schemas, including a new endpoint for fetching release targets by resource. End-to-end tests are expanded and refactored to align with the new computation flows and API contracts. Changes
Sequence Diagram(s)sequenceDiagram
participant API
participant Worker
participant DB
participant Redis
API->>Worker: Enqueue ComputeDeploymentResourceSelector job
Worker->>Redis: Acquire Mutex for deployment
alt Mutex Acquired
Worker->>DB: Fetch deployment and system
Worker->>DB: Delete old computed deployment resources
Worker->>DB: Query matching resources
Worker->>DB: Insert new computed deployment resources
Worker->>Worker: Enqueue ComputeSystemsReleaseTargets job
else Mutex Not Acquired
Worker->>Worker: Re-enqueue job with deduplication
end
sequenceDiagram
participant API
participant Worker
participant DB
participant Redis
API->>Worker: Enqueue ComputeEnvironmentResourceSelector job
Worker->>Redis: Acquire Mutex for environment
alt Mutex Acquired
Worker->>DB: Fetch environment and system
Worker->>DB: Delete old computed environment resources
Worker->>DB: Query matching resources
Worker->>DB: Insert new computed environment resources
Worker->>Worker: Enqueue ComputeSystemsReleaseTargets job
else Mutex Not Acquired
Worker->>Worker: Re-enqueue job with deduplication
end
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (53)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation
Tests
Chores