Skip to content

Track Modal routing version in calculate analytics#1542

Merged
anth-volk merged 3 commits into
mainfrom
codex/add-analytics-routing-version
May 20, 2026
Merged

Track Modal routing version in calculate analytics#1542
anth-volk merged 3 commits into
mainfrom
codex/add-analytics-routing-version

Conversation

@anth-volk
Copy link
Copy Markdown
Collaborator

Fixes #1541

Summary

  • add nullable requested_version and resolved_channel analytics fields for calculate request and variable rows
  • pass Modal gateway routing metadata through internal worker dispatch metadata rather than trusting public request headers
  • expose the new fields and filters in the calculate analytics endpoint and OpenAPI spec

Testing

  • make format-check exits 0; local Docker daemon warning is printed by the Makefile preamble
  • uv run pytest tests/unit/endpoints/test_analytics_endpoint.py tests/unit/endpoints/test_household.py tests/unit/modal_release/test_gateway.py tests/unit/modal_release/test_worker_dispatch.py tests/unit/data/test_alembic_migrations.py tests/unit/data/test_analytics_setup.py tests/unit/models/test_analytics_models.py

Notes

  • Alembic revision was generated via uv run alembic revision --autogenerate -m "add calculate analytics routing version" against a disposable SQLite analytics DB, then renamed to the repo timestamp revision format.
  • Older/direct/GCP-style requests without Modal dispatch metadata store null routing fields.

@anth-volk anth-volk marked this pull request as ready for review May 20, 2026 14:53
@anth-volk anth-volk merged commit 465b4dd into main May 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track requested and resolved Modal versions in calculate analytics

1 participant