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: store persistent cache host by announce host api #3640

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

gaius-qi
Copy link
Member

Description

This pull request enhances the AnnounceHost function in scheduler/service/service_v2.go to handle both standard and persistent cache hosts. The most significant changes are the addition of logic to manage the persistent cache hosts, including their creation, updating, and storage.

Enhancements to AnnounceHost function:

  • Added handling for persistent cache hosts, including loading, creating, and updating host properties.
  • Implemented detailed property setting for persistent cache hosts, covering CPU, memory, network, disk, and build information.
  • Added logging for the creation and updating of persistent cache hosts to provide better traceability.

These changes ensure that the system can now manage persistent cache hosts effectively, alongside the existing standard hosts.

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 Nov 11, 2024
@gaius-qi gaius-qi added this to the v2.2.0 milestone Nov 11, 2024
@gaius-qi gaius-qi self-assigned this Nov 11, 2024
@gaius-qi gaius-qi requested a review from a team as a code owner November 11, 2024 04:06
@gaius-qi gaius-qi force-pushed the feature/announce-host branch from e2fe79d to f2c2570 Compare November 11, 2024 07:37
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 92.91045% with 19 lines in your changes missing coverage. Please review.

Project coverage is 35.76%. Comparing base (10062d7) to head (f2c2570).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...uler/resource/persistentcache/task_manager_mock.go 0.00% 18 Missing ⚠️
scheduler/resource/persistentcache/host_manager.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3640      +/-   ##
==========================================
+ Coverage   35.30%   35.76%   +0.45%     
==========================================
  Files         337      337              
  Lines       37652    37844     +192     
==========================================
+ Hits        13294    13534     +240     
+ Misses      23517    23469      -48     
  Partials      841      841              
Flag Coverage Δ
unittests 35.76% <92.91%> (+0.45%) ⬆️

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

Files with missing lines Coverage Δ
scheduler/resource/persistentcache/host.go 100.00% <100.00%> (+100.00%) ⬆️
scheduler/service/service_v2.go 68.11% <100.00%> (+3.74%) ⬆️
scheduler/resource/persistentcache/host_manager.go 0.00% <0.00%> (ø)
...uler/resource/persistentcache/task_manager_mock.go 0.00% <0.00%> (ø)

... and 5 files with indirect coverage changes

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 8711108 into main Nov 11, 2024
27 checks passed
@gaius-qi gaius-qi deleted the feature/announce-host branch November 11, 2024 09:24
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.

4 participants