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

controller: Prevent existing log group from stopping log retention #889

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ecpullen
Copy link
Contributor

@ecpullen ecpullen commented Feb 2, 2024

Issue number:
N/A

Description of changes:

If the log group testsys already exists in an account, then the controller errors because it is not able to create the log group. Instead, the controller should still try to archive the logs.

Testing done:

  • Test the controller without testsys log group existing
  • Test the controller with the testsys log group existing

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

})?;
.is_err()
{
trace!("Unable to create log group it is possible it already exists.");
Copy link
Contributor

Choose a reason for hiding this comment

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

A couple of things, you should log the error with {:?}.
You should check for the specific "it already exists" error condition and only ignore that, otherwise issues like authorization, etc could be difficult to diagnose.

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