Skip to content
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

Task failure Slack message log link doesn't show useful context #4177

Closed
AetherUnbound opened this issue Apr 22, 2024 · 3 comments
Closed

Task failure Slack message log link doesn't show useful context #4177

AetherUnbound opened this issue Apr 22, 2024 · 3 comments
Assignees
Labels
💻 aspect: code Concerns the software code in the repository 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: catalog Related to the catalog and Airflow DAGs 🔧 tech: airflow Involves Apache Airflow

Comments

@AetherUnbound
Copy link
Contributor

Description

The log URL which is given as part of ti.log_url does not provide a way to show more context from the DAG, i.e. there's no way to view the DAG graph or grid directly from the URL that's generated with log_url. This appears to go to a /log page, which doesn't have a clickable link to get back to the DAG page from it. Viewing the DAG graph or grid requires clicking on the DAGs list from that page, navigating to the appropriate DAG, and then navigating to the appropriate DAG run.

Current behavior

URL: https://airflow.openverse.org/log?execution_date=2024-04-14T00%3A00%3A00%2B00%3A00&task_id=ingest_data_day_shift_186.pull_mixed_data_day_shift_186&dag_id=wikimedia_reingestion_workflow&map_index=-1

image

Desired behavior

URL: https://airflow.openverse.org/dags/wikimedia_reingestion_workflow/grid?dag_run_id=scheduled__2024-04-14T00%3A00%3A00%2B00%3A00&task_id=ingest_data_day_shift_156.pull_mixed_data_day_shift_156&tab=logs

image

Notes

Since log_url appears to be the only relevant URL field available on the task instance object, we may need to construct the desired URL by hand.

@AetherUnbound AetherUnbound added 💻 aspect: code Concerns the software code in the repository 🔧 tech: airflow Involves Apache Airflow 🟨 priority: medium Not blocking but should be addressed soon 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🧱 stack: catalog Related to the catalog and Airflow DAGs labels Apr 22, 2024
@AetherUnbound AetherUnbound self-assigned this Apr 22, 2024
@AetherUnbound
Copy link
Contributor Author

Per apache/airflow#39179, we might be able to construct the URL ourselves using something similar:

https://github.com/apache/airflow/blob/b0e96131251c416f4d32ba60343ef3a6ecdb2346/airflow/www/views.py#L5186-L5205

@AetherUnbound
Copy link
Contributor Author

#4180 can be used as a reference for this!

@AetherUnbound
Copy link
Contributor Author

This will be resolved in Airflow 2.9.1! apache/airflow#39183

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: catalog Related to the catalog and Airflow DAGs 🔧 tech: airflow Involves Apache Airflow
Projects
Archived in project
Development

No branches or pull requests

1 participant