Komalpawar22 commented on issue #46547:
URL: https://github.com/apache/airflow/issues/46547#issuecomment-2756644611
@jason810496
Thanks for looking into this! To clarify, I am not referring to the log URL
in the UI but rather the log_url property from TaskInstance, which I use in a
Slack webhook notification for failed tasks.
I am using task_instance.log_url in a Slack notifier to provide quick access
to task logs when a DAG fails. However, due to the incorrect URL format in
Airflow 2.10.4, clicking the log button in Slack does not redirect users
correctly.
*Notifier code block*
```json
{
"type": "button",
"text": {
"type": "plain_text",
"text": ":male-technologist: View Logs",
"emoji": True
},
"value": "click_me_123",
"action_id": "actionId-0",
"url": task_instance.log_url # This URL is broken in Airflow 2.10.4
}
```
*Expected Behavior (Airflow 2.9.3)*
- Clicking the "View Logs" button in Slack should open the correct task log
page.
*Actual Behavior (Airflow 2.10.4)*
- The generated log_url contains an incorrect base_date query parameter,
causing redirection issues.
- Users cannot access task logs directly from Slack.
*Steps to Reproduce the Issue*
1. Set up an Airflow DAG with a Slack webhook notification on task failure.
2. Ensure the notification includes task_instance.log_url in the message.
3. Trigger a task failure.
4. Click the "View Logs" button in Slack.
5. Observe that the URL does not lead to the expected log page.
To unblock my work, I have written my function to manually construct the
correct log URL. However, since `task_instance.log_url` is an officially
provided property, I wanted to report this as a potential bug because others
relying on it may encounter similar issues.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]