feat: add image docker cleanup workflows#19
Merged
gabor-boros merged 1 commit intomainfrom Mar 28, 2026
Merged
Conversation
SE-6574 Signed-off-by: Gabor Boros <gabor@opencraft.com>
e97269a to
36cfe51
Compare
kaustavb12
reviewed
Mar 28, 2026
Comment on lines
+281
to
+291
| keep_tags = {item.tag for item in sorted_entries[:max_per_instance]} | ||
| else: | ||
| assert retention_days is not None | ||
| cutoff = today_utc - timedelta(days=retention_days) | ||
|
|
||
| for item in sorted_entries: | ||
| if item.build_date >= cutoff: | ||
| keep_tags.add(item.tag) | ||
|
|
||
| for item in filter(lambda item: item.tag not in keep_tags, sorted_entries): | ||
| delete_tags.add(item.tag) |
Member
There was a problem hiding this comment.
Do we need to get keep_tags first than then figure out the delete tags from it? Could we not figure out delete tags directly?
Collaborator
Author
There was a problem hiding this comment.
We could, but to me, this implementation looked clearer in intent as we add to delete tags at one place. If this is just a nit from your side, I would go ahead and fix later if it is necessary.
Member
|
LGTM 👍 @gabor-boros I have read through the code and overall it looks good to me. I haven't been able to test this though. |
gabor-boros
added a commit
that referenced
this pull request
Mar 30, 2026
SE-6574 Signed-off-by: Gabor Boros <gabor@opencraft.com>
gabor-boros
added a commit
that referenced
this pull request
Mar 30, 2026
SE-6574 Signed-off-by: Gabor Boros <gabor@opencraft.com>
gabor-boros
added a commit
that referenced
this pull request
Mar 30, 2026
SE-6574 Signed-off-by: Gabor Boros <gabor@opencraft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[SE-6574]
Add cleanup job to cluster template and template repository to get rid of old docker images.