chore: enable strict gw group validation#269
Conversation
|
🚀 Temp artifacts published: |
6c5250a to
07ad2ea
Compare
|
🚀 Temp artifacts published: |
|
githedgehog/fabricator#1336 needs to be merged first |
07ad2ea to
a237949
Compare
|
🚀 Temp artifacts published: |
a237949 to
937fd2f
Compare
|
🚀 Temp artifacts published: |
937fd2f to
3328ef9
Compare
|
🚀 Temp artifacts published: |
Signed-off-by: Sergei Lukianov <me@slukjanov.name>
3328ef9 to
7f553a3
Compare
|
🚀 Temp artifacts published: |
There was a problem hiding this comment.
Pull request overview
This pull request enables strict validation for gateway group references by replacing warning logs with proper error returns. Previously, the code would only log warnings when a gateway group was not found or couldn't be retrieved, allowing invalid configurations to proceed. This was a temporary measure indicated by TODO comments stating "enable validation back after it's supplied by the fabricator."
Changes:
- Removed temporary workaround that logged warnings instead of returning errors for missing gateway groups
- Added proper error handling to distinguish between NotFound and other retrieval errors
- Cleaned up unused logging imports
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| api/gateway/v1alpha1/peering_types.go | Enabled strict gateway group validation in Peering.Validate(), replacing warning logs with error returns and adding kapierrors import for proper NotFound checking |
| api/gateway/v1alpha1/gateway_types.go | Enabled strict gateway group validation in Gateway.Validate(), replacing warning logs with error returns wrapped in ErrInvalidGW |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #291