This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new a268ae699db fix(docker): log groomer clean-logs.sh script (#63421)
a268ae699db is described below
commit a268ae699db55d3a7bf13b79720f5e37bfcc4bda
Author: n-badtke-cg <[email protected]>
AuthorDate: Thu Mar 12 11:25:48 2026 +0100
fix(docker): log groomer clean-logs.sh script (#63421)
commit de01a6ba55d026432b27b46aa11b5ecfb0caf107 included changed that
unfortunately:
1. broke the script completely
2. broke the LOG_MAX_SIZE_BYTES functionality added with commit
1e5f789db9c24a396ffd7f4b1950a94e6e909047
---
Dockerfile | 6 +++---
scripts/docker/clean-logs.sh | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 8f348278ebb..e25050de67c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1693,10 +1693,10 @@ if [[ "$MAX_SIZE_BYTES" -gt 0 ]]; then
echo "Max log size limit: $MAX_SIZE_BYTES bytes"
fi
-retention_days="${RETENTION}"
+retention_days="${RETENTION_DAYS}"
while true; do
- total_retention_minutes=$(( (RETENTION_DAYS * 1440) + RETENTION_MINUTES ))
+ total_retention_minutes=$(( (retention_days * 1440) + RETENTION_MINUTES ))
echo "Trimming airflow logs older than ${total_retention_minutes} minutes."
find "${DIRECTORY}"/logs \
@@ -1717,7 +1717,7 @@ while true; do
find "${DIRECTORY}"/logs -type d -empty -delete || true
- retention_days="${RETENTION}"
+ retention_days="${RETENTION_DAYS}"
seconds=$(( $(date -u +%s) % EVERY))
(( seconds < 1 )) || sleep $((EVERY - seconds - 1))
diff --git a/scripts/docker/clean-logs.sh b/scripts/docker/clean-logs.sh
index 7253424f461..60ba5cdf034 100755
--- a/scripts/docker/clean-logs.sh
+++ b/scripts/docker/clean-logs.sh
@@ -43,10 +43,10 @@ if [[ "$MAX_SIZE_BYTES" -gt 0 ]]; then
echo "Max log size limit: $MAX_SIZE_BYTES bytes"
fi
-retention_days="${RETENTION}"
+retention_days="${RETENTION_DAYS}"
while true; do
- total_retention_minutes=$(( (RETENTION_DAYS * 1440) + RETENTION_MINUTES ))
+ total_retention_minutes=$(( (retention_days * 1440) + RETENTION_MINUTES ))
echo "Trimming airflow logs older than ${total_retention_minutes} minutes."
find "${DIRECTORY}"/logs \
@@ -67,7 +67,7 @@ while true; do
find "${DIRECTORY}"/logs -type d -empty -delete || true
- retention_days="${RETENTION}"
+ retention_days="${RETENTION_DAYS}"
seconds=$(( $(date -u +%s) % EVERY))
(( seconds < 1 )) || sleep $((EVERY - seconds - 1))