-
Notifications
You must be signed in to change notification settings - Fork 2
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
Handle rate limits by the Engine for LoadBalancer reconciliation #382
Conversation
This should reduce the API requests expected to be unsuccessful against the engine. Unfortunately, the only tests I've done were just manual against a given cluster, due to the complexity of the given methods. Closes: ANXKUBE-1281
cf7d615
to
7dcd654
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Does exactly what it promises.
Code Climate has analyzed commit 775c909 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 33.3% (50% is the threshold). This pull request will bring the total coverage in the repository to 56.4% (-0.3% change). View more on Code Climate. |
} else { | ||
// something was deleted successfully, allow retrying to delete other things in case it failed for conflicts | ||
allowRetry = true | ||
if api.IsRateLimitError(err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid deeply nested control flow statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried fixing this with a refactoring by extracting the error handling when destroying resources. @nachtjasmin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I mention that I hate codeclimate? 🙈
thanks!
┌────────────┬────────────────┬──────────┬────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────┐ │ Library │ Vulnerability │ Severity │ Status │ Installed Version │ Fixed Version │ Title │ ├────────────┼────────────────┼──────────┼────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────┤ │ libcrypto3 │ CVE-2024-12797 │ HIGH │ fixed │ 3.3.2-r4 │ 3.3.3-r0 │ openssl: RFC7250 handshakes with unauthenticated servers │ │ │ │ │ │ │ │ don't abort as expected │ │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2024-12797 │ ├────────────┤ │ │ │ │ │ │ │ libssl3 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────┘
This should reduce the API requests expected to be unsuccessful against the engine. Unfortunately, the only tests I've done were just manual against a given cluster, due to the complexity of the given methods.
Closes: ANXKUBE-1281
Checklist
Unreleased
section in CHANGELOG.mdReferences
Depends on anexia-it/go-anxcloud#438.
Community Note