-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Added a task try table for better log file retrieval. #23178
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
Conversation
03a2931 to
77a0f6e
Compare
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.
The primary key should be TaskInstance’s primary key + try_number.
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.
Should there also be a map_index in this table?
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.
Yes
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.
Thank you. Added map_index to the PK, that should make the full TaskInstance key.
|
Idle thought: Do we need this table and TaskFail table, or could a single table serve both purposes? |
airflow/models/tasktry.py
Outdated
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.
We shouldn't have this duplicated here.
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.
Fixed. Good catch!
We can probably merge them, but it’ll need some work, I have difficulties keeping track of |
95734cf to
18cf8f9
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
Removed an unneeded constructor as per @ashb's suggestion Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
18cf8f9 to
1cf7f85
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
This PR aims to fix a long-standing logging bug present in Airflow. In particular, any clusters of more than one worker do not handle their logs appropriately - always fetching files from the host used in the last run.
This change adds a lookup table for per-try information for TaskInstances. That allows storing a separate hostname for each try of a task.
Questions to consider before merging - comments would be appreciated:
This is a redesign of a previous PR #23135.
closes: #16472