pierrejeambrun commented on code in PR #68758:
URL: https://github.com/apache/airflow/pull/68758#discussion_r3458759169
##########
airflow-core/src/airflow/utils/log/file_processor_handler.py:
##########
@@ -141,13 +141,13 @@ def _init_file(self, filename):
:param filename: task instance object
:return: relative log path of the given task instance
"""
- relative_log_file_path = os.path.join(self._get_log_directory(),
self._render_filename(filename))
- log_file_path = os.path.abspath(relative_log_file_path)
- directory = os.path.dirname(log_file_path)
+ relative_log_file_path = Path(self._get_log_directory()) /
self._render_filename(filename)
+ log_file_path = relative_log_file_path.resolve()
Review Comment:
This changes the returned path, it dereferences symlink.
So when `base_log_folder` sits under a symlink — the returned
`log_file_path` changes from the symlink path to the real target.
--
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]