Summary
Migrate solvis-graphql-api from Graphene 3 / Flask / serverless-wsgi to Strawberry / FastAPI / Mangum — the 4th and final sibling, run last because it adds the two biggest deltas: a container (ECR) Lambda and a PynamoDB ORM.
Epic: GNS-Science/nshm-toshi-api#359
Runbook: nshm-toshi-api/docs/MIGRATION_RUNBOOK.md
Worked log: docs/MIGRATION_LOG.md (branch migrate/strawberry)
Owner: @chrisbc
Phase 0 inventory — done
Captured in docs/MIGRATION_LOG.md. Key findings (several easier than the runbook's §A4 framing):
- PynamoDB is a single model —
BinaryLargeObjectModel (5 attrs) already wrapped by a hand-written BinaryLargeObject class. Convert to pydantic + boto3 behind the unchanged wrapper API.
- Container entry is the serverless-wsgi
handler.py workaround → Mangum replaces it; update Dockerfile CMD + serverless image.command.
- Repo already ships a cross-stage differential validator (
ab_test/ + cli_ab_test, 9 query checks) → reuse as the Phase 5 validation tool and corpus seed.
- moto-based tests already exist → no testcontainers.
- Still on poetry;
.yarnrc.yml lacks the age gate; both serverless-s3-local + serverless-dynamodb load at boot (runbook §4.7 risk); heavy container image (matplotlib/solvis/shapely).
- Secrets posture = repo-level static AWS keys + single
TEST env (the Model §4.2 caveat, not AWS_TEST/AWS_PROD).
Plan (tailored — full detail in the log)
Status
Phase 0 inventory complete; branch pushed and awaiting the external poetry2uv run before Phase 1 code begins.
Summary
Migrate
solvis-graphql-apifrom Graphene 3 / Flask / serverless-wsgi to Strawberry / FastAPI / Mangum — the 4th and final sibling, run last because it adds the two biggest deltas: a container (ECR) Lambda and a PynamoDB ORM.Epic: GNS-Science/nshm-toshi-api#359
Runbook:
nshm-toshi-api/docs/MIGRATION_RUNBOOK.mdWorked log:
docs/MIGRATION_LOG.md(branchmigrate/strawberry)Owner: @chrisbc
Phase 0 inventory — done
Captured in
docs/MIGRATION_LOG.md. Key findings (several easier than the runbook's §A4 framing):BinaryLargeObjectModel(5 attrs) already wrapped by a hand-writtenBinaryLargeObjectclass. Convert to pydantic + boto3 behind the unchanged wrapper API.handler.pyworkaround → Mangum replaces it; updateDockerfileCMD + serverlessimage.command.ab_test/+cli_ab_test, 9 query checks) → reuse as the Phase 5 validation tool and corpus seed..yarnrc.ymllacks the age gate; bothserverless-s3-local+serverless-dynamodbload at boot (runbook §4.7 risk); heavy container image (matplotlib/solvis/shapely).TESTenv (the Model §4.2 caveat, not AWS_TEST/AWS_PROD).Plan (tailored — full detail in the log)
migrate/strawberrypoetry2uvskill (running externally on the branch).yarnrc.ymlage gate; drop serverless-wsgi-uvworkflows; removebranches:filtercli_ab_testprod-vs-new differential validation; promote + prod watch; file runbook feedback PRStatus
Phase 0 inventory complete; branch pushed and awaiting the external
poetry2uvrun before Phase 1 code begins.