Modularize orchestrator wiring: extract queue profiles, topic registry builder, and controller registration#290
Modularize orchestrator wiring: extract queue profiles, topic registry builder, and controller registration#290JamyDev wants to merge 5 commits into
Conversation
8801dd0 to
3d8d47f
Compare
| PublishOnly []consumer.TopicConfig | ||
| } | ||
|
|
||
| func Build(p BuildParams) (consumer.TopicRegistry, error) |
There was a problem hiding this comment.
maybe we call it Create? conflates with Build (CI)
| @@ -0,0 +1,272 @@ | |||
| # Modular Queue Wiring | |||
There was a problem hiding this comment.
would it possible to run through an example for this...might make things a bit more clear..
I am chatting with Claude to see if we can land on some good sample
Design counter-proposal: declare, don't assembleFull end-to-end walkthrough (every construct defined, every file shown step by step): gist — declare, don't assemble. Summary below. The test that drove it: could another repo import submitqueue as a library and build an fx / plain-main / test-harness service from it? The core move: the RFC's extractions (and our first drafts of this feedback) still leave each service implementing assembly — four copies kept aligned by convention and review. The counter-proposal: each service declares itself as data, one shared engine assembles.
Highlights, each shown concretely in the gist:
The problem statement and the QueueConfig A/B/C analysis survive nearly verbatim — this mostly changes the extraction plan's shape. Happy to pair on the rewrite. |
|
@JamyDev @behinddwalls can we have something fluent like this? or if some config needs to come from YAML for practical reasons (Uber infra): |
|
I think we can add something on top to allow for a fluent builder yea |
Propose extracting per-queue extension profiles, topic-registry builder, and controller registration from the orchestrator example main.go into reusable domain packages, plus data-driven profile hints in QueueConfig. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…onfig removal Analyze three options for per-queue extension selection in light of potential QueueConfig removal: hints in the entity, a separate profile config file, or keeping profiles in Go code only. Recommends landing the mechanical extractions (steps 1-3) unconditionally and deferring step 4 until the QueueConfig question is resolved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…pproach Incorporate the counter-proposal from the design gist: replace the original 5-step extraction plan with a unified pipeline.Construct[D] engine + lifecycle.Component approach. Services declare themselves as Deps struct + Stages slice + Controllers struct; the engine handles topic registry, DLQ pairing, consumer lifecycle, and startup ordering. Key changes: - Add vocabulary section and library/host boundary diagram - Replace steps 1-5 with the engine-based Steps 1-5 (lifecycle, pipeline, service self-declaration, host profiles, host main) - Simplify QueueConfig trade-off: recommend option C (profiles stay in Go code, host-private) over data-driven profile hints - Show how the pattern generalizes across all four services - Add "what the engine enforces" invariants table Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3d8d47f to
0387fe7
Compare
…uent builder APIs
Summary
Adds an RFC at doc/rfc/submitqueue/modular-queue-wiring.md proposing 5 extractions to make the orchestrator's queue setup more modular:
Also adds the RFC to doc/rfc/index.md. Doc-only change, no code modifications.
Test Plan
CI/Build validation
Revert Plan
git revert
API Changes
No API changes
Monitoring and Alerts
Standard monitoring via existing dashboards
🤖 Generated by minion
Co-Authored-By: minion-bot noreply@minion.uber.com
Co-Authored-By: jamy@uber.com
Agent: claude-code | Task: b069bea1-12a5-478a-b517-61ce0abd6749
View your task: https://minion.uberinternal.com/task/b069bea1-12a5-478a-b517-61ce0abd6749
AI Verification
0 issues detected
Skipped verifiers: go-proto-lint, ios-lint, ios-test, uber-one, android-lint, android-coverage, java-lint, web, diff-template, go-lint, go-coverage, go-thrift-lint, java-coverage, claude · EngWiki
Prior runs
Run at
0387fe7on Jul 15 17:37 · 2 files · 913ms · 0 issues detectedRun at
3d8d47fon Jul 13 22:32 · 2 files · 1s · 0 issues detectedRun at
fcb7447on Jun 30 15:50 · 2 files · 1s · 0 issues detectedIssues