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

x-pack/filebeat/i.../entitya.../.../okta: Avoid a negative request rate #40267

Merged

Conversation

chrisberkhout
Copy link
Contributor

@chrisberkhout chrisberkhout commented Jul 16, 2024

Proposed commit message

x-pack/filebeat/i.../entitya.../.../okta: Avoid a negative request rate (#)

This is the minimal change necessary to fix the following problem.

Around the time of a rate limit reset, if current time is after the
reset time returned in response headers, the rate limiting code will
set a negative target rate, and if that's done at a time when no
request budget has accumulated, it will not recover and will wait
forever.

The issue linked below lists other fixes and improvements that could be made the the Okta entity analytics rate limiting code. This PR is a version that should go into the next release to relieve the impact if the other changes aren't ready yet.

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.

Related issues

@chrisberkhout chrisberkhout added bugfix Team:Security-Service Integrations Security Service Integrations Team labels Jul 16, 2024
@chrisberkhout chrisberkhout requested a review from efd6 July 16, 2024 16:21
@chrisberkhout chrisberkhout self-assigned this Jul 16, 2024
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jul 16, 2024
Copy link
Contributor

mergify bot commented Jul 16, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @chrisberkhout? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@chrisberkhout chrisberkhout added backport-v8.14.0 Automated backport with mergify backport-8.15 Automated backport to the 8.15 branch with mergify labels Jul 16, 2024
@chrisberkhout
Copy link
Contributor Author

Are those release labels correct?

@chrisberkhout chrisberkhout force-pushed the okta-ea-ratelimit-minimal-fix branch from 07d3de2 to 22994a7 Compare July 22, 2024 10:53
@chrisberkhout chrisberkhout force-pushed the okta-ea-ratelimit-minimal-fix branch from 22994a7 to ab4a31e Compare August 8, 2024 09:26
@chrisberkhout chrisberkhout marked this pull request as ready for review August 8, 2024 09:26
@chrisberkhout chrisberkhout requested a review from a team as a code owner August 8, 2024 09:27
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@chrisberkhout chrisberkhout enabled auto-merge (squash) August 8, 2024 09:28
@chrisberkhout chrisberkhout merged commit 5087dd4 into elastic:main Aug 8, 2024
17 of 19 checks passed
mergify bot pushed a commit that referenced this pull request Aug 8, 2024
…te (#40267)

This is the minimal change necessary to fix the following problem.

Around the time of a rate limit reset, if current time is after the
reset time returned in response headers, the rate limiting code will
set a negative target rate, and if that's done at a time when no
request budget has accumulated, it will not recover and will wait
forever.

(cherry picked from commit 5087dd4)
mergify bot pushed a commit that referenced this pull request Aug 8, 2024
…te (#40267)

This is the minimal change necessary to fix the following problem.

Around the time of a rate limit reset, if current time is after the
reset time returned in response headers, the rate limiting code will
set a negative target rate, and if that's done at a time when no
request budget has accumulated, it will not recover and will wait
forever.

(cherry picked from commit 5087dd4)
@chrisberkhout chrisberkhout deleted the okta-ea-ratelimit-minimal-fix branch August 8, 2024 11:46
chrisberkhout pushed a commit that referenced this pull request Aug 8, 2024
…te (#40267) (#40460)

This is the minimal change necessary to fix the following problem.

Around the time of a rate limit reset, if current time is after the
reset time returned in response headers, the rate limiting code will
set a negative target rate, and if that's done at a time when no
request budget has accumulated, it will not recover and will wait
forever.
chrisberkhout pushed a commit that referenced this pull request Aug 8, 2024
…id a negative request rate (#40459)

This is the minimal change necessary to fix the following problem.

Around the time of a rate limit reset, if current time is after the
reset time returned in response headers, the rate limiting code will
set a negative target rate, and if that's done at a time when no
request budget has accumulated, it will not recover and will wait
forever.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.15 Automated backport to the 8.15 branch with mergify backport-v8.14.0 Automated backport with mergify bugfix Team:Security-Service Integrations Security Service Integrations Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants