chore(deletions): Improve cleanup multiprocess worker logging#104228
Merged
chore(deletions): Improve cleanup multiprocess worker logging#104228
Conversation
During cleanup we schedule internal workers to handle chunks of deletions, these worker now have context of the project_id being worked and add it to logs, allowing us to track specific projects' group deletions. Also corrected the reporting of `cleanup.chunk_processed` metric which seems to increase by the full chunk on every step, inflating the metric.
yuvmen
commented
Dec 2, 2025
| break | ||
|
|
||
| # Increment metric once per chunk, after all iterations complete | ||
| metrics.incr("cleanup.chunk_processed", tags={"model": model_name}, amount=chunk_size) |
Member
Author
There was a problem hiding this comment.
moved this outside the while True since it basically increased it by chunk size every internal iteration
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #104228 +/- ##
===========================================
+ Coverage 80.21% 80.61% +0.39%
===========================================
Files 9333 9334 +1
Lines 398592 398891 +299
Branches 25495 25495
===========================================
+ Hits 319743 321556 +1813
+ Misses 78399 76885 -1514
Partials 450 450 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
During cleanup we schedule internal workers to handle chunks of deletions, these worker now have context of the project_id being worked and add it to logs, allowing us to track specific projects' group deletions.
Also corrected the reporting of
cleanup.chunk_processedmetric which seems to increase by the full chunk on every step, inflating the metric.