Repository navigation
Conversation
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
Author
|
/test |
…fers in a loop The loop deferred response body closure resulting in connections being retained until the loop terminated. Put the body collection in a closure to allow the body to be closed after each iteration.
efd6
force-pushed
the
okta_deferred_in_loop
branch
from
November 25, 2026 01:19
2db7d13 to
502f3dc
Compare
efd6
marked this pull request as ready for review
November 26, 2026 00:35
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
marc-gr
requested changes
Nov 26, 2026
|
|
||
| return nil | ||
| }() | ||
| if resp.StatusCode == http.StatusTooManyRequests { |
Contributor
There was a problem hiding this comment.
cli.Do returns a nil resp on a transport error, and the closure returns that error, but resp.StatusCode is read here before err is checked, so a network failure now panics instead of returning the error. Checking err first fixes it, and also stops a lim.Update error from being dropped when the status is 429:
if err != nil {
return nil, nil, err
}
if resp.StatusCode == http.StatusTooManyRequests {
log.Warnw("received 429 Too Many Requests")
retryCount++
continue
}This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
How to test this PR locally
Related issues
Use cases
Screenshots
Logs