acoustic-carpenter-78188
03/09/2026, 6:33 PMflytepropeller/pkg/controller/garbage_collector.go).
Design
1. Terminal labeling: When a TaskAction reaches a terminal state (Succeeded/Failed), stamp it with <http://flyte.org/termination-status=terminated|flyte.org/termination-status=terminated> and <http://flyte.org/completed-time=<UTC|flyte.org/completed-time=<UTC> hour> labels
2. Background GC loop: A manager.Runnable that periodically lists terminated TaskActions, filters by completed-time label (lexicographically ordered), and deletes expired ones
3. Configuration: GCConfig with Interval (how often GC runs) and MaxTTL (time-to-live for terminal TaskActions)
Key Design Decisions
• List + filter + delete (not DeleteAllOf): K8s label selectors don't support "less than" on string values, so we list all terminated TaskActions and filter client-side by hour label
• Separate metadata update: Labels require r.Update() (not r.Status().Update()). One extra API call per terminal transition, but only once per TaskAction lifetime
• Upgrade path: Pre-existing terminal TaskActions get labels on next reconcile via the terminal short-circuit path
Implementation
PR: #6994
flyteorg/flyteacoustic-carpenter-78188
03/11/2026, 5:01 AM