BasPH commented on a change in pull request #5304: [AIRFLOW-4541] Deprecate
mkdirs utility function for pathlib
URL: https://github.com/apache/airflow/pull/5304#discussion_r285771240
##########
File path: airflow/utils/log/file_task_handler.py
##########
@@ -194,10 +195,7 @@ def _init_file(self, ti):
# operator is not compatible with impersonation (e.g. if a Celery
executor is used
# for a SubDag operator and the SubDag operator has a different owner
than the
# parent DAG)
- if not os.path.exists(directory):
- # Create the directory as globally writable using custom mkdirs
- # as os.makedirs doesn't set mode properly.
- mkdirs(directory, 0o777)
+ pathlib.Path(directory).mkdir(mode=0o777, parents=True, exist_ok=True)
Review comment:
How did this ever get in here 😞 Even though it's a valid comment, 777 is
never the correct solution.
Seems like this will take some time to test and fix...
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services