feat(platform): add lifecycle.Component and lifecycle.Group#402
Draft
JamyDev wants to merge 1 commit into
Draft
Conversation
JamyDev
added a commit
that referenced
this pull request
Jul 20, 2026
## 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>
This was referenced Jul 20, 2026
Introduce `platform/lifecycle` with two exports: - `Component` interface: `Start(ctx) error`, `Stop(ctx) error` — the one lifecycle abstraction every runnable subsystem implements. - `Group`: runs an ordered list of Components as one Component. Start proceeds in order with rollback on partial failure (no half-started state). Stop proceeds in reverse order, joining all errors so none is swallowed. Pure addition — no existing code changes. Ref: doc/rfc/submitqueue/modular-queue-wiring.md (Step 1) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JamyDev
force-pushed
the
jamy/platform-lifecycle
branch
from
July 21, 2026 17:59
e52af1b to
6a9c542
Compare
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
Step 1 of the Modular Queue Wiring RFC.
Test plan
Stack