Set up shadow pg-sync-service instance to populate managed db#2627
Conversation
|
Warning Review limit reached
More reviews will be available in 27 minutes and 3 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
@coderabbitai review @greptileai review |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
gh pr view 2627 --repo bluedotimpact/bluedot --json files,additions,deletions,body
echo "---DIFF---"
gh pr diff 2627 --repo bluedotimpact/bluedotLength of output: 4851 🏁 Script executed: #!/bin/bash
echo "=== Primary pg-sync-service definition ==="
rg -n "pg-sync-service" apps/infra/src/k8s/serviceDefinitions.ts -A 30 -B 2
echo "=== appPgConnectionDetails in postgres.ts ==="
rg -n "appPgConnectionDetails" apps/infra/src/k8s/postgres.ts -A 5 -B 5
echo "=== Full postgres exports ==="
grep -n "export" apps/infra/src/k8s/postgres.ts | head -40
echo "=== envVarSources ==="
grep -n "airtablePat\|alertsSlackBotToken\|PROD_ONLY\|WEBHOOK" apps/infra/src/k8s/serviceDefinitions.ts -A 2 -B 2 | head -60Length of output: 8539
Review of PR
|
Greptile SummaryThis PR adds a shadow
Confidence Score: 5/5Safe to merge — the shadow instance is additive, isolated to its own deployment and DB secret, and cannot affect the primary sync or the existing database. The change only adds a new Kubernetes deployment definition that writes to a separate managed database. The secret reference (appPgConnectionDetails.uri) is correctly backed by an existing Kubernetes secret. The intentional omission of PROD_ONLY_WEBHOOK_DELETION is well-reasoned and documented. The previously raised concern about APP_NAME and webhook registration was already confirmed to be a non-issue. No existing service definitions are modified. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant AT as Airtable Webhooks
participant Primary as bluedot-pg-sync-service
participant Shadow as bluedot-pg-sync-shadow (new)
participant OldPG as airtableSyncPg (in-cluster)
participant NewPG as appPg (managed DB)
AT->>Primary: Webhook event (shared)
AT->>Shadow: Same webhook event (shared)
Primary->>OldPG: Write synced data
Shadow->>NewPG: Write synced data
Note over Primary,Shadow: Each keeps its own in-memory cursor
Note over Shadow,NewPG: Enables cutover without sync gap
Reviews (2): Last reviewed commit: "Set up shadow pg-sync-service instance t..." | Re-trigger Greptile |
Vultr reports this cluster's version as empty, which breaks upgrade validation and re-poisons our Pulumi state on every read, so every infra deploy fails with a 422 trying to "upgrade" the cluster (incl. the revert in #2619). ignoreChanges:['version'] stops Pulumi attempting the rejected upgrade, so other infra changes (e.g. #2627) can deploy. Scoped to the version field only and removed once Vultr repairs the metadata, after which we resume the 1.35.5+1 upgrade. Tracking: #2618. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Description
See inline comment:
In practice when we deprecate the dual-database setup, we'll probably delete the old bluedot-pg-sync-service but keep and rename this one.
Issue
Fixes #2624
Developer checklist