Skip to content

fix: down-policy not respected when resource is disabled via UI#6767

Open
Abzaek wants to merge 1 commit into
tilt-dev:masterfrom
Abzaek:fix/down-policy-disabled-resources
Open

fix: down-policy not respected when resource is disabled via UI#6767
Abzaek wants to merge 1 commit into
tilt-dev:masterfrom
Abzaek:fix/down-policy-disabled-resources

Conversation

@Abzaek
Copy link
Copy Markdown

@Abzaek Abzaek commented May 17, 2026

Summary

When a Kubernetes resource has tilt.dev/down-policy: keep and is disabled through the Tilt UI, the resource gets deleted anyway.

Root Cause

tilt down (in internal/cli/down.go) correctly checks for the down-policy annotation. However, when a resource is disabled via the Tilt UI, the KubernetesApply reconciler garbageCollect() method deletes dangling objects without checking for the annotation.

Fix

In garbageCollect(), skip objects with tilt.dev/down-policy: keep before appending to the delete list. This ensures the annotation is respected during both tilt down and resource disable/delete operations.

Fixes #6645

When a Kubernetes resource is disabled through the Tilt UI, the
garbageCollect() method deletes its dangling objects without checking
tilt.dev/down-policy. This causes resources with down-policy: keep
to be deleted despite the annotation.

Fix: skip dangling objects that have tilt.dev/down-policy: keep
during garbage collection.

Fixes tilt-dev#6645

Signed-off-by: Abdulazez A. <abzaeko@gmail.com>
@Abzaek Abzaek force-pushed the fix/down-policy-disabled-resources branch from 4d0f7b9 to f313129 Compare May 17, 2026 05:02
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.

down-policy not respected if resource is disabled

1 participant