Add Cloud Run deployment workflow with sidecar support#10
Conversation
Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Summary of ChangesHello @MrOrz, 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 establishes a robust CI/CD pipeline for deploying a multi-container application to Google Cloud Run. It introduces a templated service definition for a Node.js frontend and a Python backend sidecar, alongside GitHub Actions workflows for automated deployments to production and ephemeral preview environments for pull requests. This significantly streamlines the deployment process and improves developer experience by providing automated previews and cleanup. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Activity
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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a Cloud Run deployment workflow with a multi-container service definition, which is a great step towards automating deployments. The service.template.yaml is well-structured for a sidecar pattern. My review includes suggestions to enhance the service's reliability and configurability by adding resource limits, liveness probes, and making autoscaling settings more flexible for different environments.
| image: ${BACKEND_IMAGE} | ||
| env: | ||
| - name: PORT | ||
| value: "8000" |
| startupProbe: | ||
| tcpSocket: | ||
| port: 8000 |
There was a problem hiding this comment.
While the startupProbe is great for ensuring the container starts correctly, consider adding a livenessProbe as well. A liveness probe helps Cloud Run detect if your container has become unresponsive (e.g., due to a deadlock) and needs to be restarted, improving the service's reliability.
startupProbe:
tcpSocket:
port: 8000
livenessProbe:
tcpSocket:
port: 8000
initialDelaySeconds: 15
periodSeconds: 30Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
|
@jules encountered this timeout issue. Is it because our port is hard coded? |
No, hardcoding the port ( The timeout issue is likely because the backend application crashed on startup due to missing environment variables (which I had previously commented out), causing the I have just pushed an update to
This should resolve the DEADLINE_EXCEEDED error. |
Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
|
@jules now I am faced with this when running action: I want to specify the env vars using GitHub repository secrets and specify it on cloudrun deploy. |
Understood. The previous setup relied on Google Secret Manager for these variables, which requires granting the Since you want to use GitHub repository secrets directly at deployment time instead, I've updated the This bypasses Secret Manager entirely for Cloud Run deployment while still keeping the secrets out of the codebase. |
Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
Co-authored-by: Antigravity <antigravity@gemini.google.com>
The adk web command was looking inside 'cofacts-ai/cofacts-ai' for the agent, which caused the error. Modified the adk Dockerfile to use '.' as the base directory instead of 'cofacts-ai', which ensures the agent can be loaded properly. Co-authored-by: Antigravity <antigravity@google.com>
Dynamically fetch current traffic tags from Cloud Run and merge them into the new traffic block. This prevents `gcloud run services replace` from inadvertently clearing out tags (preview URLs) setup by other active pull requests when a new PR or master deployment occurs. Co-authored-by: Antigravity <antigravity@google.com>
Co-authored-by: Antigravity <antigravity@google.com>
d3e74fa to
ebd22ae
Compare
service.template.yamlfor multi-container Cloud Run service (Node.js ingress + Python ADK sidecar)..github/workflows/deploy.ymlfor CI/CD:cofacts-aiservice on push tomaster(100% traffic).pr-<number>)..github/workflows/preview-cleanup.ymlto remove PR traffic tags and deactivate deployments on PR close.PR created automatically by Jules for task 3681228675650959013 started by @MrOrz