Skip to content

task_instance_key_str is misleadingly not unique #51315

@remibonnet-datafolio

Description

@remibonnet-datafolio

What do you see as an issue?

In: https://airflow.apache.org/docs/apache-airflow/stable/templates-ref.html

Image

The name of task_instance_key_str and the documentation seem to imply that this template variable can be used to refer uniquely to a task instance. This is not the case. On dags with an intra day schedule, all task instance will have the same key, as the hour component of the logical date is not used.

Image

Solving the problem

Listed as a doc issue, as "fixing" the variable would be a severe breaking change, and deprecating it / issuing a clear warning about it would seem more reasonable.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions