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.
…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.
Contributor
|
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 ↔ f353c251 · generated by oasdiff
…_passed fields, and update related logic for stage processing
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #PLEASE_TYPE_ISSUE_NUMBER
Summary
assessment_runwas a 1:N child for multi-config submission, which is no longer supported.assessmentdirectly, with 1:1 relationships in all environments.assessment.Checklist
Before submitting a pull request, please ensure that you mark these task.
upgrade → downgrade → upgradeexercised on a local DB with seeded pre-fold rows; backfill, error merge, key strip and recreated DDL verifiedAssessmentExecutionapp.api.mainloads; mypy shows 0 new errors (4 fixed)app/tests/assessment/test_api_*.pyupdated (separate step)Notes
Please add here if any other information is required for the reviewer.
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: 336 assessments, 336 runs, allBATCH, 0 duplicates). The child is redundant.PR 1 of 3. This PR lands the final schema and the minimal wiring so the live BATCH path reads and writes
assessmentdirectly. PR 2 deletes the retired RUN pipeline code; PR 3 is cleanups.Migration 086
assessmentgainsconfig_id(FK, NOT NULL),config_version(NOT NULL),total_items(NOT NULL),execution(JSONB, nullable for the future RESPONSE method).assessment_runin one idempotent statement.error_messagefolds intoexecution.error; bag keys the code no longer reads (stage_output_urls,provider,model,input_schema) are stripped.assessment.inputdropped (RUN-only, never written by BATCH).assessment_rundropped. Downgrade recreates it empty with the original DDL; rows come back from thepg_dumpsnapshot taken before upgrading.SET NOT NULLon purpose rather than migrating half.AssessmentExecutionPydantic model (
extra="forbid", int row keys) replaces theBatchRunStateTypedDict.ApiStage/StageKindmove intomodels/assessment/assessment_api.py.stage_kind()/next_stage()live on the model.Wiring
crud/assessment/api.py:create_assessmenttakes the pinned config,total_itemsand the seeded bag — one insert.save_execution_state/load_execution_stateonAssessment.create_execution,set_execution_batch_job,list_executions,list_assessments_with_executionremoved.services/assessment/api/{batch,results,result_files,submission}.py: operate on theassessmentrow. Provider/model resolved from the pinned config version; stage dump urls read fromresult_files.run_assessment_api_batchtakesassessment_id.runs.pyandassessments.pyrouters unregistered (RUN-only, no callers; modules deleted in PR 2).assessment.md+domain-map.mdupdated.API contract: unchanged. Frontend: no coordination needed (verified against
origin/main).Checklist
upgrade → downgrade → upgradeexercised on a local DB with seeded pre-fold rows; backfill, error merge, key strip and recreated DDL verifiedAssessmentExecutionapp.api.mainloads; mypy shows 0 new errors (4 fixed)app/tests/assessment/test_api_*.pyupdated (separate step)Deploy notes
pg_dump -t assessment_run --data-onlybefore migrating. The table is dropped; this is the rollback source.execution_id, which the new worker does not accept.Rollback:
alembic downgrade -1, restore the dump, redeploy the previous image.