Commit edac343
committed
feat(orchestrator): build extension profiles from configuration
## Summary
### Why?
Which implementation of each extension a queue resolved to was hardcoded: the build runner was the fake one for every queue regardless of what was available, and the change provider was a global all-or-nothing environment gate. A deployment could not run one queue against a real provider next to one running entirely on fakes, which is what a stack serving both a test environment and a live repository needs.
### What?
`PROFILES_CONFIG_PATH` names a YAML file selecting the change provider, build runner, and conflict analyzer per queue. Each extension is independently optional, so a queue that differs only in its analyzer says only that. `kind` is an open string rather than a closed schema, so supporting a new provider is a new value and an implementation behind it, not a change to the file's shape.
The file holds no secret: each integration names the environment variable carrying its credential.
With no config file the built-in example topology applies, reproducing the previous behavior exactly — including the per-queue analyzers the E2E suite depends on, and a routing change provider that still falls back to the fake when no token is set. That is what keeps the existing suite meaningful as a regression gate.
Extensions are reused across queues configured alike. This is load-bearing for the build runner: the build and buildsignal controllers look it up separately and the fake holds a build's outcome in memory, so two instances would lose the result between triggering a build and polling it.
## Test Plan
✅ `bazel test //service/submitqueue/orchestrator/server:go_default_test` — pins the built-in topology against what the E2E suite expects, covers per-extension inheritance, provider defaults, every validation rejection, that queues configured alike share one build runner, that each queue's analyzer behaves as configured, and that a missing token fails at startup rather than mid-merge.
# Conflicts:
# service/submitqueue/orchestrator/server/main.go
# Conflicts:
# service/submitqueue/orchestrator/server/main.go
# service/submitqueue/orchestrator/server/profiles.go
# Conflicts:
# service/submitqueue/orchestrator/server/BUILD.bazel
# service/submitqueue/orchestrator/server/main.go
# service/submitqueue/orchestrator/server/profiles.go
# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# interactive rebase in progress; onto 3eb420c2
# Last command done (1 command done):
# pick 652a98e3 # feat(orchestrator): build extension profiles from configuration
# No commands remaining.
# You are currently rebasing branch 'sq/orchestrator-profiles' on '3eb420c2'.
#
# Changes to be committed:
# modified: service/submitqueue/orchestrator/server/BUILD.bazel
# new file: service/submitqueue/orchestrator/server/config.go
# new file: service/submitqueue/orchestrator/server/config_test.go
# modified: service/submitqueue/orchestrator/server/main.go
# modified: service/submitqueue/orchestrator/server/profiles.go
#1 parent 5abb77f commit edac343
5 files changed
Lines changed: 1359 additions & 263 deletions
File tree
- service/submitqueue/orchestrator/server
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| 34 | + | |
31 | 35 | | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
94 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
| 106 | + | |
97 | 107 | | |
98 | 108 | | |
99 | 109 | | |
| |||
102 | 112 | | |
103 | 113 | | |
104 | 114 | | |
| 115 | + | |
| 116 | + | |
105 | 117 | | |
106 | 118 | | |
0 commit comments