-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Closed
Closed
Copy link
Labels
area:corearea:loggingkind:bugThis is a clearly a bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a releaseBug that should be fixed before next release but would not block a release
Milestone
Description
Apache Airflow version
3.0.1
If "Other Airflow 2 version" selected, which one?
No response
What happened?
The URL template for log retrieval for task instance attempts uses the current TI ID from the task_instance table, not the TI ID for the attempt itself (which is now in the TI history table). This breaks log retrieval if providing a non-default log_filename_template which references the ID e.g. {{ ti.id }}.
What you think should happen instead?
The log retrieval logic should set the TI ID in the template expansion to the ID of the actual attempt.
How to reproduce
Set the log filename template to something non-default including {{ ti.id }}. Run a task and validate logs can be retrieved. Clear the task instance and try to retrieve logs for the previous attempt.
Operating System
Debian GNU/Linux
Versions of Apache Airflow Providers
No response
Deployment
Astronomer
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
area:corearea:loggingkind:bugThis is a clearly a bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a releaseBug that should be fixed before next release but would not block a release