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: replicate persistent cache task when task needs persistent replicas #3784

Merged
merged 1 commit into from
Jan 26, 2025

Conversation

gaius-qi
Copy link
Member

Description

This pull request includes changes to the scheduler/resource/persistentcache package to add new functionalities and improve existing ones. The most important changes include adding a new method to load hosts randomly, modifying existing methods to use Redis transactions, and updating data types for task attributes.

New functionalities:

Improvements to existing methods:

Data type 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 Jan 24, 2025
@gaius-qi gaius-qi added this to the v2.3.0 milestone Jan 24, 2025
@gaius-qi gaius-qi self-assigned this Jan 24, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner January 24, 2025 09:35
@gaius-qi gaius-qi force-pushed the feature/schedule branch 2 times, most recently from 1de9371 to cad60c8 Compare January 24, 2025 09:54
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 1.66205% with 355 lines in your changes missing coverage. Please review.

Project coverage is 34.34%. Comparing base (9320a7f) to head (855809e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
scheduler/resource/persistentcache/host_manager.go 0.00% 109 Missing ⚠️
scheduler/scheduling/scheduling.go 2.80% 104 Missing ⚠️
scheduler/service/service_v2.go 0.00% 86 Missing ⚠️
scheduler/resource/persistentcache/peer_manager.go 0.00% 16 Missing ⚠️
scheduler/resource/persistentcache/task_manager.go 0.00% 11 Missing ⚠️
...uler/resource/persistentcache/host_manager_mock.go 0.00% 9 Missing ⚠️
...uler/resource/persistentcache/peer_manager_mock.go 0.00% 9 Missing ⚠️
scheduler/scheduling/mocks/scheduling_mock.go 0.00% 5 Missing ⚠️
...uler/resource/persistentcache/task_manager_mock.go 0.00% 4 Missing ⚠️
scheduler/scheduling/evaluator/evaluator_base.go 60.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3784      +/-   ##
==========================================
- Coverage   34.58%   34.34%   -0.25%     
==========================================
  Files         337      337              
  Lines       38549    38789     +240     
==========================================
- Hits        13332    13321      -11     
- Misses      24376    24625     +249     
- Partials      841      843       +2     
Flag Coverage Δ
unittests 34.34% <1.66%> (-0.25%) ⬇️

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

Files with missing lines Coverage Δ
scheduler/resource/persistentcache/task.go 0.00% <ø> (ø)
scheduler/scheduling/evaluator/evaluator.go 68.88% <ø> (ø)
scheduler/scheduling/evaluator/evaluator_base.go 83.83% <60.00%> (ø)
...uler/resource/persistentcache/task_manager_mock.go 0.00% <0.00%> (ø)
scheduler/scheduling/mocks/scheduling_mock.go 44.61% <0.00%> (ø)
...uler/resource/persistentcache/host_manager_mock.go 40.35% <0.00%> (-7.57%) ⬇️
...uler/resource/persistentcache/peer_manager_mock.go 0.00% <0.00%> (ø)
scheduler/resource/persistentcache/task_manager.go 0.00% <0.00%> (ø)
scheduler/resource/persistentcache/peer_manager.go 0.00% <0.00%> (ø)
scheduler/service/service_v2.go 49.13% <0.00%> (-1.41%) ⬇️
... and 2 more

... and 3 files with indirect coverage changes

@gaius-qi gaius-qi merged commit 7c0f0ab into main Jan 26, 2025
27 checks passed
@gaius-qi gaius-qi deleted the feature/schedule branch January 26, 2025 02:46
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.

1 participant