-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix log task instance join #59973
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
Fix log task instance join #59973
Conversation
|
Thanks for the pr! |
0addbc3 to
d7e59f0
Compare
073c9d1 to
fb529c7
Compare
|
I think now its good to go. |
jason810496
left a comment
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.
I think now its good to go.
We still encounter the same ruff formatting static check failure: https://github.com/apache/airflow/actions/runs/20718428075/job/59476214319?pr=59973
|
Fixed the ruff formatting issue by flattening the primaryjoin definition. Validated locally with ruff==0.14.10 and checks are passing now. |
jason810496
left a comment
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.
Thanks for the update, LGTM.
* Fix incorrect Log and TaskInstance join query * Fix log task instance join foreign keys and remove stray newsfragment * Remove unused task variable assignments in test_log_task_instance_join_correctness * Fix CI failures and address reviewer comments: revert unrelated doc changes, clean up tests, add Mapped type hints to Log relationships, and run ruff formatting * Restore newsfragment and fix missing import in log.py * Fix reviewer feedback: add license, move imports, and fix newsfragments * Fix ruff static check failure in log.py * Flatten primaryjoin definition to fix formatting * Fix newsfragments per review: restore 58337 and remove 59965 * Remove unused import in log.py --------- (cherry picked from commit 91af86e) Co-authored-by: Subham <subhamsangwan26@gmail.com> Co-authored-by: Jason(Zhe-You) Liu <68415893+jason810496@users.noreply.github.com>
* [v3-1-test] Fix log task instance join (#59973) * Fix incorrect Log and TaskInstance join query * Fix log task instance join foreign keys and remove stray newsfragment * Remove unused task variable assignments in test_log_task_instance_join_correctness * Fix CI failures and address reviewer comments: revert unrelated doc changes, clean up tests, add Mapped type hints to Log relationships, and run ruff formatting * Restore newsfragment and fix missing import in log.py * Fix reviewer feedback: add license, move imports, and fix newsfragments * Fix ruff static check failure in log.py * Flatten primaryjoin definition to fix formatting * Fix newsfragments per review: restore 58337 and remove 59965 * Remove unused import in log.py --------- (cherry picked from commit 91af86e) Co-authored-by: Subham <subhamsangwan26@gmail.com> Co-authored-by: Jason(Zhe-You) Liu <68415893+jason810496@users.noreply.github.com> * Fix backport: Remove Mapped type hints for SQLAlchemy 1.x compatibility * Fix unused import in log.py * Update airflow-core/src/airflow/models/log.py --------- Co-authored-by: Jason(Zhe-You) Liu <68415893+jason810496@users.noreply.github.com> Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
* Fix incorrect Log and TaskInstance join query * Fix log task instance join foreign keys and remove stray newsfragment * Remove unused task variable assignments in test_log_task_instance_join_correctness * Fix CI failures and address reviewer comments: revert unrelated doc changes, clean up tests, add Mapped type hints to Log relationships, and run ruff formatting * Restore newsfragment and fix missing import in log.py * Fix reviewer feedback: add license, move imports, and fix newsfragments * Fix ruff static check failure in log.py * Flatten primaryjoin definition to fix formatting * Fix newsfragments per review: restore 58337 and remove 59965 * Remove unused import in log.py --------- Co-authored-by: Jason(Zhe-You) Liu <68415893+jason810496@users.noreply.github.com>
* Fix incorrect Log and TaskInstance join query * Fix log task instance join foreign keys and remove stray newsfragment * Remove unused task variable assignments in test_log_task_instance_join_correctness * Fix CI failures and address reviewer comments: revert unrelated doc changes, clean up tests, add Mapped type hints to Log relationships, and run ruff formatting * Restore newsfragment and fix missing import in log.py * Fix reviewer feedback: add license, move imports, and fix newsfragments * Fix ruff static check failure in log.py * Flatten primaryjoin definition to fix formatting * Fix newsfragments per review: restore 58337 and remove 59965 * Remove unused import in log.py --------- Co-authored-by: Jason(Zhe-You) Liu <68415893+jason810496@users.noreply.github.com>
Fix the incorrect Log and TaskInstance join query
This PR addresses the issue: #59965.
The Log.task_instance relationship in
airflow/models/log.pyhas been updated to use a strict join on the following fields:This change ensures that log entries are correctly associated with their corresponding task instances, resolving an issue where the relationship was previously defined with a primaryjoin that only checked for matching
task_id.