Add unique UUID try_id column to TaskInstance and TaskInstanceHistory#47065
Merged
ephraimbuddy merged 13 commits intoapache:mainfrom Mar 5, 2025
Merged
Add unique UUID try_id column to TaskInstance and TaskInstanceHistory#47065ephraimbuddy merged 13 commits intoapache:mainfrom
try_id column to TaskInstance and TaskInstanceHistory#47065ephraimbuddy merged 13 commits intoapache:mainfrom
Conversation
0ef9498 to
5bc8fa4
Compare
ashb
reviewed
Feb 26, 2025
5e93551 to
7dcdac4
Compare
7dcdac4 to
31627d2
Compare
This change introduces a new `try_id` UUID column that uniquely identifies each task instance attempt across both TaskInstance and TaskInstanceHistory tables. - Creates a unique identifier for each task execution attempt - Allows retrieving task instances or history with a single key - Maintains try_id uniqueness when tasks are retried or cleared - Adds necessary database migration for adding the columns and constraints - Updates relevant task instance functions to generate new try_ids when tasks are retried Tested manually and unittest to see that the behaviour works well.
9d4e64b to
5c7b2e2
Compare
jedcunningham
approved these changes
Mar 4, 2025
shahar1
pushed a commit
to shahar1/airflow
that referenced
this pull request
Mar 5, 2025
…ry (apache#47065) * Add unique UUID `try_id` column to TaskInstance and TaskInstanceHistory This change introduces a new `try_id` UUID column that uniquely identifies each task instance attempt across both TaskInstance and TaskInstanceHistory tables. - Creates a unique identifier for each task execution attempt - Allows retrieving task instances or history with a single key - Maintains try_id uniqueness when tasks are retried or cleared - Adds necessary database migration for adding the columns and constraints - Updates relevant task instance functions to generate new try_ids when tasks are retried Tested manually and unittest to see that the behaviour works well. * Make try_id a primary key of task_instance_history table * fixup! Make try_id a primary key of task_instance_history table * fixup! fixup! Make try_id a primary key of task_instance_history table * fixup! fixup! fixup! Make try_id a primary key of task_instance_history table * fixup! fixup! fixup! fixup! Make try_id a primary key of task_instance_history table * Update task_instance_history_orm * fixup! Update task_instance_history_orm * fixup! fixup! Update task_instance_history_orm * fix test * improve test query * fixup! improve test query * fixup! fixup! improve test query
nailo2c
pushed a commit
to nailo2c/airflow
that referenced
this pull request
Apr 4, 2025
…ry (apache#47065) * Add unique UUID `try_id` column to TaskInstance and TaskInstanceHistory This change introduces a new `try_id` UUID column that uniquely identifies each task instance attempt across both TaskInstance and TaskInstanceHistory tables. - Creates a unique identifier for each task execution attempt - Allows retrieving task instances or history with a single key - Maintains try_id uniqueness when tasks are retried or cleared - Adds necessary database migration for adding the columns and constraints - Updates relevant task instance functions to generate new try_ids when tasks are retried Tested manually and unittest to see that the behaviour works well. * Make try_id a primary key of task_instance_history table * fixup! Make try_id a primary key of task_instance_history table * fixup! fixup! Make try_id a primary key of task_instance_history table * fixup! fixup! fixup! Make try_id a primary key of task_instance_history table * fixup! fixup! fixup! fixup! Make try_id a primary key of task_instance_history table * Update task_instance_history_orm * fixup! Update task_instance_history_orm * fixup! fixup! Update task_instance_history_orm * fix test * improve test query * fixup! improve test query * fixup! fixup! improve test query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change introduces a new
try_idUUID column that uniquely identifies each task instance attempt across both TaskInstance and TaskInstanceHistory tables.Tested manually and unittest to see that the behaviour works well.
Closes: #47015, Closes: #43437