Closed utam0k closed 4 months ago
I'll fix it tomorrow.
@sanposhiho @codefromthecrypt This PR is ready for your review 🙏
/assign /assign @Gekko0114
@utam0k Overall looks good! Left minor comments.
hmm I'll check failure in CI
I guess because within Test_guestPool_bindingCycles, Filter is not called. But permit function expects to have called Filter in cyclestate's wasm. I also stacked this part before :)
I guess because within Test_guestPool_bindingCycles, Filter is not called. But permit function expects to have called Filter in cyclestate's wasm. I also stacked this part before :)
@Gekko0114
Thanks for your comment. But this is an error message. It seems we need to call PreFilter
...? 🤔 We have already called it before calling PreBind, right? Do you know the cause of this error?
$ go test -run 'Test_guestPool_bindingCycles$' ./plugin -count=1
--- FAIL: Test_guestPool_bindingCycles (0.13s)
plugin_test.go:129: prebind failed: wasm: prebind error: panic: didn't cache pod from score
wasm error: unreachable
wasm stack trace:
.runtime._panic(i32,i32)
.prebind() i32
FAIL
FAIL sigs.k8s.io/kube-scheduler-wasm-extension/scheduler/plugin 0.153s
FAIL
It seems podSpec
in wasm became nil after calling Permit 🤔 Why... ?
I guess because within Test_guestPool_bindingCycles, Filter is not called. But permit function expects to have called Filter in cyclestate's wasm. I also stacked this part before :)
@Gekko0114
Thanks for your comment. But this is an error message. It seems we need to call
PreFilter
...? 🤔 We have already called it before calling PreBind, right? Do you know the cause of this error?$ go test -run 'Test_guestPool_bindingCycles$' ./plugin -count=1 --- FAIL: Test_guestPool_bindingCycles (0.13s) plugin_test.go:129: prebind failed: wasm: prebind error: panic: didn't cache pod from score wasm error: unreachable wasm stack trace: .runtime._panic(i32,i32) .prebind() i32 FAIL FAIL sigs.k8s.io/kube-scheduler-wasm-extension/scheduler/plugin 0.153s FAIL
I see. I thought it because of 'make test's error log below. Did you get error even after fixing this issue?
E1213 13:22:36.656076 16802 guest.go:236] wasm: unreserve error: panic: didn't propagate state from pre-filter
Or maybe this function causes this issue...?? I will take a look when I have time, sorry for not having a clear answer
pl.pool.freeFromBinding(pod.UID)
I guess this failure might be caused by my previous PR (these parts might not be necessary). https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension/blob/main/guest/testdata/cyclestate/main.go#L180-L182
I am asking to @sanposhiho about this point. BTW if you are in the slack of kubernetes workplace, could you ping me? Sometimes discussing on slack might be useful.
sanposhiho fixed the issue. So this failure will be fixed. https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension/pull/86
@Gekko0114 Don't worry, thanks for your look 🙏
Or maybe this function causes this issue...?? I will take a look when I have time, sorry for not having a clear answer
@utam0k Thanks! Left minor comments.
@utam0k Overall looks good! Sorry, I left one comment about typo.
@Gekko0114 Did you forget to submit your review? I didn't find your comment 😭
Sorry, I left one comment about typo.
@utam0k So sorry, seems I didn't submit my comments. Please let me know if you can't see it even now.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: sanposhiho, utam0k
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/lgtm
Thank you so much!
What type of PR is this?
/kind feature /kind api-change
What this PR does / why we need it:
Support Reserve plugin
Which issue(s) this PR fixes:
Part of https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension/issues/72
Special notes for your reviewer:
Does this PR introduce a user-facing change?
What are the benchmark results of this change?