Add the Simulation Entrypoint's own Postgres schema, persistence library and migration chain
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 15/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 1
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 53
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PolicyEngine/policyengine-sim-api
-
Update policyengine to 6.7.3Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 70/100
PolicyEngine/policyengine-sim-api#823 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Integration tests fail due to missing UV virtual environment setupCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
PolicyEngine/policyengine-sim-api#314 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add the simulation report tables (reports and report_results)Có thể đã có người làm @anth-volk đã nhận 1 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
PolicyEngine/policyengine-sim-api#846 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add the simulation job store and background result collection without leasesCó thể đã có người làm @anth-volk đã nhận 1 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
PolicyEngine/policyengine-sim-api#845 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
v2 Modal household functions for every country in the PolicyEngine.py bundleCó thể đã có người làm @anth-volk đã nhận 1 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
PolicyEngine/policyengine-sim-api#840 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PolicyEngine/policyengine-sim-api
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
[Device Support Request] HOBEIAN ZG-204ZL (Tuya PIR motion sensor with illuminance)Có thể đã có người làm @lenucksi đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
zigpy/zha-device-handlers#5493 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
drevendev/BeautifulRepo#42 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
writerslogic/holographic-memory#93 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
antoine-tena/kiln#47 ·
Maintainer thường phản hồi trong vòng 1 ngày