From 1bb7f5ef3ef0ae93fba12fd6a7c15a9a7fef8c83 Mon Sep 17 00:00:00 2001 From: Chris B Chamberlain Date: Tue, 7 Oct 2025 15:27:29 +1300 Subject: [PATCH 1/3] add migration doc for model archive datastore setup; --- MIGRATION_v0.9.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 MIGRATION_v0.9.md diff --git a/MIGRATION_v0.9.md b/MIGRATION_v0.9.md new file mode 100644 index 0000000..552d661 --- /dev/null +++ b/MIGRATION_v0.9.md @@ -0,0 +1,49 @@ +# 0.9.0 Migration notes + +## Migration to new DynamopDB / S3 Blobstore + +Since version v0.9.x this API usesa dynamoDB/S3 data_store for the CompositeRupture zip archive, rather than bundling this file in the deployment. + +### Datastore setup + +Below is the one-time script output from the cli which creates the table and pushes up the archive file. + +``` +% AWS_PROFILE=chrisbc S3_BUCKET_NAME=nzshm22-solvis-graphql-api-prod REGION=ap-southeast-2 DEPLOYMENT_STAGE=prod poetry run cli -T -R ~/Downloads/NSHM_v1.0.4_CompositeSolution.zip NSHM_v1.0.4 +WARNING: optional `toshi` dependencies are not installed. +Running without `toshi` options +WARNING: geometry.section_distance() uses the optional dependency pyvista. +/Users/chrisbc/Library/Caches/pypoetry/virtualenvs/solvis-graphql-api-i3cqXqnb-py3.12/lib/python3.12/site-packages/pandera/_pandas_deprecated.py:160: FutureWarning: +2025-10-07 14:42:17 INFO congiguring BinaryLargeObjectModel with IS_OFFLINE: False TESTING: False +2025-10-07 14:42:17 INFO Found credentials in shared credentials file: ~/.aws/credentials +archive: /Users/chrisbc/Downloads/NSHM_v1.0.4_CompositeSolution.zip +model : NSHM_v1.0.4 +2025-10-07 14:42:17 INFO Found credentials in shared credentials file: ~/.aws/credentials +2025-10-07 14:42:18 INFO put the blob +2025-10-07 14:42:18 INFO Found credentials in shared credentials file: ~/.aws/credentials +2025-10-07 14:42:28 INFO .get() called +2025-10-07 14:42:28 INFO get object_blob from bucket +compared blob OK for NSHM_v1.0.4, +solvis_graphql_api cli uploaded solvis composite solution +``` + +### API A/B testing + +And below os the A/B test showing that Prod/Test APIs are working and agree. + +``` +chrisbc@MLX01 solvis-graphql-api % poetry run cli_ab_test WORK/ab.toml -A prod -B test -v +WARNING: optional `toshi` dependencies are not installed. +Running without `toshi` options +config `WORK/ab.toml` has service keys: dict_keys(['prod', 'test', 'dev']) +using a-key: `prod`, b-key: `test` +2025-10-07 14:46:04 INFO function: check_locations_by_id, a/b tests PASS +2025-10-07 14:46:04 INFO function: check_composite_rupture_detail, a/b tests PASS +2025-10-07 14:46:04 INFO function: check_about, a/b tests PASS +2025-10-07 14:46:05 INFO function: check_filter_ruptures, a/b tests PASS +2025-10-07 14:46:05 INFO function: check_filter_rupture_sections, a/b tests PASS +2025-10-07 14:46:05 INFO function: check_get_radii_set, a/b tests PASS +2025-10-07 14:46:06 INFO function: check_get_location_list, a/b tests PASS +2025-10-07 14:46:06 INFO function: check_get_parent_fault_names, a/b tests PASS +2025-10-07 14:46:06 INFO function: check_color_scale, a/b tests PASS +``` \ No newline at end of file From ebf679616a17f978c4c63713fb899f732b1cc1e8 Mon Sep 17 00:00:00 2001 From: Chris B Chamberlain Date: Tue, 7 Oct 2025 15:31:23 +1300 Subject: [PATCH 2/3] minor tweaks; --- MIGRATION_v0.9.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/MIGRATION_v0.9.md b/MIGRATION_v0.9.md index 552d661..0453ff5 100644 --- a/MIGRATION_v0.9.md +++ b/MIGRATION_v0.9.md @@ -1,8 +1,8 @@ # 0.9.0 Migration notes -## Migration to new DynamopDB / S3 Blobstore +## Migration to new DynamoDB/S3 blob store -Since version v0.9.x this API usesa dynamoDB/S3 data_store for the CompositeRupture zip archive, rather than bundling this file in the deployment. +Since version v0.9.x this API uses a dynamoDB/S3 data_store for the CompositeRupture zip archive, rather than bundling this file in the deployment. ### Datastore setup @@ -13,7 +13,6 @@ Below is the one-time script output from the cli which creates the table and pus WARNING: optional `toshi` dependencies are not installed. Running without `toshi` options WARNING: geometry.section_distance() uses the optional dependency pyvista. -/Users/chrisbc/Library/Caches/pypoetry/virtualenvs/solvis-graphql-api-i3cqXqnb-py3.12/lib/python3.12/site-packages/pandera/_pandas_deprecated.py:160: FutureWarning: 2025-10-07 14:42:17 INFO congiguring BinaryLargeObjectModel with IS_OFFLINE: False TESTING: False 2025-10-07 14:42:17 INFO Found credentials in shared credentials file: ~/.aws/credentials archive: /Users/chrisbc/Downloads/NSHM_v1.0.4_CompositeSolution.zip @@ -29,7 +28,7 @@ solvis_graphql_api cli uploaded solvis composite solution Date: Tue, 7 Oct 2025 15:50:47 +1300 Subject: [PATCH 3/3] Update MIGRATION_v0.9.md Co-authored-by: Chris DiCaprio --- MIGRATION_v0.9.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MIGRATION_v0.9.md b/MIGRATION_v0.9.md index 0453ff5..50564c4 100644 --- a/MIGRATION_v0.9.md +++ b/MIGRATION_v0.9.md @@ -28,7 +28,7 @@ solvis_graphql_api cli uploaded solvis composite solution