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

Log management #237

Merged
merged 2 commits into from
Mar 23, 2023
Merged

Log management #237

merged 2 commits into from
Mar 23, 2023

Conversation

raylas
Copy link
Collaborator

@raylas raylas commented Mar 12, 2023

No description provided.

raylas and others added 2 commits March 11, 2023 20:31
Signed-off-by: sentential[bot] <bot@sentential>
@@ -51,8 +61,12 @@ def test_deploy_w_provisions(

image = aws_ecr_driver.get_image("0.0.1")
aws_lambda_driver.deploy(image, Architecture.system())
self.create_log_group(
aws_lambda_driver.log_group
) # Is this something that moto should be doing?
Copy link
Collaborator

Choose a reason for hiding this comment

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

https://docs.getmoto.org/en/latest/docs/services/cloudwatch.html

If it isn't exploding there's a good chance moto is handling this. The clients singleton all but ensures this. During test, everything is fed the test config and cannot escape moto.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Unrelated follow up:

In my readings this way of doing the clients is an anti-pattern. It's sort of a poor-mans dependency injection.

The thing is, in my explorations of "proper" solutions, I came to feel that the medicine was worse than the disease.

Am I right? 🤷‍♂️

Copy link
Collaborator

@bkeane bkeane left a comment

Choose a reason for hiding this comment

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

Lgtm

@raylas raylas merged commit 668fbc3 into master Mar 23, 2023
@raylas raylas deleted the log-retention branch March 23, 2023 02:36
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.

None yet

2 participants