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

feat: support inverting header matches for rate limit #4286

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

rudrakhp
Copy link
Contributor

What type of PR is this?

Feature changes for supporting inverting header matches for rate limiting.

What this PR does / why we need it:

Implements API changes proposed in #4176

Which issue(s) this PR fixes:

Ref #2193

@rudrakhp rudrakhp requested a review from a team as a code owner September 19, 2024 19:29
@rudrakhp rudrakhp force-pushed the ratelimit_invert_match_headers branch 2 times, most recently from b5feec5 to bb18b2e Compare September 19, 2024 19:31
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review.

Project coverage is 65.72%. Comparing base (d1cc0ba) to head (5c645de).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
internal/xds/translator/local_ratelimit.go 50.00% 1 Missing and 1 partial ⚠️
internal/gatewayapi/backendtrafficpolicy.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4286   +/-   ##
=======================================
  Coverage   65.71%   65.72%           
=======================================
  Files         200      200           
  Lines       24128    24141   +13     
=======================================
+ Hits        15856    15866   +10     
- Misses       7138     7139    +1     
- Partials     1134     1136    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arkodg
Copy link
Contributor

arkodg commented Sep 19, 2024

the PR looks good, can you add some tests in https://github.com/envoyproxy/gateway/tree/main/internal/gatewayapi/testdata & https://github.com/envoyproxy/gateway/tree/main/internal/xds/translator/testdata

@rudrakhp rudrakhp force-pushed the ratelimit_invert_match_headers branch 6 times, most recently from 5c4a215 to 059134c Compare September 29, 2024 09:19
@rudrakhp rudrakhp force-pushed the ratelimit_invert_match_headers branch 4 times, most recently from c8357d4 to e7f4310 Compare October 8, 2024 17:27
arkodg
arkodg previously approved these changes Oct 9, 2024
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks !

would be great to see some e2e and docs in follow up PRs

@arkodg arkodg requested review from a team October 9, 2024 02:12
@zirain
Copy link
Contributor

zirain commented Oct 9, 2024

can you make linter happy?

zhaohuabing
zhaohuabing previously approved these changes Oct 9, 2024
@arkodg
Copy link
Contributor

arkodg commented Oct 9, 2024

can you make linter happy?

here are the errors


internal/xds/translator/testdata/in/xds-ir/ratelimit.yaml
  Error: 74:13 [indentation] wrong indentation: expected 10 but found 12
  Error: 75:17 [indentation] wrong indentation: expected 14 but found 16
  Error: 86:9 [indentation] wrong indentation: expected 6 but found 8
  Error: 87:13 [indentation] wrong indentation: expected 10 but found 12
  Error: 88:26 [new-line-at-end-of-file] no new line character at the end of file

@rudrakhp rudrakhp dismissed stale reviews from zhaohuabing and arkodg via 5c645de October 9, 2024 17:21
@rudrakhp rudrakhp force-pushed the ratelimit_invert_match_headers branch from e7f4310 to 5c645de Compare October 9, 2024 17:21
@rudrakhp
Copy link
Contributor Author

rudrakhp commented Oct 9, 2024

@arkodg @zirain done!

@arkodg arkodg merged commit ae6787e into envoyproxy:main Oct 10, 2024
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants