Skip to content

Keep production Modal workers warm#1526

Merged
anth-volk merged 2 commits into
mainfrom
codex/main-modal-worker-autoscaler
May 15, 2026
Merged

Keep production Modal workers warm#1526
anth-volk merged 2 commits into
mainfrom
codex/main-modal-worker-autoscaler

Conversation

@anth-volk
Copy link
Copy Markdown
Collaborator

@anth-volk anth-volk commented May 15, 2026

Fixes #1525

Summary

  • Keep a small warm worker pool for Modal main with min_containers=3, buffer_containers=2, and scaledown_window=600.
  • Leave non-main Modal environments without always-on workers.
  • Require MODAL_ENVIRONMENT during Modal release deploys and pass it through to worker app module import.
  • Clean up retired Modal worker apps by default in the weekly release shape and workflow dispatch default.
  • Update AI-facing Modal release guidance and the weekly update PR helper to use cleanup_target: retired.
  • Add focused tests for worker options, missing deploy environment validation, and weekly default cleanup behavior.

Testing

  • make format-check
  • uv run --extra dev pytest -vv --timeout=150 -rP tests/unit/modal_release/test_worker_app.py .github/scripts/test_modal_deploy_release.py
  • uv run --extra dev pytest -vv --timeout=150 -rP .github/scripts/test_resolve_modal_release_config.py tests/unit/modal_release/test_release_config.py tests/unit/modal_release/test_manifest.py .github/scripts/test_check_modal_release_body.py
  • bash -n .github/scripts/create_pr.sh
  • ruff check .github/scripts/test_resolve_modal_release_config.py policyengine_household_api/modal_release/release_config.py

Notes: make format-check printed a local Docker daemon warning while Make expanded docker helper variables, but ruff format --check . completed successfully. Repo-wide ruff check . currently fails on pre-existing lint issues outside this change set.

@anth-volk anth-volk marked this pull request as ready for review May 15, 2026 18:17
@anth-volk anth-volk merged commit cd5aa73 into main May 15, 2026
7 of 10 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.

Keep production Modal household API workers warm

1 participant