This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new 6c6b77a Fix permission error on non-POSIX filesystem (#13121)
6c6b77a is described below
commit 6c6b77a87891ee81ed384124e309dff72a85c02f
Author: cris-b <[email protected]>
AuthorDate: Tue Feb 23 10:50:55 2021 +0000
Fix permission error on non-POSIX filesystem (#13121)
* Fix https://github.com/apache/airflow/issues/12669
- failure to change ownership of log file on azure
---
airflow/utils/log/file_task_handler.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/airflow/utils/log/file_task_handler.py
b/airflow/utils/log/file_task_handler.py
index 7617bda..e1d68d4 100644
--- a/airflow/utils/log/file_task_handler.py
+++ b/airflow/utils/log/file_task_handler.py
@@ -255,6 +255,9 @@ class FileTaskHandler(logging.Handler):
if not os.path.exists(full_path):
open(full_path, "a").close()
# TODO: Investigate using 444 instead of 666.
- os.chmod(full_path, 0o666)
+ try:
+ os.chmod(full_path, 0o666)
+ except OSError:
+ logging.warning("OSError while change ownership of the log
file")
return full_path