uranusjr commented on issue #19058:
URL: https://github.com/apache/airflow/issues/19058#issuecomment-947023469


   > I believe we could simply ban using `ts` in the names of the logs. That 
would mean some additional analysis of the custom logging specification and 
failing airflow if we detect it - possibly with a very descriptive explanation 
on how to convert the old logging spec and maybe even a tool to help with it.
   
   The problem with this is that, currently the `/log` page (plus the 
corresponding API endpoint) is deriving log filenames implicitly at runtime 
from `log_filename_template`. So if we change the value of this option, all 
previous logs would no longer be accessible since Airflow won't be able to 
correctly derive the old filenames. So I think this change needs to be eased 
in. My current idea is to
   
   1. In 2.2.1, change `ts` et al. _back_ to their pre-2.2.0 meaning so 
everything can work for now. To prepare for the option change, we add a new 
column `log_filename` on `TaskInstance` that's populated exactly once when the 
TI is run, to decouple the filenamne derivation logic.
   2. In 2.3.0, deprecate `ts` et al. Change the default 
`log_filename_template` to use `run_id` instead (which should be unique). Since 
log filenames are now rendered eagerly, old logs can still be located by their 
"old" filenames and won't be affected.


-- 
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]


Reply via email to