-
Notifications
You must be signed in to change notification settings - Fork 85
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
workflows: new "CI house keeping" #1443
base: main
Are you sure you want to change the base?
Conversation
How I used the script to clean up images from my fork:
|
hey @fidencio ! you might be interested on that script as we are starting to publish kata containers images on ghcr.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated question, is there a risk we will be hitting the push/pull limit of ghcr.io?
LGTM overall, nit, s/imags/images in the commit msg
on: | ||
schedule: | ||
# Runs at 04:00 (UTC time) every day | ||
- cron: '0 4 * * *' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see 19 closed PRs within the last week and 56 within last month, wouldn't a weekly upkeep be more suitable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea @ldoktor! I will change it.
The e2e libvirt CI on pull request has pushed images to ghcr.io/confidential-containers/cloud-api-adaptor. This added the `ci_house_keeping.yaml` workflow to run daily to clean up unused caa imags (e.g. when the pull request is closed). Signed-off-by: Wainer dos Santos Moschetta <[email protected]>
e281900
to
bee970a
Compare
Rebased the code and changed the workflow to run weekly as suggested by @ldoktor |
Thank you @wainersm, it looks good to me although I wasn't able to test it due to permission issues so without seeing the json responses from GH I can not guarantee it's all correct. Anyway the approach to get all images and check if that PR is closed or not especially with PR caching seems good to me. One thing I don't understand is why don't we remove the old images on PR update directly? I mean this upkeep script would be still useful in case some PR fails to remove it for whatever reason so I believe this upkeep script should be here, but perhaps we could even try removing the images on PR update to faster remove the outdated images (at least if I understand it correctly) |
@ldoktor can you ptal and provide your review comments. |
Not really, it was just a suggestion that we might additionally use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, as I mentioned I don't have the permission to check it works properly but visually the code seems to be doing what is mentioned.
Maybe last nitpick, the ci_house_keeping.yaml
name is sensible, but since it's only about ghcr images it could something like ci_ghcr_periodic_cleanup.yaml
would be more appropriate. But we can re-name it once/if we have more house-keeping ci scripts ;-)
The e2e libvirt CI on pull request has pushed images to ghcr.io/confidential-containers/cloud-api-adaptor.
This added the
ci_house_keeping.yaml
workflow to run daily to clean up unused caa imags (e.g. when the pull request is closed).