Open
Conversation
added 8 commits
March 23, 2026 15:04
…egistration/Run FKs - Add VersionAlias enum (production, development) - Add WorkflowVersion table (version, definition_uri per workflow) - Add WorkflowVersionAlias table (named pointer to a version) - Re-point WorkflowRegistration FK from workflow.id to workflowversion.id - Re-point WorkflowRun FK from workflow.id to workflowversion.id - Remove version and definition_uri from Workflow table - Remove version from WorkflowSummary in pipeline models - Add new request/response schemas for versions and aliases - Update alembic/env.py imports - Autogenerated Alembic migration with data migration and full downgrade
…/run endpoints - Add create_workflow_version, get_workflow_versions, get_workflow_version_by_id - Add set_workflow_version_alias, get_workflow_version_aliases, delete_workflow_version_alias - Update create_workflow to no longer accept version/definition_uri - Update registration CRUD to use workflow_version_id with version validation - Update run CRUD to use workflow_version_id with version validation - Update workflow_to_public and workflow_run_to_public serialization - Add 3 version endpoints (POST/GET list/GET by id) - Add 3 alias endpoints (PUT/GET/DELETE) - Update registration endpoints to nest under versions - Update pipeline_to_public to build WorkflowSummary without version
- Rewrite test_workflows.py for new Workflow shape (no version/definition_uri) - Add test_workflow_versions.py (8 tests for version CRUD) - Add test_workflow_aliases.py (10 tests for alias CRUD) - Rewrite test_workflow_registrations.py (create version first, nested URLs) - Rewrite test_workflow_runs.py (create version first, body uses workflow_version_id) - Update test_pipeline_entity.py helper (remove definition_uri from Workflow) - Update test_qcmetrics.py helpers (WorkflowVersion creation for run tests)
…paration - Rewrite WORKFLOWS.md with new entities, ER diagram, and endpoint docs - Update PIPELINES.md design decisions for version-agnostic pipeline design - Update ER_DIAGRAM.md entities, relationships, constraints, and provenance section
…S.md - Combine ER diagrams, design decisions, database models, and API endpoints - Single unified reference for workflows, versions, aliases, registrations, runs, and pipelines - Fix stale version field in pipeline WorkflowSummary response examples - Remove superseded standalone files
- Rename WorkflowRegistration class/table/schemas to WorkflowDeployment - Rename all service functions: create/get/delete_workflow_deployment() - Rename all route URLs: /registrations -> /deployments, registration_id -> deployment_id - Update alembic/env.py import - Add Alembic migration: rename table + FK constraints (data-preserving) - Replace test_workflow_registrations.py with test_workflow_deployments.py - Update docs/ER_DIAGRAM.md and docs/WORKFLOWS_AND_PIPELINES.md - 416 tests pass
- Remove VersionAlias(str, enum.Enum) class and 'import enum' from models - Change alias field to str on WorkflowVersionAlias, WorkflowAliasSummary, WorkflowVersionAliasPublic - Update all service/route type hints from VersionAlias to str - Replace alias.value with alias in error messages - Change migration alias column from sa.Enum to AutoString - Replace test_set_alias_invalid_value (422) with test_set_alias_custom_value (accepts any string) - Update docs: enum→string in mermaid diagrams, field tables, and design rationale - 416 tests pass
Bare UUID() constructor calls in workflow services raised unhandled
ValueError when given non-UUID strings (e.g. 'not-a-uuid'), causing
FastAPI to return a 500 Internal Server Error.
Added _parse_uuid() helper that wraps UUID() in try/except and raises
HTTPException(400) with a descriptive message. Replaced all 7 bare
UUID() calls across get_workflow_by_id, get_workflow_version_by_id,
create_workflow_deployment, get_workflow_deployments,
delete_workflow_deployment, and get_workflow_run_by_id.
Added tests for invalid UUID (400) and nonexistent UUID (404) on
GET /workflows/{workflow_id}.
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.
This PR accomplishes the discussed changes to our workflow models:
Adds workflow versions, rather than storing version on the workflow itself; this means the workflow (eg WES Alignment) stays constant, but versions are updated.
Adds workflow version aliases - allows us to point to specific versions with aliases like "develop", "production" etc. like an AWS lambda function. Note - this was originally an enum, but following feedback was converted into a free string field in eeb5384.
Following feedback that it was annoying to have to make 2 calls and filter client side to get the external id of a specific workflow, we accept optional querystring parameters for GET /{workflow}/deployments endpoint like
GET /123-456/deployments?alias=production&engine=Arvadosto reduce to a single call with server-side filtering.Following feedback that the term registration wasn't very descriptive - workflow Registration is renamed Deployment throughout to reflect that it represents a specific deployment of the workflow to a platform.
Additional: