Skip to content

feat: add last keep alive at tracking for scheduler service #4213

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

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

chlins
Copy link
Member

@chlins chlins commented Jul 16, 2025

This pull request introduces functionality to track the last heartbeat time of schedulers in the system. The changes include updates to the Scheduler model, modifications to RPC server methods for scheduler creation and updates, and enhancements to the keep-alive mechanism.

Model Updates:

RPC Server Enhancements:

  • Updated the UpdateScheduler and createScheduler methods to set the LastHeartbeat field to the current time when a scheduler is updated or created. (manager/rpcserver/manager_server_v2.go, [1] [2]
  • Enhanced the KeepAlive method to update the LastHeartbeat field for schedulers upon successful keep-alive requests. (manager/rpcserver/manager_server_v2.go, manager/rpcserver/manager_server_v2.goR874-R887)
  • Imported the time package to support the timestamp functionality in RPC server methods. (manager/rpcserver/manager_server_v2.go, manager/rpcserver/manager_server_v2.goR24)

Description

Related Issue

#4179

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.

@chlins chlins added this to the v2.4.0 milestone Jul 16, 2025
@chlins chlins requested a review from a team as a code owner July 16, 2025 08:39
@chlins chlins added the enhancement New feature or request label Jul 16, 2025
@chlins chlins enabled auto-merge (squash) July 16, 2025 08:40
Copy link

codecov bot commented Jul 16, 2025

Codecov Report

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

Project coverage is 32.62%. Comparing base (88cc9b6) to head (b7e67a9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
manager/rpcserver/manager_server_v2.go 0.00% 14 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4213   +/-   ##
=======================================
  Coverage   32.62%   32.62%           
=======================================
  Files         350      350           
  Lines       41204    41216   +12     
=======================================
+ Hits        13442    13447    +5     
- Misses      26871    26879    +8     
+ Partials      891      890    -1     
Flag Coverage Δ
unittests 32.62% <0.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
manager/rpcserver/manager_server_v2.go 0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

gaius-qi
gaius-qi previously approved these changes Jul 16, 2025
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

Liam-Zhao
Liam-Zhao previously approved these changes Jul 16, 2025
Copy link

@Liam-Zhao Liam-Zhao left a comment

Choose a reason for hiding this comment

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

LGTM

@chlins chlins dismissed stale reviews from Liam-Zhao and gaius-qi via 7476ba6 July 16, 2025 08:48
@chlins chlins force-pushed the feat/scheduler-last-heartbeat branch from 2578c38 to 7476ba6 Compare July 16, 2025 08:48
@chlins chlins force-pushed the feat/scheduler-last-heartbeat branch from 7476ba6 to b7e67a9 Compare July 16, 2025 10:15
@chlins chlins changed the title feat: add last heartbeat tracking for scheduler service feat: add last keep alive at tracking for scheduler service Jul 16, 2025
Copy link

@Liam-Zhao Liam-Zhao left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@chlins chlins merged commit 93dc9ef into main Jul 16, 2025
16 checks passed
@chlins chlins deleted the feat/scheduler-last-heartbeat branch July 16, 2025 11:20
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.

6 participants