From 73f183e25caa526cf842911a97e6e6e7982fbc69 Mon Sep 17 00:00:00 2001 From: Simon Baird Date: Mon, 6 Jan 2025 12:43:03 -0500 Subject: [PATCH] task: Use arbitrary long timeout instead of zero The commentary explains the reasoning. It's not expected to be an issue for Konflux, but theoretically RHTAP users might have an older EC base image and could some day migrate to this task definition which would break the task. Decided to keep the commit separate rather than squash so we can easily revert it some day. Ref: https://issues.redhat.com/browse/EC-1030 --- features/task_validate_image.feature | 2 +- .../0.1/verify-enterprise-contract.yaml | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/features/task_validate_image.feature b/features/task_validate_image.feature index 82646248d..53d8debb6 100644 --- a/features/task_validate_image.feature +++ b/features/task_validate_image.feature @@ -316,7 +316,7 @@ Feature: Verify Enterprise Contract Tekton Tasks | IGNORE_REKOR | true | | TIMEOUT | 666s | Then the task should succeed - And the task logs for step "debug-log" should contain "globalTimeout is 0, no timeout used" + And the task logs for step "debug-log" should contain "globalTimeout is 100h0m0s" Scenario: SSL_CERT_DIR environment variable is customized Given a working namespace diff --git a/tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml b/tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml index 07f2cd01f..add06b5b5 100644 --- a/tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml +++ b/tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml @@ -226,8 +226,11 @@ spec: - "$(params.WORKERS)" # NOTE: The syntax below is required to negate boolean parameters - "--info=$(params.INFO)" - # No timeout for EC, though Tekton may apply a timeout - - "--timeout=0" + # Fresh versions of ec support "--timeout=0" to indicate no timeout, but this would break + # the task if it's used with an older version of ec. In an abundance of caution, let's set + # an arbitrary high value instead of using 0 here. In future we can change it to 0. + # (The reason to not use an explicit timeout for ec is so Tekton can handle the timeouts). + - "--timeout=100h" - "--strict=false" - "--show-successes" - "--effective-time=$(params.EFFECTIVE_TIME)"