fix: Elasticsearch logging exception details are missing in task logs tab#63739
fix: Elasticsearch logging exception details are missing in task logs tab#63739Subham-KRLX wants to merge 1 commit intoapache:mainfrom
Conversation
38d54a4 to
e47ccdb
Compare
|
@Subham-KRLX This PR has been converted to draft because it does not yet meet our Pull Request quality criteria. Issues found:
What to do next:
Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. |
76706ac to
902b587
Compare
5c00a18 to
f349d75
Compare
pierrejeambrun
left a comment
There was a problem hiding this comment.
Can't vouch for the provider change
| @@ -0,0 +1 @@ | |||
| Fix missing traceback in Elasticsearch and OpenSearch task logs | |||
There was a problem hiding this comment.
You can remove this file. We do not use bugfix newsfragment anymore.
|
cc @Owen-CH-Leung can you help with review? |
|
Thanks @Subham-KRLX. Could you please rebase on the latest |
243d9c0 to
0979414
Compare
I have rebased the branch on the latest main, added the requested integration test in providers/elasticsearch/tests/integration/elasticsearch/log/test_es_remote_log_io.py, and included a corresponding unit test under TestElasticsearchRemoteLogIO in test_es_task_handler.py.Verified locally that the new tests pass and error_detail is correctly formatted. |
f1f99f7 to
8ccc4a8
Compare
|
@Owen-CH-Leung The rendering issue was due to missing level and timestamp |
8ccc4a8 to
98fbf83
Compare
|
Note also the integration test fails |
providers/amazon/tests/unit/amazon/aws/operators/test_redshift_cluster.py
Show resolved
Hide resolved
|
I think there is some kind of broken rebase or you attempt to fix issues in main branch as part of this PR? |
4cf65a5 to
335f12c
Compare
|
I performed a clean rebase onto main to remove all unrelated file changes, so the branch now only contains the 7 relevant files for this fix. I also relocated the new example DAG to the provider-specific path (providers/elasticsearch/src/airflow/providers/elasticsearch/example_dags/). Finally I updated the integration test assertions to expect the event field and included the new E2E test for stack trace retrieval in the Elasticsearch remote logging suite. |
There was a problem hiding this comment.
OK I see the problem now.
What we need to do is to convert this file into a general example file like we have in
airflow-core/src/airflow/example_dags/example_skip_dag.py
kinda the same just for failure.
Then we can reference this example in elastic tests.
What confused me was that it was elastic example dag but we don't need elastic example any example of failure dag would fit (no need to mention elastic)
There was a problem hiding this comment.
I moved the example DAG back to Airflow Core (airflow-core/src/airflow/example_dags/example_failed_dag.py) and converted it into a generic failure example, removing any references to Elasticsearch. I also updated the Elasticsearch E2E test to reference this new general DAG ID.
335f12c to
69e329f
Compare


Description
Fixes #63736: Restores missing stack traces in Airflow 3 logs for Elasticsearch and OpenSearch.
Changes:
TASK_LOG_FIELDSto ensure exception data is retrieved.closes: #63736
Was generative AI tooling used to co-author this PR?