Skip to content

Commit 37319e5

Browse files
committed
Clean up retired Modal apps by default
1 parent 55bb7ab commit 37319e5

7 files changed

Lines changed: 14 additions & 9 deletions

File tree

.github/scripts/create_pr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Related to #1178
3636
modal_release:
3737
new_app_target: frontier
3838
promote_existing_frontier: true
39-
cleanup_target: none
39+
cleanup_target: retired
4040
\`\`\`
4141
4242
## Version Updates

.github/scripts/test_resolve_modal_release_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def test_resolve_release_uses_weekly_default_for_empty_workflow_dispatch():
6969
assert resolved.should_deploy is True
7070
assert resolved.source == "workflow-dispatch-inputs"
7171
assert resolved.config is not None
72+
assert resolved.config.cleanup_target == "retired"
7273

7374

7475
def test_resolve_release_skips_regular_push_even_with_pr_config():
@@ -130,3 +131,5 @@ def test_resolve_release_uses_weekly_default_when_no_pr_body_exists():
130131

131132
assert resolved.should_deploy is True
132133
assert resolved.source == "weekly-default"
134+
assert resolved.config is not None
135+
assert resolved.config.cleanup_target == "retired"

.github/workflows/deploy-staged.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
cleanup_target:
2424
description: "Modal app group to stop after updating the manifest"
2525
required: true
26-
default: none
26+
default: retired
2727
type: choice
2828
options:
2929
- none

changelog.d/1525.changed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Keep a small warm Modal worker pool for the production environment.
1+
Keep a small warm Modal worker pool for the production environment and clean up retired Modal worker apps by default.

docs/engineering/skills/modal-release-prs.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ block:
1919
modal_release:
2020
new_app_target: frontier
2121
promote_existing_frontier: true
22-
cleanup_target: none
22+
cleanup_target: retired
2323
```
2424
2525
Allowed values:
@@ -40,13 +40,15 @@ different deployment behavior:
4040
modal_release:
4141
new_app_target: frontier
4242
promote_existing_frontier: true
43-
cleanup_target: none
43+
cleanup_target: retired
4444
```
4545

4646
This deploys the new worker to `frontier`, promotes the previous `frontier` to
4747
`current`, and moves the previous `current` into the manifest's `retired`
48-
history. Retired apps are not deleted unless `cleanup_target: retired` is
49-
explicitly configured.
48+
history. The default weekly release shape uses `cleanup_target: retired`, so
49+
apps in the retired history are stopped after the manifest is updated. Use
50+
`cleanup_target: none` only when the user explicitly asks to preserve retired
51+
worker apps after release.
5052

5153
Do not use PR labels, branch names, model-specific tags, or title prefixes to
5254
control Modal release behavior. The PR body YAML block is the source of truth.

policyengine_household_api/modal_release/release_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def default_weekly_config() -> ModalReleaseConfig:
116116
return ModalReleaseConfig(
117117
new_app_target=NewAppTarget.FRONTIER,
118118
promote_existing_frontier=True,
119-
cleanup_target=CleanupTarget.NONE,
119+
cleanup_target=CleanupTarget.RETIRED,
120120
)
121121

122122

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)