You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dstandish (via GitHub)" <gi...@apache.org> on 2025/03/27 02:58:11 UTC
[PR] Wrap all listener invocations in a try / except [airflow]
dstandish opened a new pull request, #48427:
URL: https://github.com/apache/airflow/pull/48427
Observed that scheduler broke here https://github.com/apache/airflow/issues/48026 when calling the listener.
--
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] Wrap all listener invocations in a try / except [airflow]
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on PR #48427:
URL: https://github.com/apache/airflow/pull/48427#issuecomment-2758181259
> I feel like the real question is how this happened psycopg2.OperationalError: lost synchronization with server: got message type "r", length 1919509605 and whether it's actually responsible for task failing (with some other, missing log piece?).
Yes this is also a thread that we need to chase down. I asked for more repro details on https://github.com/apache/airflow/issues/48026. Meanwhile though, my thought was that we should protect the scheduler from plugin code. But if the group disagrees, we can leave it unprotected.
--
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] Wrap all listener invocations in a try / except [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on code in PR #48427:
URL: https://github.com/apache/airflow/pull/48427#discussion_r2015671369
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -73,6 +74,8 @@
from airflow.utils.state import DagRunState
from airflow.utils.types import DagRunTriggeredByType, DagRunType
+log = structlog.get_logger()
Review Comment:
Can we associate the logger with the module? Easier imo to comprehend that way
```
log = structlog.get_logger(__name__)
```
--
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] Wrap all listener invocations in a try / except [airflow]
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish merged PR #48427:
URL: https://github.com/apache/airflow/pull/48427
--
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] Wrap all listener invocations in a try / except [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on code in PR #48427:
URL: https://github.com/apache/airflow/pull/48427#discussion_r2018027938
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -73,6 +74,8 @@
from airflow.utils.state import DagRunState
from airflow.utils.types import DagRunTriggeredByType, DagRunType
+log = structlog.get_logger()
Review Comment:
Alright thats ok
--
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] Wrap all listener invocations in a try / except [airflow]
Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on code in PR #48427:
URL: https://github.com/apache/airflow/pull/48427#discussion_r2018035906
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -73,6 +74,8 @@
from airflow.utils.state import DagRunState
from airflow.utils.types import DagRunTriggeredByType, DagRunType
+log = structlog.get_logger()
Review Comment:
PR for cleanup https://github.com/apache/airflow/pull/48480
--
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] Wrap all listener invocations in a try / except [airflow]
Posted by "mobuchowski (via GitHub)" <gi...@apache.org>.
mobuchowski commented on PR #48427:
URL: https://github.com/apache/airflow/pull/48427#issuecomment-2757217077
@dstandish all dagrun-level OL listeners wrap everything they do in try: except BaseException - https://github.com/apache/airflow/blob/2b082e670a9689edfd734cd8b3296d62170c62ed/providers/openlineage/src/airflow/providers/openlineage/plugins/listener.py#L521
The error happens in separate process that itself is guarded inside by try: except BaseException:
https://github.com/apache/airflow/blob/807bdca29c634a04be85637902db680f567f8e73/providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py#L376
I feel like the real question is how this happened `psycopg2.OperationalError: lost synchronization with server: got message type "r", length 1919509605` and whether it's actually responsible for task failing (with some other, missing log piece?).
--
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] Wrap all listener invocations in a try / except [airflow]
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on PR #48427:
URL: https://github.com/apache/airflow/pull/48427#issuecomment-2758170234
> @dstandish all dagrun-level OL listeners wrap everything they do in try: except BaseException -
this is good.
but we should probably wrap anyway because, not everyone is as thoughtful as you @mobuchowski
WDYT?
--
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] Wrap all listener invocations in a try / except [airflow]
Posted by "mobuchowski (via GitHub)" <gi...@apache.org>.
mobuchowski commented on PR #48427:
URL: https://github.com/apache/airflow/pull/48427#issuecomment-2758473708
Sure, it's not wrong to add this.
--
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] Wrap all listener invocations in a try / except [airflow]
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #48427:
URL: https://github.com/apache/airflow/pull/48427#discussion_r2017578928
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -73,6 +74,8 @@
from airflow.utils.state import DagRunState
from airflow.utils.types import DagRunTriggeredByType, DagRunType
+log = structlog.get_logger()
Review Comment:
we could but there are already many many instances like this in the codebase. we can make it uniform in a followup.
--
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