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

chore(ci): Clean up stale image tags #1818

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Conversation

spalladino
Copy link
Collaborator

Attempt at cleaning up image tags when a tag operation fails due to limit exceeded. The clean_image_tags loops over all image tags that look like a commit, and check if the commit is anywhere in git. If it isn't, it's because it belongs to a branch that got deleted (most likely, a PR that was merged) and we can safely kill it.

We can still theoretically hit the 1000 limit in this scenario, but I think it's a lot less likely. A local test run of the script showed that most image tags correspond to non-existing commits.

@ludamad
Copy link
Collaborator

ludamad commented Sep 1, 2023

LGTM

@spalladino spalladino force-pushed the palla/clean-image-tags branch from 400aa0f to 661d7a0 Compare September 5, 2023 19:24
@ludamad ludamad force-pushed the palla/clean-image-tags branch from f5373a6 to 661d7a0 Compare September 5, 2023 19:43
@ludamad ludamad merged commit 3c8b7b8 into master Sep 5, 2023
@ludamad ludamad deleted the palla/clean-image-tags branch September 5, 2023 19:44
ludamad pushed a commit that referenced this pull request Sep 5, 2023
🤖 I have created a new Aztec Packages release
---


##
[0.1.0-alpha58](v0.1.0-alpha57...v0.1.0-alpha58)
(2023-09-05)


### Miscellaneous

* **ci:** Clean up stale image tags
([#1818](#1818))
([3c8b7b8](3c8b7b8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants