Skip to content

feat: add scheduler configuration support #4212

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
Merged

Conversation

chlins
Copy link
Member

@chlins chlins commented Jul 16, 2025

This pull request introduces support for a Config field in the Scheduler model, enabling more flexible configuration management. The changes include updates to the database model, service layer, and request types to handle the new configuration field.

Model Updates:

  • Added a new Config field to the Scheduler model in manager/models/scheduler.go, represented as a JSONMap for storing configuration data.

Service Layer Enhancements:

  • Updated the CreateScheduler method in manager/service/scheduler.go to map the Config field from the request using structure.StructToMap. This ensures proper serialization of the configuration object.
  • Modified the UpdateScheduler method to handle updates to the Config field, including serialization of the configuration object.

Request Type Changes:

  • Added a Config field to both CreateSchedulerRequest and UpdateSchedulerRequest in manager/types/scheduler.go, allowing clients to specify configuration data when creating or updating a scheduler. [1] [2]
  • Introduced a new SchedulerConfig type to define the structure of the configuration object, including fields like ManagerKeepAliveInterval.

Dependency Update:

  • Imported the structure package in manager/service/scheduler.go to facilitate conversion of configuration objects to maps.

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 07:09
@chlins chlins added the enhancement New feature or request label Jul 16, 2025
@chlins chlins enabled auto-merge (squash) July 16, 2025 07:09
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

codecov bot commented Jul 16, 2025

Codecov Report

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

Project coverage is 32.63%. Comparing base (2a30115) to head (fdab4fa).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
manager/service/scheduler.go 0.00% 16 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4212      +/-   ##
==========================================
- Coverage   32.65%   32.63%   -0.02%     
==========================================
  Files         350      350              
  Lines       41188    41204      +16     
==========================================
- Hits        13451    13448       -3     
- Misses      26849    26867      +18     
- Partials      888      889       +1     
Flag Coverage Δ
unittests 32.63% <0.00%> (-0.02%) ⬇️

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

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

... and 1 file with indirect coverage changes

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

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 88cc9b6 into main Jul 16, 2025
18 of 19 checks passed
@chlins chlins deleted the feat/scheduler-config branch July 16, 2025 08:31
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.

5 participants