Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/CD_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ jobs:
--no-dev \
--output-file requirements.txt

- name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.CLOUD_DEPLOY_SERVICE_ACCOUNT_KEY }}

- name: Run Alembic migrations on staging database
env:
DB_DRIVER: "cloudsql"
Comment on lines 35 to 37

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Authenticate before Cloud SQL migrations/backfill

The workflow now runs the Alembic migration (and the backfill step right after it) before google-github-actions/auth, but DB_DRIVER=cloudsql uses the Cloud SQL connector which relies on Application Default Credentials set by that auth step. On GitHub-hosted runners that don’t already have ADC configured, uv run alembic upgrade head and the backfill will fail to open a Cloud SQL connection. Unless these steps are intended to run without GCP auth, the auth step needs to stay before the Cloud SQL actions.

Useful? React with 👍 / 👎.

Expand All @@ -57,6 +52,11 @@ jobs:
run: |
uv run python transfers/backfill/staging.py

- name: Authenticate to Google Cloud
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.CLOUD_DEPLOY_SERVICE_ACCOUNT_KEY }}

# Uses Google Cloud Secret Manager to store secret credentials
- name: Create app.yaml
run: |
Expand Down
Loading