From 73f646dc9e4a2e4417800186c12bb8ae656bf5ae Mon Sep 17 00:00:00 2001 From: divyansh42 Date: Thu, 24 Sep 2026 13:15:33 +0530 Subject: [PATCH] fix: use latest Tekton releases and fix ConfigMap timing Update E2E test setup to use latest stable releases and fix ConfigMap timing issue: **Pipelines:** - Remove v1.12.0 pin and use latest release - Remove TODO comment about switching back to latest **Triggers:** - Skip nightly builds and use latest release directly - Fix timing: wait for pods AFTER applying interceptors (not before) **Root Cause:** Triggers v0.37.1 added config-triggers-core-interceptors ConfigMap for GitHub Enterprise allowlist feature. The controller fatally crashes on startup if this ConfigMap doesn't exist, even though the feature defaults to disabled. Old broken order caused controller to crash: 1. Apply release.yaml (creates controller Deployment) 2. **Wait for pods** (controller starts, needs ConfigMap, crashes) 3. Apply interceptors.yaml (ConfigMap created too late) **Fix (matching tektoncd/triggers pattern):** 1. Apply release.yaml (creates CRDs and Deployment) 2. Wait for ClusterInterceptor CRD to be Established (provides delay for image pull) 3. Apply interceptors.yaml (creates ConfigMap before controller starts) 4. Wait for pods (controller finds ConfigMap, starts successfully) Co-Authored-By: Claude Sonnet 4.5 --- test/e2e-common.sh | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/test/e2e-common.sh b/test/e2e-common.sh index 5f419eb289..645a2ba5c2 100755 --- a/test/e2e-common.sh +++ b/test/e2e-common.sh @@ -134,11 +134,8 @@ function install_pipeline_crd() { if [[ -n ${RELEASE_YAML_PIPELINE} ]];then latestreleaseyaml=${RELEASE_YAML_PIPELINE} else - - # Pin to v1.12.0 to avoid spurious termination message WARN in step logs (tektoncd/pipeline#10159). - # The fix (tektoncd/pipeline#10160) is merged but not yet in a released version. - # TODO: switch back to latest once a pipeline release includes the fix. - latestreleaseyaml=https://infra.tekton.dev/tekton-releases/pipeline/previous/v1.12.0/release.yaml + # Use latest release version + latestreleaseyaml="https://infra.tekton.dev/tekton-releases/pipeline/latest/release.yaml" fi [[ -z ${latestreleaseyaml} ]] && fail_test "Could not get latest released release.yaml" kubectl apply -f ${latestreleaseyaml} || @@ -160,34 +157,32 @@ function install_triggers_crd() { if [[ -n ${RELEASE_YAML_TRIGGERS} ]];then latestreleaseyaml=${RELEASE_YAML_TRIGGERS} else - # First try to install latestreleaseyaml from nightly - curl -o/dev/null -s -LI -f https://infra.tekton.dev/tekton-releases-nightly/triggers/latest/release.yaml && - latestreleaseyaml=https://infra.tekton.dev/tekton-releases-nightly/triggers/latest/release.yaml - - # If for whatever reason the nightly release wasnt there (nightly ci failure?), try the released version - [[ -z ${latestreleaseyaml} ]] && latestreleaseyaml="https://infra.tekton.dev/tekton-releases/triggers/latest/release.yaml" + # Use latest release version (not nightly) + latestreleaseyaml="https://infra.tekton.dev/tekton-releases/triggers/latest/release.yaml" fi if [[ -n ${RELEASE_YAML_TRIGGERS_INTERCEPTORS} ]];then latestinterceptorsyaml=${RELEASE_YAML_TRIGGERS_INTERCEPTORS} else - # First try to install latest interceptors from nightly - curl -o/dev/null -s -LI -f https://infra.tekton.dev/tekton-releases-nightly/triggers/latest/interceptors.yaml && - latestinterceptorsyaml=https://infra.tekton.dev/tekton-releases-nightly/triggers/latest/interceptors.yaml - - # If for whatever reason the nightly release wasnt there (nightly ci failure?), try the released version - [[ -z ${latestinterceptorsyaml} ]] && latestinterceptorsyaml="https://infra.tekton.dev/tekton-releases/triggers/latest/interceptors.yaml" + # Use latest release version (not nightly) + latestinterceptorsyaml="https://infra.tekton.dev/tekton-releases/triggers/latest/interceptors.yaml" fi [[ -z ${latestreleaseyaml} ]] && fail_test "Could not get latest released release.yaml" [[ -z ${latestinterceptorsyaml} ]] && fail_test "Could not get latest released interceptors.yaml" + + # Apply release.yaml to install CRDs and controllers kubectl apply -f ${latestreleaseyaml} || fail_test "Build triggers installation failed" - # Wait for pods to be running in the namespaces we are deploying to - wait_until_pods_running tekton-pipelines || fail_test "Tekton Triggers did not come up" - + # Wait for CRD to be established before applying interceptors kubectl wait --for=condition=Established --timeout=30s crds/clusterinterceptors.triggers.tekton.dev || fail_test "cluster interceptors never established" + + # Apply interceptors.yaml to create ConfigMap and ClusterInterceptor resources kubectl apply -f ${latestinterceptorsyaml} || fail_test "Interceptors installation failed" + # Wait for pods to be running AFTER applying interceptors (not before) + # This ensures the ConfigMap exists when the controller starts + wait_until_pods_running tekton-pipelines || fail_test "Tekton Triggers did not come up" + # Make sure that eveything is cleaned up in the current namespace. for res in eventlistener triggertemplate triggerbinding clustertriggerbinding; do kubectl delete --ignore-not-found=true ${res}.triggers.tekton.dev --all