Commit 0feadc4
authored
Greenfield: Implement direct controller, E2E fixtures, and fuzzer for VideoStitcherCDNKey (#11185)
# Description
This Pull Request implements the direct controller, E2E test fixtures,
and schema round-trip fuzzer for the Greenfield resource
`VideoStitcherCDNKey`.
## Implementation Details
1. **Direct Controller**:
- Implemented
`pkg/controller/direct/videostitcher/videostitchercdnkey_controller.go`
to handle resource lifecycle operations: `Find`, `Create`, `Update`,
`Delete`, and `Export` via the official Google Cloud Go Video Stitcher
REST/gRPC client library.
- Leveraged top-level field diffing using the `tags` package for robust
in-place updates.
- Automatically registered the direct controller model and mapped
resources.
2. **Mapper & Code Generation**:
- Modified `generate.sh` in the API group directory to enable automatic
mapping.
- Generated conversion code (`mapper.generated.go`) to convert between
the KRM spec and the GCP proto representation.
3. **Schema Round-Trip Fuzzer**:
- Implemented `videostitchercdnkey_fuzzer.go` to register the KRM schema
fuzzer.
- Hand-wrote `videostitchercdnkey_fuzzer_test.go` and verified the
translation layer for zero-data-loss and full compatibility.
4. **E2E Test Fixtures**:
- Scaffolds both `minimal` and `maximal` test cases under
`pkg/test/resourcefixture/testdata/basic/videostitcher/` to verify CRUD
lifecycle.
---
Fixes #11178
This PR was generated by the
**overseer,overseer,greenfield,step/controller** agent (powered by the
gemini-3.5-flash model).15 files changed
Lines changed: 574 additions & 6 deletions
File tree
- apis/videostitcher/v1alpha1
- pkg
- controller
- direct
- register
- videostitcher
- resourceconfig
- test/resourcefixture/testdata/basic/videostitcher/v1alpha1/videostitchercdnkey
- videostitchercdnkey-maximal
- videostitchercdnkey-minimal
- tests/apichecks/testdata/exceptions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments