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 persistent cache task from peer #3786

Merged
merged 1 commit into from
Jan 26, 2025
Merged

feat: delete persistent cache task from peer #3786

merged 1 commit into from
Jan 26, 2025

Conversation

gaius-qi
Copy link
Member

Description

This pull request includes various improvements and bug fixes across multiple files, primarily focusing on enhancing the PeerManager interface and related functionalities. The most important changes include adding new methods to the PeerManager interface, updating logging for better error tracking, and modifying the DeletePersistentCacheTask function to ensure proper cleanup.

Enhancements to PeerManager interface:

  • Added LoadAllIDsByTaskID and LoadAllIDsByHostID methods to the PeerManager interface to retrieve peer IDs by task ID and host ID respectively. [1] [2]

Logging improvements:

  • Updated error messages in several methods to include detailed error information for better debugging. [1] [2] [3] [4] [5]

Refactoring in scheduler/service/service_v2.go:

  • Modified DeletePersistentCachePeer to delete the persistent cache task from the peer and handle potential errors during the deletion process.
  • Updated DeletePersistentCacheTask to ensure all related peers are properly deleted and their associated tasks are removed from the peers.

Minor changes:

  • Renamed variables in scheduler/job/job.go for consistency and clarity. [1] [2]
  • Updated dependency version in go.mod.

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 26, 2025
@gaius-qi gaius-qi added this to the v2.3.0 milestone Jan 26, 2025
@gaius-qi gaius-qi self-assigned this Jan 26, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner January 26, 2025 05:38
Copy link

codecov bot commented Jan 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 71 lines in your changes missing coverage. Please review.

Project coverage is 34.31%. Comparing base (7c0f0ab) to head (88de440).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
scheduler/resource/persistentcache/peer_manager.go 0.00% 34 Missing ⚠️
scheduler/service/service_v2.go 0.00% 33 Missing ⚠️
scheduler/job/job.go 0.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3786      +/-   ##
==========================================
- Coverage   34.34%   34.31%   -0.03%     
==========================================
  Files         337      337              
  Lines       38789    38831      +42     
==========================================
+ Hits        13321    13324       +3     
- Misses      24625    24664      +39     
  Partials      843      843              
Flag Coverage Δ
unittests 34.31% <0.00%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
scheduler/job/job.go 0.00% <0.00%> (ø)
scheduler/service/service_v2.go 48.53% <0.00%> (-0.60%) ⬇️
scheduler/resource/persistentcache/peer_manager.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

@gaius-qi gaius-qi merged commit a1cb0a4 into main Jan 26, 2025
22 of 27 checks passed
@gaius-qi gaius-qi deleted the feature/delete branch January 26, 2025 05:50
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.

2 participants