kubernetes-sigs / kube-scheduler-wasm-extension

All the things to make the scheduler extendable with wasm.
Apache License 2.0
83 stars 16 forks source link

guest: inlines host.GetConfig to config.Get #66

Closed codefromthecrypt closed 9 months ago

codefromthecrypt commented 9 months ago

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This inlines host.GetConfig() to config.Get() after noticing logging will be in another package. This is simpler than describing a new term "host" which is only used to get configuration.

Which issue(s) this PR fixes:

NONE

Special notes for your reviewer:

This also does refactoring to sketch out how to test logic that requires wasm imports.

Does this PR introduce a user-facing change?

NONE

What are the benchmark results of this change?

goos: darwin
goarch: arm64
pkg: sigs.k8s.io/kube-scheduler-wasm-extension/internal/e2e/scheduler
                          │ before.txt  │              now.txt              │
                          │   sec/op    │   sec/op     vs base              │
Example_NodeNumber/New-12   73.68m ± 2%   75.34m ± 2%       ~ (p=0.093 n=6)
Example_NodeNumber/Run-12   46.12µ ± 4%   46.82µ ± 1%       ~ (p=0.394 n=6)
geomean                     1.843m        1.878m       +1.88%
codefromthecrypt commented 9 months ago

oops one more thing to settle

k8s-ci-robot commented 9 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: codefromthecrypt, sanposhiho

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension/blob/main/OWNERS)~~ [codefromthecrypt,sanposhiho] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment