Drop the empty simulation-domain tables and retired association columns from the v2 schema
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
Línea de trabajo
Start with the v2 models in policyengine_api/data/v2/models/reports.py, simulations.py, and households.py, plus policyengine_api/data/v2/report_runs.py; first verify that #3960 is deployed and operators have confirmed the tables are empty in both environments. Then inspect the v2 Alembic migration and the named publication, qualification, metadata validation, and static check entry points. Done means the tables, enum types, and retired columns are dropped, remaining code no longer depends on the models, and validation prevents their return.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The Public API's v2 (Supabase) schema still has dormant copies of the simulation-domain tables: household_jobs, simulations, reports, report_runs and the 11 report-run output tables (aggregates, change_aggregates, budget_summary, decile_impacts, intra_decile_impacts, inequality, poverty, program_statistics, congressional_district_impacts, constituency_impacts and local_authority_impacts). Nothing writes to them. The simulation service will own jobs, reports and their results in its own simulation schema and will create the tables it needs there, so these copies and their SQLModel models only invite new code to start using the wrong tables. Proposals that build on v2 reports in the Public API, such as #3818's report_validations table, belong on the simulation service's report tables instead.
user_simulation_associations and user_report_associations also still have the country and label columns that Stage 12A retired and left nullable.
Proposed change
Once #3960 (which stops the application from using these tables and columns) is deployed to both environments, and once an operator has confirmed in both environments that the tables are empty:
- Remove the simulation-domain models (
policyengine_api/data/v2/models/reports.py,simulations.py, andHouseholdJobinhouseholds.py) and the unusedpolicyengine_api/data/v2/report_runs.py. - Add an autogenerated v2 Alembic revision that drops the 15 tables, their 8 native enum types and the 4 retired association columns.
catalog/publication.py: check only dataset-version rows before and after publication.household_migration_qualification.py: count the dropped tables by name for targets that still have them, instead of through the removed models.- Reject the dropped table names in the v2 metadata validation, and add a registered static check (
api.v2.simulation-tables-stay-removed) that fails if code imports the removed models again.
- Lenguaje dominante
- Python
- Estrellas
- 18
- Forks
- 33
- Merge medio
- 2 d 7 h
- PR fusionados (30 d)
- 28
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PolicyEngine/policyengine-api
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
PolicyEngine/policyengine-api#3911 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
PolicyEngine/policyengine-api#3910 ·
Los mantenedores suelen responder en 3 días
-
Stop using the simulation-domain v2 tables and retired association columns before they are droppedPosiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
PolicyEngine/policyengine-api#3960 ·
Los mantenedores suelen responder en 3 días
-
Make dual-write log failed v2 copies instead of returning HTTP 503Posiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
PolicyEngine/policyengine-api#3958 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
PolicyEngine/policyengine-api#3956 ·
Los mantenedores suelen responder en 3 días
Todos los issues de PolicyEngine/policyengine-api
Issues similares
-
bug documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
awslabs/visual-asset-management-system#514 ·
Los mantenedores suelen responder en 1 día
-
backend bug spec:REQ-053
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
nolte/kamerplanter#2547 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
EleutherAI/lm-evaluation-harness#4425 ·
Los mantenedores suelen responder en 1 día
-
Gemini: respect PLANNING_DISABLED=1 in lifecycle context hooksPosiblemente ocupada @AmariAugustin la tomó hoy. Abiertobug good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
OthmanAdi/planning-with-files#329 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
wr.dynamodb.read_items returns [{}] for a single partition value that does not existPosiblemente ocupada @auraseb la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
aws/aws-sdk-pandas#3520 ·
Los mantenedores suelen responder en 2 días