awslabs / ecr-cleanup-lambda

A script to discover stale ECR images and take action on them with Lambda to help reduce costs.
Other
161 stars 96 forks source link

Images that matches -ignoretagsregex are still getting deleted #34

Open duydnguyen07 opened 4 years ago

duydnguyen07 commented 4 years ago

This issue happens when there is an image that is tagged with multiple tags.

For example, image with digest of sha:123 has tags of _master123 and _releast123, and the regex to ignore is _release__. So anything that matches _release__ should not be deleted. However, since the image with sha:123 is also tagged with master_123, it is deleted as well.

The expected behavior would be that this image is also ignored and not get deleted.

cablespaghetti commented 4 years ago

Also have this issue. Thanks for the fix!