Currently we do some “smart” (in quotes because it’s not actually very smart) detection whether a log template uses Python format string (e.g. {foo}-{bar}) or Jinja2 template syntax. We should find a way to remove the former as a feature and just always use Jinja2.
(Below is copied from another discussion)
The problem is we do record the log file template on DagRun so we could find the correct logs for an old run. Either we somehow find a way to distinguish those old runs (add a flag in db?) or we need to convert those old template strings into Jinja format in a db migration.
Committer
[X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
Body
Currently we do some “smart” (in quotes because it’s not actually very smart) detection whether a log template uses Python format string (e.g.
{foo}-{bar}
) or Jinja2 template syntax. We should find a way to remove the former as a feature and just always use Jinja2.(Below is copied from another discussion)
The problem is we do record the log file template on DagRun so we could find the correct logs for an old run. Either we somehow find a way to distinguish those old runs (add a flag in db?) or we need to convert those old template strings into Jinja format in a db migration.
Committer