Add custom models,terms and cluster-name support - #29
Open
khansaad wants to merge 2 commits into
Open
Conversation
Signed-off-by: Saad Khan <saakhan@ibm.com>
Reviewer's GuideAdds support for propagating cluster name, configurable default models, and default terms into the Bulk API payload, sourced from datasource metadata and application configuration, plus wiring for deployment configuration and datasource model changes. Sequence diagram for building Bulk API payload with cluster and model/term settingssequenceDiagram
participant BulkSchedulerService
participant KruizeStateService
participant Datasource
BulkSchedulerService->>KruizeStateService: getClusterNameFromDatasource()
KruizeStateService->>Datasource: getClusters()
Datasource-->>KruizeStateService: clusters
KruizeStateService-->>BulkSchedulerService: Optional<String>
BulkSchedulerService->>BulkSchedulerService: buildBulkPayload(targetLabels, datasource, metadataProfile, metricProfile, clusterName)
BulkSchedulerService->>BulkSchedulerService: parseCommaSeparatedList(defaultModels)
BulkSchedulerService->>BulkSchedulerService: parseCommaSeparatedList(defaultTerms)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The ConfigProperty key
kruize.defaults.cluster-nameinBulkSchedulerServicedoes not match theapplication.ymlpath (kruize.bulk.cluster-name), so the configured value will never be picked up; align the property name with the YAML structure. getClusterNameFromDatasource()callsdefaultDatasource.equals(ds.getName())without a null check ondefaultDatasource, which can NPE if the default datasource name is unset; consider usingObjects.equals(defaultDatasource, ds.getName())or guarding against null.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The ConfigProperty key `kruize.defaults.cluster-name` in `BulkSchedulerService` does not match the `application.yml` path (`kruize.bulk.cluster-name`), so the configured value will never be picked up; align the property name with the YAML structure.
- `getClusterNameFromDatasource()` calls `defaultDatasource.equals(ds.getName())` without a null check on `defaultDatasource`, which can NPE if the default datasource name is unset; consider using `Objects.equals(defaultDatasource, ds.getName())` or guarding against null.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: Saad Khan <saakhan@ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR adds support to allow custom models, terms and cluster_name as part of the payload construction for the Bulk API.
Sample JSON Structure:
Summary by Sourcery
Add cluster name, model settings, and term settings to the Bulk API payload using configurable defaults and datasource metadata.
New Features:
Enhancements:
Build: