Commit 0e64421
authored
🤖 fix: register internal aggregation kinds for SSA conversion (#84)
## Summary
Register `aggregation.coder.com` internal (`__internal`) kinds for
`CoderWorkspace` and `CoderTemplate` in the aggregated apiserver scheme
so SSA conversion can resolve hub types during API group install and
request handling.
## Background
After fixing the earlier structured-merge typed schema error, SSA
progressed further but failed with:
- `no kind "CoderTemplate" is registered for the internal version of
group "aggregation.coder.com"`
The aggregated scheme only registered `v1alpha1` kinds. Kubernetes
generic apiserver conversion paths also require internal group
registration.
## Implementation
- Updated `internal/app/apiserverapp/apiserverapp.go`:
- In `NewScheme()`, added `schema.GroupVersion{Group:
aggregation.coder.com, Version: runtime.APIVersionInternal}`.
- Registered internal known types via `scheme.AddKnownTypes(...)` for:
- `CoderWorkspace`
- `CoderWorkspaceList`
- `CoderTemplate`
- `CoderTemplateList`
- Updated `internal/app/apiserverapp/apiserverapp_test.go`:
- Extended `TestNewSchemeRegistersAggregationKinds` to assert both
`v1alpha1` and `__internal` GVK recognition.
## Validation
- `make verify-vendor`
- `make test`
- `make build`
- `make lint`
- `env GOFLAGS=-mod=vendor go test ./internal/app/apiserverapp/...`
## Risks
Low risk. The change is limited to scheme registration and a focused
unit test update in the aggregated apiserver package. No storage
behavior or request logic changed.
---
_Generated with [`mux`](https://github.com/coder/mux) • Model:
`openai:gpt-5.3-codex` • Thinking: `xhigh`_
_Generated with `mux` • Model: `openai:gpt-5.3-codex` • Thinking:
`xhigh` • Cost: `$0.49`_
<!-- mux-attribution: model=openai:gpt-5.3-codex thinking=xhigh
costs=0.49 -->1 parent 2272d9b commit 0e64421
2 files changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
153 | 168 | | |
154 | 169 | | |
155 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
| |||
0 commit comments