Repository navigation
docs(relay): director Cloud SQL sidecar enablement and rollback - #27461
Conversation
…un on staging The 0% apply revision is not started by Cloud Run, so the first sidecar boot is the deploy's rollback candidate. A new log-based metric can take minutes to appear, so its alert policy can fail the first apply. Both observed on staging 2026-10-11.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🟡 Moderate · up to The production rollout cannot be executed reliably from the runbook as written; document the required rehome-generation and predecessor-digest inputs before merging. Pre-merge checks |
|
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
0fc32206-4142-489d-80fd-b0d364ccfec6
📒 Files selected for processing (1)
cloud/docs/orca-relay-operations.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
| 1. Plan with exactly these targets and review it: `google_cloud_run_v2_service.relay`, the three | ||
| `relay_director_database_url` resources (secret, version, accessor), | ||
| `google_logging_metric.relay_event_loop_stall` and | ||
| `google_monitoring_alert_policy.relay_event_loop_stall`. Expect `5 to add, 1 to change`. The |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use complete Terraform target addresses.
The three relay_director_database_url entries are not valid Terraform target addresses. Replace them with the declared resource addresses, such as google_secret_manager_secret.relay_director_database_url, google_secret_manager_secret_version.relay_director_database_url, and google_secret_manager_secret_iam_member.relay_director_database_url_accessor. Otherwise, an operator cannot run the documented targeted plan as written.
| 4. Dispatch the director deploy workflow with the **serving** image digest, | ||
| `shape-baseline-revision=<that revision>` and `confirmation=ADOPT_RELAY_DIRECTOR_TERRAFORM_SHAPE`. | ||
| The deploy compares its candidates with that revision's shape instead of the serving one, and | ||
| refuses an image change, an identity bootstrap, a topology change or pruning in the same run. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Document all required workflow inputs.
When an operator supplies only the serving digest, shape-baseline-revision, and confirmation, the director workflow still lacks required inputs. The production workflow requires additional placement, reserve, shadow-cell, pruning, rehome-generation, bootstrap, and predecessor values. Dispatch can therefore fail input validation.
Suggested fix
--- "a/cloud/docs/orca-relay-operations.md"
+++ "b/cloud/docs/orca-relay-operations.md"
@@ -488,8 +488,12 @@
3. The apply creates a 0% revision (the service declares no traffic block). Cloud Run does **not**
start it: it reads `Ready` with reason `Retired` and logs nothing, so it proves the template
parses, not that the sidecar boots. Record its name; it is `status.latestCreatedRevisionName`.
-4. Dispatch the director deploy workflow with the **serving** image digest,
- `shape-baseline-revision=<that revision>` and `confirmation=ADOPT_RELAY_DIRECTOR_TERRAFORM_SHAPE`.
+4. Dispatch the director deploy workflow with all required inputs. Set
+ `image-digest` to the **serving** image digest,
+ `shape-baseline-revision=<that revision>`, and
+ `confirmation=ADOPT_RELAY_DIRECTOR_TERRAFORM_SHAPE`. Also provide the
+ required `regional-placement`, `reserve`, `shadow-cell`, `pruning`,
+ `rehome-generation`, `bootstrap`, and `predecessor` inputs.
The deploy compares its candidates with that revision's shape instead of the serving one, and
refuses an image change, an identity bootstrap, a topology change or pruning in the same run.
The first real sidecar boot is the deploy's `selector-rollback` candidate, health-checked before| Rollback: the pre-sidecar revision survives (shape adoption refuses pruning) and keeps its own | ||
| `/cloudsql` connection and socket secret, so `gcloud run services update-traffic <service> | ||
| --to-revisions=<pre-sidecar revision>=100` restores it. No workflow owns that move; in production it | ||
| needs approval and the rollout lease. The next deploy then refuses until a reviewed apply with the | ||
| variable `false` and a deploy that adopts that apply's revision. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
The rollback note claims a deploy guard that does not exist.
The production workflow accepts an empty baseline input. When the input is empty, directorShapeBaseline uses the current serving revision instead of refusing the deploy. An operator can therefore dispatch a later deploy without applying Terraform with the sidecar variable set to false.
This can cause the deploy to adopt the rolled-back pre-sidecar revision as its baseline while Terraform still describes the sidecar shape. The runbook should not state that the next deploy refuses. It should document the actual prerequisite or add an explicit guard.
…sed drill and the rollout lease
ELI5
This writes down, in the relay operations guide, how to switch the relay director to the database proxy sidecar from #27406 and how to roll it back. Staging ran it on 2026-10-11, and two steps from #27406's description turned out to be wrong.
What Changed
A new
Director Cloud SQL transport (proxy sidecar)section incloud/docs/orca-relay-operations.md, with these corrections:selector-rollbackcandidate, health-checked before any traffic moves.404 Cannot find metric(s), and a separate apply a few minutes later succeeded.Why
The sequence lived only in the merged PR's description, and two of its claims were wrong. Production enablement should follow what actually happened on staging.
Linked Issue
N/A (internal relay follow-up).
Visual Proof
N/A: documentation only.
Testing
N/A: documentation only. Every claim comes from the staging enablement on 2026-10-11:
orca-cloud-relay-staging-00080-xrw's conditions00177-qurAI Disclosure
N/A (internal contributor).
Agent skill upstream boundary
Checklist