Skip to content

Conversation

@c19yamamoto
Copy link

@c19yamamoto c19yamamoto commented Nov 30, 2025

Issue # (if applicable)

none

Reason for this change

The functionality that enables the deletion of all images within an ECR Repository when the CDK stack is destroyed (configured via the emptyOnDelete, autoDeleteImages property) is currently only settable through the RepositoryProps constructor. This requires users to decide on the image cleanup behavior at the time of resource creation.

The use case for this change is to enable users to activate this capability after the repository has been created (e.g., inside an aspect, a custom method, or dynamically based on conditions), by exposing the internal logic through a public method.

Description of changes

The private method enableAutoDeleteImages() was changed to public

Describe any new or updated permissions being added

none

Description of how you validated changes

Add unit and integ tests.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Nov 30, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team November 30, 2025 07:27
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Nov 30, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter fails with the following errors:

❌ Features must contain a change to a test file.
❌ Features must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

@c19yamamoto c19yamamoto changed the title [WIP] feat(ecr): make enableAutoDeleteImages method public feat(ecr): make enableAutoDeleteImages method public Dec 10, 2025
@github-actions
Copy link
Contributor

TestsPassed ❌️SkippedFailed
Security Guardian Results
TestResult
No test annotations available

@github-actions
Copy link
Contributor

TestsPassed ❌️SkippedFailed
Security Guardian Results with resolved templates
TestResult
No test annotations available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants