Skip to content

Conversation

@jayjoshi64
Copy link

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!

@auvipy auvipy requested review from auvipy and Copilot June 5, 2025 05:52
Copy link
Contributor

Copilot AI left a 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

Copy link
Member

@auvipy auvipy left a 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
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.52%. Comparing base (de104a2) to head (b021be1).
⚠️ Report is 42 commits behind head on main.

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           
Flag Coverage Δ
unittests 78.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jayjoshi64
Copy link
Author

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.

@auvipy
Copy link
Member

auvipy commented Jun 6, 2025

you can get some idea from here https://github.com/celery/celery/tree/main/t/unit/tasks

@auvipy
Copy link
Member

auvipy commented Jun 26, 2025

@dfm88 can you check this? and possibly if you can take this with unit and integration tests?

@auvipy
Copy link
Member

auvipy commented Jun 27, 2025

superseded

@auvipy auvipy closed this Jun 27, 2025
@auvipy auvipy added this to the 5.5.4 milestone Jun 27, 2025
@auvipy auvipy modified the milestones: 5.5.4, 5.6.0 Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants