feat(platform): add pipeline.Construct engine#403
Open
JamyDev wants to merge 2 commits into
Open
Conversation
This was referenced Jul 20, 2026
JamyDev
force-pushed
the
jamy/platform-lifecycle
branch
from
July 21, 2026 17:59
e52af1b to
6a9c542
Compare
JamyDev
force-pushed
the
jamy/platform-pipeline
branch
from
July 21, 2026 17:59
b49618c to
c37eaea
Compare
JamyDev
force-pushed
the
jamy/platform-lifecycle
branch
from
July 23, 2026 00:28
6a9c542 to
108f096
Compare
JamyDev
force-pushed
the
jamy/platform-pipeline
branch
from
July 23, 2026 00:28
c37eaea to
55b55b4
Compare
JamyDev
force-pushed
the
jamy/platform-lifecycle
branch
from
July 24, 2026 16:55
108f096 to
4b1e4de
Compare
JamyDev
force-pushed
the
jamy/platform-pipeline
branch
from
July 24, 2026 16:55
55b55b4 to
b386d5e
Compare
JamyDev
marked this pull request as ready for review
July 24, 2026 17:31
JamyDev
requested review from
a team,
behinddwalls and
sbalabanov
as code owners
July 24, 2026 17:31
JamyDev
force-pushed
the
jamy/platform-pipeline
branch
from
July 24, 2026 18:09
b386d5e to
b49618c
Compare
JamyDev
force-pushed
the
jamy/platform-lifecycle
branch
2 times, most recently
from
July 24, 2026 18:57
c6f63b9 to
706b856
Compare
## Summary - Introduces `platform/pipeline` with the typed `Construct[D]` engine - `Stage[D]` struct declares pipeline topology as a typed table (key, name, consumer group, controller constructor, optional DLQ) - Engine builds topic registry, creates primary + DLQ consumers, eagerly constructs all controllers, pairs DLQ stages automatically - Returns a `lifecycle.Component` for ordered start/stop - Options: `TopicNames`, `Classifiers`, `PublishOnly`, `ExtraComponents` - Pure addition — no existing code changes Step 2 of the [Modular Queue Wiring RFC](https://github.com/uber/submitqueue/blob/main/doc/rfc/submitqueue/modular-queue-wiring.md). Stacked on #402. ## Test plan - [x] 10 unit tests: single stage, DLQ pairing, multiple stages, empty stages error, controller creation failure, DLQ creation failure, publish-only topics, topic name overrides, resolveTopicName table test, dlqTopicKey, buildTopicConfigs - [x] `bazel test //platform/pipeline:go_default_test` passes - [x] `make gazelle` — BUILD.bazel in sync - [x] `make fmt` — code formatted Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pass engine-produced values (TopicRegistry, TopicKey, ConsumerGroup) to Stage.New and Stage.DLQ via StageContext. Controllers need the registry for publishing to downstream stages and the topic key/group for their own identity — these are engine-owned, not host-provided Deps. DLQ StageContext automatically derives the DLQ topic key (appending "_dlq") and consumer group (appending "-dlq") from the primary stage's values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JamyDev
force-pushed
the
jamy/platform-pipeline
branch
from
July 24, 2026 18:59
be2387a to
7acfd38
Compare
| Name string | ||
|
|
||
| // ConsumerGroup is the consumer group suffix for this stage's subscription | ||
| // (e.g. "orchestrator-start"). |
Collaborator
There was a problem hiding this comment.
i would just say "orchestrator", and mostly one consumer group name for all topics in the service unless we splict the instances by each stage...which is possible but not needed as such, so example could be just orchestrator
| return nil, fmt.Errorf("pipeline: stage %s: failed to register controller: %w", s.Key, err) | ||
| } | ||
|
|
||
| if s.DLQ != nil { |
Collaborator
There was a problem hiding this comment.
maybe it's always needed? every queue bydefault gets DLQ out of the box, so not processing it just keeps accumulating messages in there
behinddwalls
approved these changes
Jul 24, 2026
behinddwalls
approved these changes
Jul 24, 2026
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
platform/pipelinewith the typedConstruct[D]engineStage[D]struct declares pipeline topology as a typed table (key, name, consumer group, controller constructor, optional DLQ)lifecycle.Componentfor ordered start/stopTopicNames,Classifiers,PublishOnly,ExtraComponentsStep 2 of the Modular Queue Wiring RFC. Stacked on #402.
Test plan
bazel test //platform/pipeline:go_default_testpassesmake gazelle— BUILD.bazel in syncmake fmt— code formattedCo-Authored-By: Claude Opus 4.6 noreply@anthropic.com
Issues
https://linear.app/uber/issue/CODEM-209/example-figure-out-a-better-structure-for-wiring-up
Stack