Skip to content

Conversation

liu-cong
Copy link
Contributor

@liu-cong liu-cong commented Dec 4, 2024

  • Fix a bug in main and a couple tests
  • Adjust the logging level to be consistent with the rest: use V(3) for request level info logs.

@k8s-ci-robot k8s-ci-robot requested review from ahg-g and kfswain December 4, 2024 18:05
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 4, 2024
modelObj := s.datastore.FetchModelData(model)
if modelObj != nil && len(modelObj.TargetModels) > 0 {
modelName = backend.RandomWeightedDraw(modelObj)
modelName = backend.RandomWeightedDraw(modelObj, 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the bug, missing the seed value argument

return resp, nil
}

func (s *Server) FetchModelData(modelName string) (returnModel *v1alpha1.Model) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to datastore for better encapsulation. Also makes it easier to fake the datastore in tests.

@kfswain
Copy link
Collaborator

kfswain commented Dec 4, 2024

/approve thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kfswain, liu-cong

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2024
@kfswain
Copy link
Collaborator

kfswain commented Dec 4, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 4, 2024
@k8s-ci-robot k8s-ci-robot merged commit 8ee49b1 into kubernetes-sigs:main Dec 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants