-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
ISSUE-9738: Add root_id and parent_id for .apply() #9740
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
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.
Pull Request Overview
This PR adds support for tracking task lineage by introducing root_id and parent_id in the task request context when using .apply().
- Introduces parent_task lookup and sets parent_id and root_id accordingly
- Updates the task request dictionary to include the new fields
auvipy
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 PR. you will need to add unit tests and possibly integration tests as well to make sure there are no regression and it fixes the right issue.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9740 +/- ##
=======================================
Coverage 78.51% 78.52%
=======================================
Files 153 153
Lines 19130 19136 +6
Branches 2533 2534 +1
=======================================
+ Hits 15020 15026 +6
Misses 3821 3821
Partials 289 289
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Thanks for reviewing! Sure, I have no context on the tests, but I'll read the docs and start from there. I might take a couple of weeks at least to understand the structure of tests & add them along with my ongoing projects. |
|
you can get some idea from here https://github.com/celery/celery/tree/main/t/unit/tasks |
|
@dfm88 can you check this? and possibly if you can take this with unit and integration tests? |
|
superseded |
Note: Before submitting this pull request, please review our contributing
guidelines.
More context on: #9738
Description
Add root_id & parent_id to context when a task is executed using .apply().
Disclaimer: I am completely new to this repo, but thought this change would help my logging better, let me know if I missed something!