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

Handle rate limits by the Engine for LoadBalancer reconciliation #382

Merged
merged 5 commits into from
Feb 18, 2025

Conversation

nachtjasmin
Copy link
Contributor

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

References

Depends on anexia-it/go-anxcloud#438.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request

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
@nachtjasmin nachtjasmin force-pushed the joster/change-lwsvlqoswwvu branch from cf7d615 to 7dcd654 Compare February 13, 2025 14:35
Copy link
Contributor

@koflanx koflanx left a 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.

Copy link

codeclimate bot commented Feb 18, 2025

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) {
Copy link

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.

Copy link
Contributor

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

Copy link
Contributor Author

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    │                │          │        │                   │               │                                                          │
│            │                │          │        │                   │               │                                                          │
│            │                │          │        │                   │               │                                                          │
└────────────┴────────────────┴──────────┴────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────┘
@nachtjasmin nachtjasmin merged commit 6282449 into main Feb 18, 2025
7 of 9 checks passed
@nachtjasmin nachtjasmin deleted the joster/change-lwsvlqoswwvu branch February 18, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants