The GitHub Actions job "Check newsfragment PR number" on 
airflow.git/make-remote-log-cleanup-resilient-to-concurrent-close has failed.
Run started by GitHub user ZhaoMJ (triggered by ZhaoMJ).

Head commit for run:
3f8624f5d54686228361d2a1531a3b3b57ac42f5 / Mingjie Zhao <[email protected]>
Fix remote log handlers crashing triggerer logging thread on concurrent close

Remote task log handlers (S3, GCS, WASB, OSS, Elasticsearch, HDFS) reclaimed
disk on upload by calling ``shutil.rmtree(os.path.dirname(local_loc))`` when
``delete_local_copy`` is enabled -- removing the log file's parent directory
rather than the file itself.

The triggerer runs many trigger log handlers concurrently in a single process,
and handler close is not atomic (the main thread's ``logging.shutdown()`` and
the ``QueueListener`` monitor thread draining a ``trigger_end`` record can both
call ``close()`` on the same handler). Two ``rmtree`` calls then run on the same
directory: the first removes the tree, the second walks a path that just
vanished and raises ``FileNotFoundError``. Raised on the logging monitor thread,
this is unhandled and kills the listener, silently stopping all trigger log
delivery for the rest of the process's life.

Delete only the uploaded file (``unlink(missing_ok=True)``) and then prune
now-empty parent directories, matching the pattern already used by the
OpenSearch handler. This reclaims disk without deleting a directory a
concurrent sibling still uses, and is idempotent under concurrent/double close.

Report URL: https://github.com/apache/airflow/actions/runs/30220760137

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to