-
Notifications
You must be signed in to change notification settings - Fork 3
Add devcontainer and container GC pipeline #25
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
Conversation
03424c9 to
3e3960e
Compare
Summary of ChangesHello @cgwalters, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the project's infrastructure by introducing a robust development container setup and a centralized system for managing container images. The primary goal is to provide a seamless and consistent development experience, especially for Codespaces users, while also automating the cleanup of stale container images in the GitHub Container Registry to maintain efficiency and reduce storage costs. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
3e3960e to
dd06aeb
Compare
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.
Code Review
This pull request introduces a devcontainer setup and a container image garbage collection mechanism. The changes include adding configuration files for the devcontainer, a Rust-based tool for container image management, and associated automation scripts. The review focuses on correctness and maintainability, with suggestions for improvements in error handling and code clarity.
dd06aeb to
7cd6ad9
Compare
crates/xtask/src/container_gc.rs
Outdated
| @@ -0,0 +1,278 @@ | |||
| //! Container image garbage collection for GHCR. | |||
| //! | |||
| //! Deletes old container images from GitHub Container Registry based on age. | |||
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.
There of course are probably other tools to do this...I didn't search really hard. The AI generated code here looked plausible to me though.
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.
maybe itd be easier to just use an existing workflow like this one rather than try to code a quick rust script?
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.
Been using this one with success: https://github.com/dataaxiom/ghcr-cleanup-action
Here's our implementation: https://github.com/ublue-os/bluefin/blob/main/.github/workflows/clean.yml
Github's SLA is 90 days, but I've never seen it garbage collect so we just do rolling 90 days and clean out everything else.
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! For now I went with Sean's one because I have a bias for Rust and I had done the switch before seeing your comment, but if we hit issues it'd likely make sense to switch and share a bit more code!
|
OK yeah the main thing here is getting |
4d5dbe1 to
b2866e9
Compare
Even if we dont get codespaces working, a devcontainer setup for local development still is valuable! |
6fdc498 to
56f6478
Compare
|
Awesome, so this devcontainer works e2e for me in a Github Codespace now! |
56f6478 to
0ccd288
Compare
|
(I looked around and apparently there's also a competing https://devfile.io - might make sense to handle both) |
0ccd288 to
d0acf3c
Compare
Motivated by having a good Codespaces default UX. This repo will also contain our centralized container image GC. Assisted-by: Cursor (Claude Sonnet 4.5) Signed-off-by: Colin Walters <walters@verbum.org>
d0acf3c to
452b6c6
Compare
SNThrailkill
left a comment
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.
LGTM! I tried to open this in a codespace but I guess GitHub is having issues. Looking forward to trying this out.
Motivated by having a good Codespaces default UX.
This repo will also contain our centralized container image GC.