Skip to content

Conversation

@wangchen615
Copy link
Contributor

@wangchen615 wangchen615 commented Feb 25, 2021

This PR is to solve and close issue #144 .

It can use load-watcher:v0.1.1 both as a service and as a library to fetch metrics in Trimaran TargetLoadPacking plugin.
The configuration is backward compatible.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 25, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @wangchen615!

It looks like this is your first PR to kubernetes-sigs/scheduler-plugins 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/scheduler-plugins has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 25, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @wangchen615. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 25, 2021
@wangchen615 wangchen615 changed the title Resolve issue #144 Add library support for Trimaran TargetLoadPacking plugin (Resolve issue #144) Feb 25, 2021
@denkensk
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 26, 2021
@Huang-Wei
Copy link
Contributor

@wangchen615 could you fix the integration test failure: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_scheduler-plugins/152/pull-scheduler-plugins-integration-test/1365256888135979008?

@zorro786 could you help to ensure the tests covers different metric providers? UT or integration test is either fine.

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 1, 2021
@wangchen615
Copy link
Contributor Author

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 1, 2021
@zorro786
Copy link
Contributor

zorro786 commented Mar 1, 2021

@zorro786 could you help to ensure the tests covers different metric providers? UT or integration test is either fine.

@Huang-Wei I hope you meant to add these tests in load-watcher repo for each metric provider? Since load-watcher is used as a library, the validation for metric provider impls (which are internal) would reside there. In scheduler-plugins there should be tests on env vars interaction with library for example?

@Huang-Wei
Copy link
Contributor

@Huang-Wei I hope you meant to add these tests in load-watcher repo for each metric provider? Since load-watcher is used as a library, the validation for metric provider impls (which are internal) would reside there. In scheduler-plugins there should be tests on env vars interaction with library for example?

It'd be good enough if different metric provider impl has been covered in load-wather side.

@wangchen615
Copy link
Contributor Author

@zorro786 could you help to ensure the tests covers different metric providers? UT or integration test is either fine.

@Huang-Wei I hope you meant to add these tests in load-watcher repo for each metric provider? Since load-watcher is used as a library, the validation for metric provider impls (which are internal) would reside there. In scheduler-plugins there should be tests on env vars interaction with library for example?

@zorro786 scheduler plugins now pass args as parameters to create a library client, it is not really using the envs. So I am not sure how to test just the args.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 1, 2021
@zorro786
Copy link
Contributor

zorro786 commented Mar 1, 2021

@zorro786 scheduler plugins now pass args as parameters to create a library client, it is not really using the envs. So I am not sure how to test just the args.

Ah I meant testing args sorry. Please see cmd/scheduler/main_test.go

update gofmt

Apply suggestions from code review

Apply some changes in readme.md and the naming issues according to the code review.

Co-authored-by: Abdul Qadeer <[email protected]>

change the metricProviderSpec for TargetLoadPackingArgs

update gofmt

Add example yamls for both library and service client approach

Add Operator Field in the WatcherMetrics for both plugin and testing

update gofmt

add operator in node metrics for integration test

update gofmt

revert pkg/apis/config/v1beta1/zz_generated.defaults.go

Update the comments for MetricProvider
@Huang-Wei
Copy link
Contributor

/lgtm
/approve

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 2, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Huang-Wei, wangchen615

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 Mar 2, 2021
@k8s-ci-robot k8s-ci-robot merged commit 2a22e0d into kubernetes-sigs:master Mar 2, 2021
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

5 participants