feat: add scheduler configuration support #4212
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for a
Config
field in theScheduler
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:
Config
field to theScheduler
model inmanager/models/scheduler.go
, represented as aJSONMap
for storing configuration data.Service Layer Enhancements:
CreateScheduler
method inmanager/service/scheduler.go
to map theConfig
field from the request usingstructure.StructToMap
. This ensures proper serialization of the configuration object.UpdateScheduler
method to handle updates to theConfig
field, including serialization of the configuration object.Request Type Changes:
Config
field to bothCreateSchedulerRequest
andUpdateSchedulerRequest
inmanager/types/scheduler.go
, allowing clients to specify configuration data when creating or updating a scheduler. [1] [2]SchedulerConfig
type to define the structure of the configuration object, including fields likeManagerKeepAliveInterval
.Dependency Update:
structure
package inmanager/service/scheduler.go
to facilitate conversion of configuration objects to maps.Description
Related Issue
#4179
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist