-
Notifications
You must be signed in to change notification settings - Fork 0
ci: Cloud Run tunings and pipeline enhancement #763
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
WalkthroughIntroduces PR commit markers in the pull request template, adjusts Cloud Run deploy flag from service-min-instances=3 to 1 in backend workflow, and adds a new workflow to sync commit diffs into PR bodies using technote-space/pr-commit-body-action@v1. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
.github/workflows/sync-commit-diffs.yaml (1)
21-21: Pin 3rd‑party action to a commit SHA (supply-chain hardening).v1 is mutable; pin to a specific SHA to prevent supply‑chain drift. This mirrors the security bot’s note.
Apply (replace with actual commit SHA):
- uses: technote-space/pr-commit-body-action@v1 + uses: technote-space/pr-commit-body-action@<commit-sha>Retrieve the latest SHA for the v1 branch/tag:
#!/bin/bash # Get the latest commit SHA for the v1 ref gh api repos/technote-space/pr-commit-body-action/commits --jq 'map(select(.commit.message | test("Merge|release|bump")|not)) | .[0].sha' -f sha=v1
🧹 Nitpick comments (2)
.github/workflows/backend.yaml (1)
67-71: Scaling trade-off check (cold starts vs. cost).Min instances = 1 reduces cost vs. 3 but still prevents scale-to-zero. Confirm this aligns with SLOs; if acceptable to allow cold starts, consider 0.
.github/workflows/sync-commit-diffs.yaml (1)
3-6: Add concurrency to avoid PR body race updates.Prevents overlapping runs from reordering or clobbering the PR body.
Apply near the top level:
name: Sync commit diff to PRs on: pull_request: workflow_dispatch: +concurrency: + group: pr-commit-body-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
app-diagram.drawio.svgis excluded by!**/*.svg
📒 Files selected for processing (3)
.github/PULL_REQUEST_TEMPLATE.md(1 hunks).github/workflows/backend.yaml(1 hunks).github/workflows/sync-commit-diffs.yaml(1 hunks)
🔇 Additional comments (3)
.github/PULL_REQUEST_TEMPLATE.md (1)
8-9: Confirm markers match the action’s expected placeholders.Ensure technote-space/pr-commit-body-action targets and replaces content between these exact markers; if not, set its inputs accordingly.
.github/workflows/sync-commit-diffs.yaml (1)
7-10: Fork PR behavior: verify write permissions.Editing PR bodies on forked PRs often lacks write perms even with pull-requests: write. Confirm you only need this for same-repo PRs or gate by repository_owner == sender.login.
.github/workflows/backend.yaml (1)
67-67: Use the correct Cloud Run flag: --min (service-level) or --min-instances (revision-level).gcloud run deploy accepts --min for service-level minimum instances and --min-instances for revision-level; --service-min-instances is not the documented deploy flag and appears only in some alpha/multi-region subcommands. (cloud.google.com)
- If you intend a service-level minimum, change to: flags: '--min=1'
- If you intend a revision-level minimum, change to: flags: '--min-instances=1'
Location: .github/workflows/backend.yaml (line 67)
Likely an incorrect or invalid review comment.
|
As the CI for applying this PR had not been triggered since no files changed in |
|
Also, as Cloud Run has several options on minimal instances: Regarding the option for revision-level minimal instances, we manually updated with 25-09-22 10:46:36 git/hwakabh.github.io [main] % gcloud run services update gh-pages-api-server --region=us-central1 --min-instances=1
✓ Deploying... Done.
✓ Creating Revision...
✓ Routing traffic...
Done.
Service [gh-pages-api-server] revision [gh-pages-api-server-00108-5rs] has been deployed and is serving 100 percent of traffic.
Service URL: https://gh-pages-api-server-1037550336239.us-central1.run.app
# Check
25-09-22 10:47:08 git/hwakabh.github.io [main] % gcloud run services describe gh-pages-api-server --region=us-central1
✔ Service gh-pages-api-server in region us-central1
commit-sha:ff862e653d01be44420e7162ddfd80d42b72fd74 managed-by:github-actions
URL: https://gh-pages-api-server-1037550336239.us-central1.run.app
Ingress: all
Traffic:
100% LATEST (currently gh-pages-api-server-00108-5rs)
Service-level Min Instances: 1
Last updated on 2025-09-22T01:47:04.826226Z by hrykwkbys1024@gmail.com:
Revision gh-pages-api-server-00108-5rs
commit-sha:ff862e653d01be44420e7162ddfd80d42b72fd74 managed-by:github-actions
Container api-1
Image: us-central1-docker.pkg.dev/hwakabh-dev/ghcr/hwakabh/gh-pages-api:latest
Port: 8080
Memory: 512Mi
CPU: 1000m
Env vars:
MAIL_API_KEY *****
TUMBLR_CONSUMER_KEY *****
Startup Probe:
TCP every 240s
Port: 8080
Initial delay: 0s
Timeout: 240s
Failure threshold: 1
Type: Default
Service account: 1037550336239-compute@developer.gserviceaccount.com
Concurrency: 80
Min Instances: 1
Max Instances: 100
Timeout: 300s |
Issue/PR link
N/A
What does this PR do?
Describe what changes you make in your branch:
(Optional) Additional Contexts
Describe additional information for reviewers (i.e. What does not included)
N/A
Summary by CodeRabbit