You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2024/02/07 17:50:10 UTC
(airflow) branch main updated: Avoid log-groomer container failures when log persistence is enabled (#37222)
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 b39a2bfd9b Avoid log-groomer container failures when log persistence is enabled (#37222)
b39a2bfd9b is described below
commit b39a2bfd9b80e361a8dbd9fc74b0830e73ded976
Author: arovira <32...@users.noreply.github.com>
AuthorDate: Wed Feb 7 17:50:04 2024 +0000
Avoid log-groomer container failures when log persistence is enabled (#37222)
* Avoid log-groomer container failures when log persistence is enabled
* Ignore erros on rm file command only
---------
Co-authored-by: Arnau Rovira <ar...@bitsighttech.com>
---
Dockerfile | 2 +-
scripts/docker/clean-logs.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index a048b0b7d2..d9fea0d2eb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1184,7 +1184,7 @@ while true; do
find "${DIRECTORY}"/logs \
-type d -name 'lost+found' -prune -o \
-type f -mtime +"${RETENTION}" -name '*.log' -print0 | \
- xargs -0 rm -f
+ xargs -0 rm -f || true
find "${DIRECTORY}"/logs -type d -empty -delete || true
diff --git a/scripts/docker/clean-logs.sh b/scripts/docker/clean-logs.sh
index df138e4a6f..866d5baa7b 100644
--- a/scripts/docker/clean-logs.sh
+++ b/scripts/docker/clean-logs.sh
@@ -33,7 +33,7 @@ while true; do
find "${DIRECTORY}"/logs \
-type d -name 'lost+found' -prune -o \
-type f -mtime +"${RETENTION}" -name '*.log' -print0 | \
- xargs -0 rm -f
+ xargs -0 rm -f || true
find "${DIRECTORY}"/logs -type d -empty -delete || true