Open
Conversation
taterhead247
approved these changes
Apr 2, 2026
Contributor
taterhead247
left a comment
There was a problem hiding this comment.
Looks straight forward. In line with what was done with Auth and Codex.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for connecting to the F3 Data Warehouse using the Google Cloud SQL Node.js Connector, making it possible to use secure, authenticated connections without exposing a public IP. The changes introduce new environment variables and update the database connection logic to support both direct and connector-based modes. Several scripts and configuration files are updated to use the new connection method.
👋 TL;DR
Adding another way to connect to the F3 SQL db after we locked down IP access.
🔎 Details
Cloud SQL Connector integration:
@google-cloud/cloud-sql-connectordependency and related configuration topackage.jsonandpnpm-lock.yaml. [1] [2].env.local.sampleandapphosting.yamlto include new environment variables for Cloud SQL Connector configuration (e.g.,WAREHOUSE_DB_CONNECTION_MODE,CLOUD_SQL_WAREHOUSE_CONNECTION_NAME,WAREHOUSE_DB_USER, etc.). [1] [2]Database connection logic:
drizzle/f3-data-warehouse/db.tsto support both direct and Cloud SQL Connector connection modes, with connection pooling, lazy initialization, and a newclose()method for cleanup.src/lib/env.tsto only requireF3_DATA_WAREHOUSE_URLwhen in direct connection mode.Script updates:
prune-regions.ts,prune-workouts.ts,seed-regions.ts,seed-workouts.ts) to use the newgetDbasync function for obtaining a database instance, ensuring compatibility with both connection modes. [1] [2] [3] [4] [5] [6]🥜 GIF