acoustic-carpenter-78188
03/10/2026, 8:31 PMMaxTTL > 0 when GC is enabled (Interval > 0). Setting MaxTTL to 0 or a negative value returns an error.
We could instead treat MaxTTL <= 0 as "delete terminal TaskActions immediately" (i.e., on the next GC cycle). This would be useful for environments where operators want to aggressively clean up completed TaskActions without waiting.
Proposed behavior
| MaxTTL value | Behavior |
| ------------ | ---------------------------------------------------------------- |
| > 0 | Delete terminal TaskActions older than MaxTTL (current behavior) |
| <= 0 | Delete all terminal TaskActions immediately on each GC cycle |
Context
Raised during PR #6994 review. Current code defensively rejects MaxTTL <= 0 to prevent accidental deletion of all terminal TaskActions.
Considerations
• Need clear documentation so operators understand MaxTTL: 0 means immediate deletion
• Consider whether a named sentinel (e.g., maxTTL: immediate) would be clearer than relying on 0
flyteorg/flyte