You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jedcunningham (via GitHub)" <gi...@apache.org> on 2025/01/22 02:55:52 UTC

[PR] Set up dag file parsing logs with structlog [airflow]

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

   This gets the dag file parsing logs working with structlog. This will be further refactored, particularly to make it configurable for end users. But in the meantime, this gets the logs being written again.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Set up dag file parsing logs with structlog [airflow]

Posted by "rawwar (via GitHub)" <gi...@apache.org>.
rawwar commented on code in PR #45888:
URL: https://github.com/apache/airflow/pull/45888#discussion_r2454902171


##########
airflow/dag_processing/manager.py:
##########
@@ -216,6 +225,7 @@ def run(self):
 
         self.log.info("Getting all DAG bundles")
         self._dag_bundles = list(DagBundlesManager().get_all_dag_bundles())
+        self._symlink_latest_log_directory()

Review Comment:
   @jedcunningham , This particular call happens before structlog initializes the folder. So, its always skipped here.  
   
   One reason for this, I could think of, was that, if a dag-processor pod/process restarts/exits in between a day for some reason and then, we are rerunning it, only then this call would create symlink.
   
   Did I guess the reason correctly or is there any other reason for  invoking `_symlink_latest_log_directory` here?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Set up dag file parsing logs with structlog [airflow]

Posted by "rawwar (via GitHub)" <gi...@apache.org>.
rawwar commented on code in PR #45888:
URL: https://github.com/apache/airflow/pull/45888#discussion_r2454902171


##########
airflow/dag_processing/manager.py:
##########
@@ -216,6 +225,7 @@ def run(self):
 
         self.log.info("Getting all DAG bundles")
         self._dag_bundles = list(DagBundlesManager().get_all_dag_bundles())
+        self._symlink_latest_log_directory()

Review Comment:
   @jedcunningham , This particular call happens before structlog initializes the folder(via init_log_file?). So, its always skipped here.  
   
   One reason for this, I could think of, was that, if a dag-processor pod/process restarts/exits in between a day for some reason and then, we are rerunning it, only then this call would create symlink.
   
   Did I guess the reason correctly or is there any other reason for  invoking `_symlink_latest_log_directory` here?



##########
airflow/dag_processing/manager.py:
##########
@@ -216,6 +225,7 @@ def run(self):
 
         self.log.info("Getting all DAG bundles")
         self._dag_bundles = list(DagBundlesManager().get_all_dag_bundles())
+        self._symlink_latest_log_directory()

Review Comment:
   @jedcunningham , This particular call happens before structlog initializes the folder(via `init_log_file`?). So, its always skipped here.  
   
   One reason for this, I could think of, was that, if a dag-processor pod/process restarts/exits in between a day for some reason and then, we are rerunning it, only then this call would create symlink.
   
   Did I guess the reason correctly or is there any other reason for  invoking `_symlink_latest_log_directory` here?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Set up dag file parsing logs with structlog [airflow]

Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham merged PR #45888:
URL: https://github.com/apache/airflow/pull/45888


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org