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

refactor: Use Shared Rate Limiter Code #2145

Conversation

LeelaChacha
Copy link
Contributor

Closes #2026

@LeelaChacha LeelaChacha requested a review from a team as a code owner December 20, 2024 22:34
@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 20, 2024
cmd/main.go Outdated Show resolved Hide resolved
@kyma-bot kyma-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 29, 2024
@LeelaChacha
Copy link
Contributor Author

Reasons for adding a map for intended requeue errors:

  1. Not much overhead since it constant time complexity and it is the second condition in the if block, so if the error is nil, it won't waste cycles anyways.
  2. Can be extended in the future with other errors
  3. No function signatures had to be changed (SyncResources function can continue just returning an error, which makes sense instead of a boolean and an error)

@LeelaChacha LeelaChacha requested a review from ruanxin December 30, 2024 10:17
@kyma-bot kyma-bot added the lgtm Looks good to me! label Dec 30, 2024
@LeelaChacha LeelaChacha merged commit 6d903a3 into kyma-project:main Dec 30, 2024
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Research] make rate limiting works as expected
3 participants