Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
ricardobernardino2024 marked this conversation as resolved.
helm push ./codacy ${HELM_REPOSITORY}
- <<: *persist_to_workspace

Expand Down
2 changes: 1 addition & 1 deletion codacy/templates/fluentd/lifecycle-police-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}]}'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW RISK

Suggestion: The inclusion of '"Filter": {}' correctly implements S3 Lifecycle V2 requirements. Note that this manually constructed JSON string will be malformed if '.Values.fluentdoperator.expirationDays' is missing or non-numeric, which would cause the job to fail.

Try running the following prompt in your coding agent:

Update the Helm template to use a default value for expirationDays and ensure it is treated as a numeric value to prevent generating malformed JSON.

MAX_WAIT=600
ELAPSED=0
echo "Waiting for MinIO at ${ENDPOINT}..."
Expand Down