Skip to content

[DPC-5272] add additional logging to ecr-cleanup lambda#425

Open
lukey-luke wants to merge 2 commits intomainfrom
ls/dpc-5272-sweeper-alerts-logging
Open

[DPC-5272] add additional logging to ecr-cleanup lambda#425
lukey-luke wants to merge 2 commits intomainfrom
ls/dpc-5272-sweeper-alerts-logging

Conversation

@lukey-luke
Copy link
Copy Markdown
Contributor

@lukey-luke lukey-luke commented Mar 19, 2026

🎫 Ticket

DPC-5272

🛠 Changes

  • add additional logging statement at end of lambda_handler() to indicate lambda has completed
  • add unit test to ensure completion message is emitted

ℹ️ Context

🧪 Validation

  • see test_lambda_function.py
    • pytest passes locally
  • verified that log message shows up in Splunk from test environment:
    • Note: expect log messages to show up under /aws/lambda/<subscriber-team>-<env>-ecr-cleanup in the future (flagged in context section above)
Screenshot 2026-03-19 at 4 37 25 PM

@lukey-luke lukey-luke requested a review from a team as a code owner March 19, 2026 20:37
@lukey-luke lukey-luke requested a review from a team March 19, 2026 20:39
@jdettmannnava
Copy link
Copy Markdown
Contributor

Unsure why the low-effort version, when the ticket you wrote indicates much more effort?

@lukey-luke
Copy link
Copy Markdown
Contributor Author

Unsure why the low-effort version, when the ticket you wrote indicates much more effort?

@jdettmannnava Good question — I scoped this small on purpose for a couple of reasons: first, to avoid stepping on your PR with a larger diff (#410), and second, because getting DPC-5296 done sooner is the real priority. Once that move to using a module is completed, DPC as well as other teams can benefit from independent monitoring of the shared lambda code.

Jose-verdance
Jose-verdance previously approved these changes Mar 23, 2026
Copy link
Copy Markdown

@Jose-verdance Jose-verdance left a comment

Choose a reason for hiding this comment

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

LGTM!

@lukey-luke lukey-luke force-pushed the ls/dpc-5272-sweeper-alerts-logging branch from 0a4acd8 to 94010ab Compare March 25, 2026 23:53
@lukey-luke
Copy link
Copy Markdown
Contributor Author

I made a couple updates to cover failures in the response for list_tasks() and batch_delete_images(). When there are failures "error" on the message will trigger the splunk alert conditions for "DPC Prod - ECR Cleanup Failure" or "DPC Test - ECR Cleanup Failure"

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.

5 participants