ianbuss opened a new issue, #51525:
URL: https://github.com/apache/airflow/issues/51525
### 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
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]