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

🐛 Fix endless KMS retrieval loop. #4548

Merged
merged 1 commit into from
Aug 13, 2024
Merged

Conversation

preslavgerchev
Copy link
Contributor

If an err happens when we're fetching KMS key, we continue and do not break. This means we get to retry again, however if the error is consistent (say a 403) we will never exit this loop. Instead, let's break out of the loop if we encounter an error.

Copy link
Contributor

Test Results

3 097 tests   3 096 ✅  1m 46s ⏱️
  370 suites      1 💤
   28 files        0 ❌

Results for commit 7ed08e1.

Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @preslavgerchev

@@ -65,7 +65,7 @@ func (a *mqlAwsKms) getKeys(conn *connection.AwsConnection) []*jobpool.Job {
if Is400AccessDeniedError(err) {
log.Warn().Str("region", regionVal).Msg("error accessing region for AWS API")
}
continue
break
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check if we have more of those case?

@chris-rock chris-rock merged commit 20bed76 into main Aug 13, 2024
15 checks passed
@chris-rock chris-rock deleted the preslav/kms-break-loop branch August 13, 2024 16:41
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants