Add the Simulation Entrypoint's own Postgres schema, persistence library and migration chain
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
- #847 par @anth-volk — fermée sans fusion
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 15/100
Piste de recherche
Start by reading the repository rule sim.stage12.no-migration-chain and the existing migration and deploy workflows. The issue names libs/policyengine-simulation-persistence, migrations/, and GET /ready as the main entry points; map their existing conventions before changing them. Done means the migration chain passes upgrade, check, downgrade, and upgrade on fresh PostgreSQL, deploy applies it before the candidate, and the existing pass-through routes and Stage 12 comparison still behave as before.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Context
Step 1 of the API v2 migration (item 1A-2) gives the Simulation Entrypoint its own durable state in the v2 Postgres database. Today the repository rule sim.stage12.no-migration-chain forbids any Alembic chain here: the only tables the simulation services touch are the temporary Stage 12 comparison tables, which the Public API owns and migrates.
Scope
- Replace
sim.stage12.no-migration-chainwith ownership rules for the Simulation Entrypoint's own schema:- one Alembic chain at
migrations/, schemasimulation, version tablesimulation.alembic_version; - the Modal executor and gateway never depend on the persistence library;
- no Modal secret or deployment receives a simulation database URL (the Stage 12 secret stays the only database credential in Modal until Stage 12 is removed).
- one Alembic chain at
- Add
libs/policyengine-simulation-persistencewith an initial revision, and a CI job that runs the chain's upgrade,alembic check, downgrade and upgrade on a fresh PostgreSQL. - Add a deploy job that applies the migrations before the Simulation Entrypoint candidate deploys, using a migrator URL that only that job receives.
- Give the Simulation Entrypoint
SIMULATION_DATABASE_URL(runtime role) from Secret Manager, and report the database's migration revision inGET /ready.
The old-gateway pass-through routes and the Stage 12 comparison must behave exactly as before; nothing in production reads or writes the new schema yet.
Operator prerequisites (both environments, before merge)
Merging to main deploys staging and then production, and the deploy requires these:
- Create the
simulation_migratorandsimulation_runtimedatabase roles in the staging and production v2 databases.simulation_migratormust be able to create thesimulationschema (or the schema must be created in advance and owned by it). - Store the migrator URL as the
SIMULATION_MIGRATION_DATABASE_URLsecret in this repository'sbetaandprodGitHub environments. - Store the runtime URL in Secret Manager in the Simulation Entrypoint's Google Cloud project, readable only by
sim-entry-beta-runtimeandsim-entry-prod-runtime(and listable by the deploy service account), and set its name as theSIMULATION_DATABASE_URL_SECRET_NAMEvariable inbetaandprod.
- Langage dominant
- Python
- Étoiles
- 1
- Forks
- 1
- Merge moyen
- 1 j 16 h
- PR mergées (30 j)
- 60
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PolicyEngine/policyengine-sim-api
-
Update policyengine to 6.7.3Peut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 2/5 Une demi-journée Accessibilité débutants 70/100
PolicyEngine/policyengine-sim-api#823 ·
Les mainteneurs répondent en général sous 1 jour
-
Integration tests fail due to missing UV virtual environment setupPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
PolicyEngine/policyengine-sim-api#314 ·
Les mainteneurs répondent en général sous 1 jour
-
Staging deployments do not promote their tested Simulation Entrypoint revisionPeut-être pris @anth-volk l’a pris aujourd’hui. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
PolicyEngine/policyengine-sim-api#893 ·
Les mainteneurs répondent en général sous 1 jour
-
Daily dependency update fails: merging main into the update branch produces a uv.lock that uv cannot parsePeut-être pris @anth-volk l’a pris aujourd’hui. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
PolicyEngine/policyengine-sim-api#889 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
PolicyEngine/policyengine-sim-api#884 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de PolicyEngine/policyengine-sim-api
Issues similaires
-
infrastructure
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
khuisman/mcp-gee-sweet#1152 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
backroom bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
ditto-assistant/ditto-subnet#3069 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
open-webui/open-webui#32901 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
0.3.3 bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour