kobin23 opened a new pull request, #77196:
URL: https://github.com/apache/airflow/pull/77196

   When the logs volume becomes empty, the log groomer attempts to delete 
`/opt/airflow/logs` itself. This produces mount-point deletion errors; an 
ordinary logs directory can instead be removed completely.
   
   Exclude the starting directory from empty-directory deletion with `-mindepth 
1`. Empty subdirectories continue to be removed. Regenerate the embedded script 
in `Dockerfile` using `scripts/ci/prek/inline_scripts_in_docker.py`.
   
   Add a parametrized regression test that runs the actual cleanup script for 
one pass against an initially empty logs root and a root containing nested 
empty directories. Both cases fail against the original script and pass with 
this change.
   
   closes: #77195
   
   Validation:
   
   - Regression test: 2 failed before the fix; 2 passed after the fix.
   - Complete scripts test suite: 2,118 passed, 8 skipped (`uv run --project 
scripts --locked pytest scripts/tests/ -q`).
   - Ruff formatting and lint: passed for the new test.
   - `bash -n scripts/docker/clean-logs.sh`: passed.
   - `git diff --check`: passed.
   - Repository regular and manual static checks on the three changed files: 
passed.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Codex (GPT-6)
   
   Generated-by: Codex (GPT-6) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   ---
   
   Drafted-by: Codex (GPT-6); reviewed by @kobin23 before posting
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to