-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add map_index to RenderedTaskInstanceFields #22004
Conversation
613c197
to
1473d77
Compare
@uranusjr I'm thinking we should add a |
12e9d92
to
272715c
Compare
airflow/migrations/versions/4eaab2fe6582_migrate_rtif_to_use_run_id_and_map_index.py
Outdated
Show resolved
Hide resolved
2256ebe
to
b4dd7c6
Compare
They are populated when XCom is resolved, and should be available when RenderedTaskInstanceFields are written. However, since a RenderedTaskInstanceFields row maps to a TaskInstance row, I think we should simply resolve the mapped values directly instead. On UI we should also add a marker to indicate a particular field value is mapped, so perhaps add a field to record the field names. Or maybe even this is unnecessary since this information is available on the task object? Or maybe in some scenarios we want to read RenderedTaskInstanceFields without parsing the DAG? (Currently I can only find this being used in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming we don’t need to add mapping info to RenderedTaskInstanceFields (I don’t think we do), this should be good to go.
The use case i am thinking of is for showing a table of all the mapped TIs in a detail view in the UI. And mapping can apply to things that aren't marked as templated |
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Even if we do we can alter this migration in a future PR. |
In order to do this "properly" we have also migrated it from using execution_date to run_id in its PK
b4dd7c6
to
6895d9e
Compare
MySQL is not happy… |
|
In order to do this "properly" we have also migrated it from using execution_date to run_id in its PK