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

[8.15](backport #41583) x-pack/filebeat/input/entityanalytics/provider/okta: Rate limiting fixes #41900

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 5, 2024

Proposed commit message

x-pack/filebeat/input/entityanalytics/provider/okta: Rate limiting fixes

- Separate rate limits by endpoint.
- Stop requests until reset when `x-rate-limit-remaining: 0`.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Discussion

Can be reviewed commit-by-commit.

The reason a new rate.Limiter needs to be created when x-rate-limit-remaining: 0 is that while rate.Limiter allows updating of the rate and burst, it doesn't allow clearing of existing tokens.

Disruptive User Impact

None.

Related issues

…xes (#41583)

- Separate rate limits by endpoint.
- Stop requests until reset when `x-rate-limit-remaining: 0`.

(cherry picked from commit 4e19d09)

# Conflicts:
#	x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go
#	x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta_test.go
@mergify mergify bot requested a review from a team as a code owner December 5, 2024 08:59
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Dec 5, 2024
Copy link
Contributor Author

mergify bot commented Dec 5, 2024

Cherry-pick of 4e19d09 has failed:

On branch mergify/bp/8.15/pr-41583
Your branch is up to date with 'origin/8.15'.

You are currently cherry-picking commit 4e19d09ab2.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   CHANGELOG.next.asciidoc
	new file:   x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/ratelimiter.go
	new file:   x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/ratelimiter_test.go
	modified:   x-pack/filebeat/input/entityanalytics/provider/okta/okta.go
	modified:   x-pack/filebeat/input/entityanalytics/provider/okta/okta_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta.go
	both modified:   x-pack/filebeat/input/entityanalytics/provider/okta/internal/okta/okta_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 5, 2024
@botelastic
Copy link

botelastic bot commented Dec 5, 2024

This pull request doesn't have a Team:<team> label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport conflicts There is a conflict in the backported pull request needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant