Repository navigation
Conversation
Additive expand step toward folding the 1:1 assessment_run child into its parent. Adds the seven run-only columns to assessment (nullable, no table rewrite), backfills them from assessment_run, and leaves assessment_run untouched so deployed code keeps working. The code switch and the child-table drop follow in a separate PR.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
OpenAPI changes 🔴 11 breaking changesCaution Downstream consumers may need an update before merging. Breaking changes ·
|
| Method | Path | Change | |
|---|---|---|---|
| 🔴 | GET |
/api/v1/assessment/assessments |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/assessments/{assessment_id} |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/assessments/{assessment_id}/results |
api path removed without deprecation |
| 🔴 | POST |
/api/v1/assessment/assessments/{assessment_id}/retry |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/runs |
api path removed without deprecation |
| 🔴 | POST |
/api/v1/assessment/runs |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/runs/{run_id} |
api path removed without deprecation |
| 🔴 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/runs/{run_id}/results |
api path removed without deprecation |
| 🔴 | POST |
/api/v1/assessment/runs/{run_id}/resume |
api path removed without deprecation |
| 🔴 | POST |
/api/v1/assessment/runs/{run_id}/retry |
api path removed without deprecation |
Full changelog · 33
| Method | Path | Change | |
|---|---|---|---|
| 🔴 | GET |
/api/v1/assessment/assessments |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/assessments/{assessment_id} |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/assessments/{assessment_id}/results |
api path removed without deprecation |
| 🔴 | POST |
/api/v1/assessment/assessments/{assessment_id}/retry |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/runs |
api path removed without deprecation |
| 🔴 | POST |
/api/v1/assessment/runs |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/runs/{run_id} |
api path removed without deprecation |
| 🔴 | PATCH |
/api/v1/assessment/runs/{run_id}/post-processing |
api path removed without deprecation |
| 🔴 | GET |
/api/v1/assessment/runs/{run_id}/results |
api path removed without deprecation |
| 🔴 | POST |
/api/v1/assessment/runs/{run_id}/resume |
api path removed without deprecation |
| 🔴 | POST |
/api/v1/assessment/runs/{run_id}/retry |
api path removed without deprecation |
| 🟢 | — |
— |
removed the schema APIResponse_AssessmentPublic_ |
| 🟢 | — |
— |
removed the schema APIResponse_AssessmentResponse_ |
| 🟢 | — |
— |
removed the schema APIResponse_AssessmentRunPublic_ |
| 🟢 | — |
— |
removed the schema APIResponse_AssessmentRunResponse_ |
| 🟢 | — |
— |
removed the schema APIResponse_list_AssessmentPublic__ |
| 🟢 | — |
— |
removed the schema APIResponse_list_AssessmentRunPublic__ |
| 🟢 | — |
— |
removed the schema APIResponse_list_dict_str__Any___ |
| 🟢 | — |
— |
removed the schema AssessmentAttachment |
| 🟢 | — |
— |
removed the schema AssessmentExecutionPublic |
| 🟢 | — |
— |
removed the schema AssessmentPublic |
| 🟢 | — |
— |
removed the schema AssessmentResponse |
| 🟢 | — |
— |
removed the schema AssessmentRunCounts |
| 🟢 | — |
— |
removed the schema AssessmentRunCreate |
| 🟢 | — |
— |
removed the schema AssessmentRunPublic |
| 🟢 | — |
— |
removed the schema AssessmentRunResponse |
| 🟢 | — |
— |
removed the schema AssessmentRunStat |
| 🟢 | — |
— |
removed the schema AssessmentRunSummary |
| 🟢 | — |
— |
removed the schema InputBinding |
| 🟢 | — |
— |
removed the schema RunExecution |
| 🟢 | — |
— |
removed the schema Stage |
| 🟢 | — |
— |
removed the schema StageStatus |
| 🟢 | — |
— |
a breaking change was detected but the version is still 0.5.0 |
main ↔ 246270ec · generated by oasdiff
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ve legacy RUN pipeline - Merged AssessmentRun into Assessment, simplifying the data model and removing unnecessary complexity. - Updated AssessmentExecution to encapsulate execution state and related data, replacing BatchRunState. - Refactored error handling and result file management to streamline error reporting and file uploads. - Adjusted API routes and documentation to reflect the removal of the RUN method and the focus on BATCH and RESPONSE methods. - Enhanced type annotations and improved code readability across various service modules. - Updated submission handling to ensure consistent execution state management and error handling.
|
Superseded by the renamed branch; see the new draft PR on |
Issue
Closes #PLEASE_TYPE_ISSUE_NUMBER
Summary
assessment_runwas a 1:N child, causing redundancy due to the console no longer offering multi-config submission.assessment_runcolumns intoassessment, resulting in a 1:1 relationship.assessment.assessment_runwhile keeping it and application code untouched.Checklist
Before submitting a pull request, please ensure that you mark these task.
alembic upgrade 085:086 --sql)uv run alembic upgrade headagainst a dev DB, thendowngrade -1, thenupgrade headSELECT COUNT(*) FROM assessment WHERE config_id IS NULL AND method <> 'RESPONSE'returns 0Notes
Follow-up PR (not this one): switch
crud/services/celery/routesfromAssessmentRunto the newassessmentcolumns, delete the dead/assessment/runs*routes, renameassessment_runtoassessment_run_legacy, and drop it after a release cycle.Original PR description
Issue
Closes #PLEASE_TYPE_ISSUE_NUMBER
Summary
assessment_runwas built as a 1:N child so one submission could fan out to up to four configs. The console no longer offers multi-config submission and the API-client path always creates exactly one execution, so the tables are 1:1 in every environment (prod: 334 assessments, 334 runs, 0 duplicates) and the child is redundant.This PR is the additive half of folding
assessment_runintoassessment:assessment:config_id,config_version,total_items,batch_job_id,execution,post_processing_config,error_message. All nullable, no server default, soADD COLUMNis catalog-only (no rewrite, no long lock).configandbatch_job(ON DELETE SET NULL) plusidx_assessment_configand a partialidx_assessment_batch_job, mirroring the indexes onassessment_run.assessment_runin one statement guarded byconfig_id IS NULL, so a re-run copies only what is missing.assessment_runand all application code untouched. Current prod code keeps reading and writing the child table; the new columns are inert until the follow-up PR switches reads/writes and drops the child.No code change, no model change, no API contract change. Safe to deploy independently.
Checklist
alembic upgrade 085:086 --sql)uv run alembic upgrade headagainst a dev DB, thendowngrade -1, thenupgrade headSELECT COUNT(*) FROM assessment WHERE config_id IS NULL AND method <> 'RESPONSE'returns 0Notes
Follow-up PR (not this one): switch
crud/services/celery/routesfromAssessmentRunto the newassessmentcolumns, delete the dead/assessment/runs*routes, renameassessment_runtoassessment_run_legacy, and drop it after a release cycle.