Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix/enterpriseportal/codyaccess: allow removing rate limit overrides#64376

Merged
bobheadxi merged 2 commits into
mainfrom
08-08-fix_enterpriseportal_codyaccess_allow_removing_rate_limit_overrides
Aug 8, 2024
Merged

fix/enterpriseportal/codyaccess: allow removing rate limit overrides#64376
bobheadxi merged 2 commits into
mainfrom
08-08-fix_enterpriseportal_codyaccess_allow_removing_rate_limit_overrides

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Aug 8, 2024

Copy link
Copy Markdown
Member

On double-checking the various Cody Gateway access management CRUD I noticed that I did not implement the ability to remove the override entirely properly - right now, removing a rate limit with field_mask and no values results in a zero-value rate limit rather than a null one as desired.

This change makes it so that if you provider a nil *_rate_limit object, all field paths for that object is also set to nil, removing the override and allowing the default active-license-plan-based rate limits to apply.

This also adds a minor adjustment to Cody Gateway to correctly handle zero durations for rate limit intervals, which should be treated as "no access".

Test plan

Unit/integration tests, and a manual test:

@bobheadxi bobheadxi marked this pull request as ready for review August 8, 2024 21:41
@bobheadxi bobheadxi requested review from a team and michaellzc August 8, 2024 21:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants