Repository navigation
feat(gcp): read-only access for every connection, metrics switch controls collection only - #1477
JeremyFunk wants to merge 7 commits into
Conversation
…rols collection only The setup script creates the read-only service account for every connection whenever the deployment has a Google identity, and only the cleanup script removes it. metrics_enabled now switches the key-metrics poller and resource sync alone, in Maple, and a connection may have both flags off for live queries only.
The key-metrics switch acts in Maple at once and skips the apply stage; the card asks for the setup script only for log forwarding and a missing read-only service account. Copy says live queries work on every connection.
…/gcp-live-query-access
Script-pending state comes from the read-only account alone, so a deployment without a Google identity is never stuck on setup pending; confirm label says when the script follows; v2 descriptions no longer read as contradicting.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
…/gcp-live-query-access
Billing is checked for every connection now that each gets the read-only account. Only Maple's reads need it, so a host project without billing gets a note and the rest of the setup instead of a stop.
Maple review🟢 Confidence 9/10 · safe to merge Makes the read-only service account part of every Google Cloud connection and reduces
Before merge
What was checked
|
Maple review🟢 Confidence 10/10 · safe to merge The head since the last review only regenerates the iOS OpenAPI spec: the Google Cloud group description now matches the v2 domain schema.
What was checked
|
Stacked on #1475 (
feat/gcp-promql-query). Live queries of Google Cloud metrics are offered for every connection, also when the 5-minute poller is off. This PR makes the setup script, the connector API and the card match that.What changes
Setup script (
gcp/setup-scripts.ts)metrics_enabledno longer changes the script.Connector API (
GcpConnectorService, v2 contract)metrics_enabledswitches the key-metrics poller and the hourly resource sync. It acts in Maple at once and needs no script run.metrics_enabledon is stillGcpMetricsUnavailableError(409), andlogs_enabledmust stay on (IntegrationsValidationError, 400). Such a deployment can't offer live queries or the poller, so a connection there has to forward logs.Card and Configure dialog
Docs (
integrations/gcp.md): updated the permissions, the switch table, the states tables and the self-hosting note, and added one sentence about live queries. The full live-query docs come in P3.Decisions
applied_metrics_enablednow means the read-only service account is in place, as the last setup or cleanup run reported it. The setup script still reports"metrics":trueafter setting up the account, and the cleanup script still reportsfalse. There is no DB migration and no receiver (Rust) change. Runs from before this change that reportedfalse(metrics off) correctly read as "no account": the card shows a pending change until the script runs again.metricsAvailable. Without it, a deployment with no Google identity would show "setup pending" forever.IntegrationsValidationError, becauseGcpMetricsUnavailableErrorcarriesparam: "metrics_enabled".Effect on existing connections
Known limit
Not verified without a live system: smoke checklist
applied_metrics_enabled=false): the card shows "Changes not applied", and after a re-run the account exists.MAPLE_GCP_SERVICE_ACCOUNT_EMAIL: Log forwarding is locked on, Key metrics is unavailable, and the card is not stuck on "setup pending".