Skip to content
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

feat: delete jobs in batches #3682

Merged
merged 1 commit into from
Dec 4, 2024
Merged

feat: delete jobs in batches #3682

merged 1 commit into from
Dec 4, 2024

Conversation

gaius-qi
Copy link
Member

@gaius-qi gaius-qi commented Dec 4, 2024

Description

This pull request introduces the concept of batch processing for garbage collection (GC) jobs in the manager/config package. The most important changes include adding a batch size parameter to the GC configuration, updating the validation logic to require this parameter, and implementing the batch deletion logic in the GC job.

Configuration updates:

Testing updates:

Implementation updates:

  • manager/job/gc.go: Replaced single deletion logic with deleteInBatches function to handle batch deletions. [1] [2]

Configuration file updates:

Related Issue

Motivation and Context

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@gaius-qi gaius-qi added the enhancement New feature or request label Dec 4, 2024
@gaius-qi gaius-qi added this to the v2.2.0 milestone Dec 4, 2024
@gaius-qi gaius-qi self-assigned this Dec 4, 2024
@gaius-qi gaius-qi requested a review from a team as a code owner December 4, 2024 03:23
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 35.29412% with 11 lines in your changes missing coverage. Please review.

Project coverage is 35.36%. Comparing base (6695100) to head (92bc021).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
manager/job/gc.go 0.00% 11 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3682   +/-   ##
=======================================
  Coverage   35.36%   35.36%           
=======================================
  Files         335      335           
  Lines       37617    37631   +14     
=======================================
+ Hits        13305    13310    +5     
- Misses      23483    23493   +10     
+ Partials      829      828    -1     
Flag Coverage Δ
unittests 35.36% <35.29%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
manager/config/config.go 96.40% <100.00%> (+0.05%) ⬆️
manager/job/gc.go 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

CormickKneey
CormickKneey previously approved these changes Dec 4, 2024
Copy link
Member

@chlins chlins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@gaius-qi gaius-qi merged commit a97584a into main Dec 4, 2024
22 of 27 checks passed
@gaius-qi gaius-qi deleted the feature/delete branch December 4, 2024 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants