From 4cd013506e1c7bfe63e27c592d2f5f718f944cc1 Mon Sep 17 00:00:00 2001 From: "circleci-app[bot]" <127350680+circleci-app[bot]@users.noreply.github.com> Date: Tue, 1 Sep 2026 07:25:59 +0000 Subject: [PATCH] Fix fluentd lifecycle hook BackoffLimitExceeded: add Filter field and pre-push delete Two fixes for the persistent deploy_to_doks_release failure (job 31035): 1. codacy/templates/fluentd/lifecycle-police-job.yaml: Add "Filter":{} to the lifecycle configuration JSON. Newer MinIO versions strictly follow the AWS S3 spec which requires a Filter element in each lifecycle rule, even when empty. Without it, put-bucket-lifecycle-configuration returns a MalformedXML error immediately, causing 3 fast pod failures and BackoffLimitExceeded (the ~15 min total time is main-deployment rollout; the hook itself fails in seconds). 2. .circleci/config.yml: Delete the existing chart version from chart museum before pushing. Chart museum rejects re-uploads of the same version with 409, which failed the first pipeline run (job 31005). Adding a pre-push DELETE via the chart museum REST API (with || true to tolerate missing charts) ensures subsequent CI runs can always push the updated chart. AI-Generated: true --- .circleci/config.yml | 2 ++ codacy/templates/fluentd/lifecycle-police-job.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1446c015..79ed6ae8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -351,6 +351,8 @@ references: helm dep build ./codacy echo "Adding 'https://charts.codacy.com/${CHANNEL}'" helm repo add --username "${CHARTS_REPO_USER}" --password "${CHARTS_REPO_PASS}" ${HELM_REPOSITORY} https://charts.codacy.com/${CHANNEL} + echo "Removing existing chart version from chart museum (if present)..." + curl -s -u "${CHARTS_REPO_USER}:${CHARTS_REPO_PASS}" -X DELETE "https://charts.codacy.com/${CHANNEL}/api/charts/codacy/$(cat .version)" || true helm push ./codacy ${HELM_REPOSITORY} - <<: *persist_to_workspace diff --git a/codacy/templates/fluentd/lifecycle-police-job.yaml b/codacy/templates/fluentd/lifecycle-police-job.yaml index eb32590b..a1fda355 100644 --- a/codacy/templates/fluentd/lifecycle-police-job.yaml +++ b/codacy/templates/fluentd/lifecycle-police-job.yaml @@ -35,7 +35,7 @@ spec: - | ENDPOINT="http://{{ .Values.global.minio.location }}:{{ .Values.global.minio.port }}" BUCKET="{{ .Values.fluentdoperator.bucketName }}" - LIFECYCLE='{"Rules":[{"Expiration":{"Days": {{ .Values.fluentdoperator.expirationDays }} },"ID":"Delete old logs","Status":"Enabled"}]}' + LIFECYCLE='{"Rules":[{"Expiration":{"Days": {{ .Values.fluentdoperator.expirationDays }} },"Filter":{},"ID":"Delete old logs","Status":"Enabled"}]}' MAX_WAIT=600 ELAPSED=0 echo "Waiting for MinIO at ${ENDPOINT}..."