feat(CI): Add a github action to build the sandbox image and push to GHCR#8670
Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @richieforeman, 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 transitions the build and publication process for the sandbox Docker image from its previous Google Cloud Build setup to a new GitHub Actions workflow. This change centralizes the CI/CD pipeline within GitHub, utilizing GitHub Container Registry (GHCR) for image hosting, which aims to streamline development operations and improve maintainability.
Highlights
- CI/CD Migration: The sandbox Docker image build and push process has been migrated from Google Cloud Build to a new GitHub Actions workflow.
- New GitHub Action: A new composite GitHub Action,
.github/actions/push-sandbox/action.yaml, has been introduced to encapsulate the entire build and push logic for the sandbox image. - Container Registry Update: The
sandboxImageUriinpackage.jsonhas been updated to point to GitHub Container Registry (GHCR) instead of the previous Google Container Registry (GCR) path. - Build Script Refinement: A minor correction was made in
scripts/build_sandbox.jsto ensure consistent variable usage (finalImageName) when tagging the Docker image during the build process.
Using Gemini Code Assist
The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces a GitHub Action to build and push the sandbox Docker image to GHCR, migrating the process from existing scripts. The changes are a good step towards automating the release process. My review has identified a critical issue in package.json where a configuration change is made in the wrong file, which will cause the new workflow to fail. I've also pointed out a couple of high-severity maintainability issues in the new action.yaml file related to input naming and duplicate step names that could cause confusion. Please see my detailed comments for suggestions on how to address these points.
|
Size Change: -2 B (0%) Total Size: 17.3 MB ℹ️ View Unchanged
|
mattKorwel
left a comment
There was a problem hiding this comment.
Generally this looks good. But we should take out the package.json change until later in the process.
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
| `${sandboxCommand} build ${buildCommandArgs} ${ | ||
| process.env.BUILD_SANDBOX_FLAGS || '' | ||
| } --build-arg CLI_VERSION_ARG=${npmPackageVersion} -f "${dockerfile}" -t "${imageName}" .`, | ||
| } --build-arg CLI_VERSION_ARG=${npmPackageVersion} -f "${dockerfile}" -t "${finalImageName}" .`, |
There was a problem hiding this comment.
what precitipates this change? this looks like something that might break a sandbox script or something. did you validate that sandboxing still runs here?
There was a problem hiding this comment.
Yes, it didn't work without this actually. I think this was a pre-existing bug in the script.
mattKorwel
left a comment
There was a problem hiding this comment.
blocking to ask for changes just to verify non breaking for sandboxing
0f76dd7 to
d00d948
Compare
1d8423b to
aa68ec5
Compare
…GHCR (google-gemini#8670) Co-authored-by: matt korwel <matt.korwel@gmail.com>
…GHCR (google-gemini#8670) Co-authored-by: matt korwel <matt.korwel@gmail.com>
…ndbox image and push to GHCR (google-gemini#8670)
…GHCR (google-gemini#8670) Co-authored-by: matt korwel <matt.korwel@gmail.com>
…GHCR (#8670) Co-authored-by: matt korwel <matt.korwel@gmail.com>
TLDR
Wraps the old sandbox scripts that lived in cloud build and moves that workflow to GHA
Dive Deeper
Testing Matrix
Linked issues / bugs
Part of #3691