From 7a7f6ffe3e14280dc6bc184cfbcf9099c6dc2a0f Mon Sep 17 00:00:00 2001 From: Dan Rammer Date: Tue, 30 Jan 2024 09:18:06 -0600 Subject: [PATCH] ttl comparison should allow 23 (#4791) Signed-off-by: Daniel Rammer --- flytepropeller/pkg/controller/garbage_collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flytepropeller/pkg/controller/garbage_collector.go b/flytepropeller/pkg/controller/garbage_collector.go index 373da8a155..e02e1beca2 100644 --- a/flytepropeller/pkg/controller/garbage_collector.go +++ b/flytepropeller/pkg/controller/garbage_collector.go @@ -169,7 +169,7 @@ func (g *GarbageCollector) StartGC(ctx context.Context) error { func NewGarbageCollector(cfg *config.Config, scope promutils.Scope, clk clock.WithTicker, namespaceClient corev1.NamespaceInterface, wfClient v1alpha1.FlyteworkflowV1alpha1Interface) (*GarbageCollector, error) { ttl := 23 - if cfg.MaxTTLInHours < 23 { + if cfg.MaxTTLInHours <= 23 { ttl = cfg.MaxTTLInHours } else { logger.Warningf(context.TODO(), "defaulting max ttl for workflows to 23 hours, since configured duration is larger than 23 [%d]", cfg.MaxTTLInHours)