-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
es_task_handler.py crashes accessing "View Logs in Elasticsearch" #24533
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
I think this has something to do with the #24511 that is likely going to be fixed in 2.3.3 |
CC: @jedcunningham ? |
Sure I can definitely spin out a quick PR-- as long as moving the assignment & assert into the try statement is the extent of the changes you have in mind... I'm afraid I dont know enough of the context to understand what else might be going wrong. I was guessing it was at least semi-intentional, since I also see the same pattern in file_task_handler.py in the same commit: 7be87d#diff-e7f34f73940eb52d92bb991abedc1c963431c5373c12dff739c8fb7d03e93d3aR87 |
…4533) (#24592) * Move fallible ti.task.dag assignment back inside try/except block It looks like ti.task.dag was originally protected inside try/except, but was moved out at commit 7be87d * Remove unneeded variable annotation Co-authored-by: EJ Kreinar <ej@he360.com> Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Does #24592 fixes the issue or we still have further tasks here? |
I think #24592 is the fix to this. |
…4533) (#24592) * Move fallible ti.task.dag assignment back inside try/except block It looks like ti.task.dag was originally protected inside try/except, but was moved out at commit 7be87d * Remove unneeded variable annotation Co-authored-by: EJ Kreinar <ej@he360.com> Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> (cherry picked from commit 97948ec)
…4533) (#24592) * Move fallible ti.task.dag assignment back inside try/except block It looks like ti.task.dag was originally protected inside try/except, but was moved out at commit 7be87d * Remove unneeded variable annotation Co-authored-by: EJ Kreinar <ej@he360.com> Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com> (cherry picked from commit 97948ec)
Apache Airflow version
2.3.2 (latest released)
What happened
Hi,
I have a local setup of airflow 2.3.2 running with
airflow standalone
. I am also running a docker-compose elasticsearch + kibana, and trying to exercise the elasticsearch backend integrations within Airflow...I configured the
frontend
parameter inairflow.cfg
, but when I click the link to "View Logs in Elasticsearch" I get the following failure in the webserver:What you think should happen instead
This crash appears to trace back to this commit: 7be87d
If I edit es_task_handler.py to move this
dag = ti.task.dag
assignment BACK into the try/except statement (7be87d#diff-dd898ab2ed4bca853f1ce5cf52b6fbb37d5fc3545f28967c03dc499fabd3a746R107), I can successfully open Kibana from the link in the Airflow UINot sure what might be going wrong in the backend here, e.g. if
ti.task
is now supposed to be always valid? Or if something I'm doing got into a bad state... But the try/except was able to handle the failure gracefully, at least.How to reproduce
airflow standalone
Then, inside the Airflow UI, I turned on a few example DAGs. Specifically I triggered the Example Python Operator, then clicked the button to view in Kibana. I tried a few DAGs and tasks and found this crash all the time
Operating System
Ubuntu 20.04.4 LTS
Versions of Apache Airflow Providers
apache-airflow-providers-elasticsearch==4.0.0
apache-airflow-providers-ftp==2.1.2
apache-airflow-providers-http==2.1.2
apache-airflow-providers-imap==2.2.3
apache-airflow-providers-sqlite==2.1.3
Deployment
Virtualenv installation
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: