Add the Simulation Entrypoint's own Postgres schema, persistence library and migration chain
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #847 di @anth-volk — chiusa senza merge
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 1
- Merge medio
- 1g 16h
- PR unite (30g)
- 60
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PolicyEngine/policyengine-sim-api
-
Update policyengine to 6.7.3Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 70/100
PolicyEngine/policyengine-sim-api#823 ·
I maintainer di solito rispondono entro 1 giorno
-
Integration tests fail due to missing UV virtual environment setupForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
PolicyEngine/policyengine-sim-api#314 ·
I maintainer di solito rispondono entro 1 giorno
-
Staging deployments do not promote their tested Simulation Entrypoint revisionForse già presa @anth-volk l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
PolicyEngine/policyengine-sim-api#893 ·
I maintainer di solito rispondono entro 1 giorno
-
Daily dependency update fails: merging main into the update branch produces a uv.lock that uv cannot parseForse già presa @anth-volk l’ha presa 1 giorno fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
PolicyEngine/policyengine-sim-api#889 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
PolicyEngine/policyengine-sim-api#884 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PolicyEngine/policyengine-sim-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
khuisman/mcp-gee-sweet#1166 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
lugassawan/swe-workbench#823 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
gramaziokohler/compas_timber#870 ·
-
security-scan-failure
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
semantica-agi/semantica#2089 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
autowarefoundation/autoware_carla_scenario#500 ·
I maintainer di solito rispondono entro 1 giorno