Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Upgrade the v1 Cloud SQL schema and seed the v2 database side by side in the release run

Fermée
#4,129 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

@anth-volk y travaille déjà.

Depuis le 29/10/2026.

  • #4130 par @anth-volk — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
25/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
cloud, github-actions, google-cloud, python
Domaine
ci-cd, cloud

Piste de recherche

Read the workflow files migrate-v1-cloud-sql.yml and seed-v2-database.yml, then inspect the staging and candidate deploy dependencies described in the issue. Start by comparing the staging and production job dependencies; done means both database jobs can start together in each environment, candidates still wait for both, and the migration skill documents the parallel order and partial-upgrade outcome. Pull request #4130 is already open.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Problem

In a Public API release run, seed-v2-staging-database needs migrate-v1-staging-cloud-sql, and seed-v2-production-database needs migrate-v1-production-cloud-sql, so each environment's v1 schema upgrade (about 2 minutes) and v2 seeding (about 6 minutes) run one after the other, on the path to production.

Neither job reads the other's database:

  • migrate-v1-cloud-sql.yml signs in to Google Cloud with the database migration service account, starts the Cloud SQL Auth Proxy, and runs migrate_v1_cloud_sql.sh, which reads the Cloud SQL migration credentials from Secret Manager, takes a backup when revisions are pending, upgrades and verifies the v1 schema.
  • seed-v2-database.yml has no Google Cloud sign-in, no Cloud SQL proxy and no v1 credentials. Its steps (validate_database_environment.sh supabase, the three qualify_v2_* scripts, migrate_v2_metadata_schema.sh, reconcile_v2_privileges.py and publish_v2_metadata_catalog.py) read only V2_MIGRATION_DATABASE_URL or V2_DATA_WRITE_DATABASE_URL, and import only v2 modules.

The order came in with the Stage 9 catalog (#3808, 78e380bbd), when the seeding job's predecessor waited for the single v1 upgrade job of the time; the production one did not wait for any v1 upgrade. #3813 (f410bcac1) split the v1 upgrade per environment and made both seeding jobs wait for theirs. Neither pull request nor the migration docs give a reason; docs/migration/stage-10-v2-policies.md and stage-11-v2-households.md only require both schemas before the candidate is built.

Expected behaviour

  • In each environment, the v1 upgrade and the v2 seeding start together.
  • Each Cloud Run candidate deploy needs both, so no candidate is built until both databases are upgraded. deploy-cloud-run-staging already needs both; deploy-cloud-run-candidate needs the production v1 upgrade as well as the production seeding.
  • Both jobs keep their environments (staging-database or production-database for the v1 upgrade, staging or production for the seeding) and secrets: inherit.
  • docs/engineering/skills/alembic-migrations.md records the order, and that a release that stops can leave either database upgraded without the other.

Expected saving: about 3.8 minutes per release (the measured v1 upgrade times, 2.0 in staging and 1.8 in production).

Langage dominant
Python
Étoiles
18
Forks
33
Merge moyen
2 j 3 h
PR mergées (30 j)
72

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de PolicyEngine/policyengine-api

Toutes les issues de PolicyEngine/policyengine-api

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.