-
Notifications
You must be signed in to change notification settings - Fork 14.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
Replace the foreign composite key on TI to ti.id
#44147
Comments
Thinking through this a little bit more @jedcunningham and I have decided that: TaskReschedule, XCom, TaskMap and TINote should not be linked to a specific TI Try/TIHistory row and should instead apply to the whole "dag run task" (a concept which doesn't currently exist in Airflow 2 or 3 or even have a good name). Our thinking is:
The only other relationships onto TaskInstance table is TIHistory and RenderedTaskInstanceFIelds. While it might be nice to see some Xcom values and the RTIF for a given TIHistory row, the cost of keeping TIHistory in sync with TaskInstance changes and the shenanigans we'd need to pull to get the FKs update means we don't need to update anything. One option if we only want to avoid composite PKs of (dag_id,run_id,task_id,map_index) would be to create a "Dag Task id" (this name sucks though) column which is an integer/UUID key that is unique over (dag_id,run_id) For example, we might store these TI history rows
(Note: and this "active" TI:
The goal of the |
I am glad then that we have not started the work on multi-team in 3.0 - because those are the kind of changes / dependencies I expected to be worked out /cleaned before we complete 3.0. |
cc: @o-nikolas |
Now that we have UUID primary key on TI table (since #43243), let's adjust foreign key constraints on tables like XCom, Task Reschedule, TI note etc
The text was updated successfully, but these errors were encountered: