Skip to content

Panic for broken webhook validation assumption #565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

pleshakov
Copy link
Contributor

  • Add panics for cases when an assumption about how webhook validation (run by NKG) validates a Gateway API resource is broken.
  • Add unit tests for those cases to ensure that invalid resources don't reach the code that makes those assumptions. Note: panics are not unit tested as we considered it'd be redundant.

Fixes #515

@pleshakov pleshakov requested a review from a team as a code owner April 6, 2023 20:03
@github-actions github-actions bot added the chore Pull requests for routine tasks label Apr 6, 2023
@pleshakov pleshakov force-pushed the chore/add-panics-and-tests branch from 06b4c9f to f2f8cfc Compare April 6, 2023 20:03
- Add panics for cases when an assumption about how webhook validation
(run by NKG) validates a Gateway API resource is broken.
- Add unit tests for those cases to ensure that invalid resources
don't reach the code that makes those assumptions. Note: panics are not
unit tested as we considered it'd be redundant.

Fixes #515
@pleshakov pleshakov force-pushed the chore/add-panics-and-tests branch from f2f8cfc to ba2f63c Compare April 6, 2023 20:14
@pleshakov pleshakov requested a review from kate-osborn April 6, 2023 20:19
@kate-osborn kate-osborn self-requested a review April 7, 2023 17:22
@pleshakov pleshakov merged commit 6b3a7c2 into main Apr 7, 2023
@pleshakov pleshakov deleted the chore/add-panics-and-tests branch April 7, 2023 17:23
miledxz added a commit to miledxz/nginx-gateway-fabric that referenced this pull request Jan 14, 2025
- Add panics for cases when an assumption about how webhook validation
(run by NKG) validates a Gateway API resource is broken.
- Add unit tests for those cases to ensure that invalid resources
don't reach the code that makes those assumptions. Note: panics are not
unit tested as we considered it'd be redundant.

Fixes nginx#515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate webhook-related assumptions
2 participants