Skip to content
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

Reject ratelimit configs that are missing required values. #8575

Merged
merged 5 commits into from
Aug 14, 2023

Conversation

elcasteel
Copy link
Contributor

Description

Add checks for the presence of the required fields for ratelimit actions (spelled out here: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-ratelimit-action) in the rate limit plugins. Reject the config if they are empty instead of letting Envoy fail.
This change will also require updates in solo-projects and should not merge until those changes are tested

API changes

The proto is already annotated to require these fields but we don't pass that through to our CRDs.

Docs changes

Docs show that these fields are required based on proto, and this change is enforcing the requirements.

Context

I ran across this reproducing a different ratelimit translation issue and decided it was worth fixing.

Testing steps

Added unit test.
Manual testing and e2e test will happen on solo-projects PR.

Notes for reviewers

You can use the envoy docs for ratelimit actions to verify that I got everything: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-ratelimit-action

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@solo-changelog-bot
Copy link

Issues linked to changelog:
#8573

@elcasteel elcasteel added the work in progress signals bulldozer to keep pr open (don't auto-merge) label Aug 11, 2023
@github-actions github-actions bot added the keep pr updated signals bulldozer to keep pr up to date with base branch label Aug 11, 2023
@github-actions
Copy link

github-actions bot commented Aug 11, 2023

Visit the preview URL for this PR (updated for commit ace47d0):

https://gloo-edge--pr8575-rlc-nil-check-ijvtnfyq.web.app

(expires Mon, 21 Aug 2023 20:14:25 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 77c2b86e287749579b7ff9cadb81e099042ef677

davidjumani
davidjumani previously approved these changes Aug 14, 2023
Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Small nits but I'm happy to approve

changelog/v1.16.0-beta1/rl-nil-checks.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@sam-heilbron sam-heilbron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@elcasteel elcasteel removed the work in progress signals bulldozer to keep pr open (don't auto-merge) label Aug 14, 2023
@soloio-bulldozer soloio-bulldozer bot merged commit e540c5a into main Aug 14, 2023
12 checks passed
@soloio-bulldozer soloio-bulldozer bot deleted the rlc-nil-check branch August 14, 2023 20:44
elcasteel added a commit that referenced this pull request Aug 15, 2023
* plugin updates and test

* gofmt

* review comments, do not append invalid action to returned list

* link to envoy docs in changelog
elcasteel added a commit that referenced this pull request Aug 15, 2023
…PR action (#8582)

* Reject ratelimit configs that are missing required values. (#8575)

* plugin updates and test

* gofmt

* review comments, do not append invalid action to returned list

* link to envoy docs in changelog

* Fix solo-apis action and small addition to rlc translation fix. (#8581)

* update changelog
sheidkamp pushed a commit that referenced this pull request Aug 22, 2023
…PR action (#8582)

* Reject ratelimit configs that are missing required values. (#8575)

* plugin updates and test

* gofmt

* review comments, do not append invalid action to returned list

* link to envoy docs in changelog

* Fix solo-apis action and small addition to rlc translation fix. (#8581)

* update changelog
sheidkamp pushed a commit that referenced this pull request Aug 22, 2023
* plugin updates and test

* gofmt

* review comments, do not append invalid action to returned list

* link to envoy docs in changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants