-
Notifications
You must be signed in to change notification settings - Fork 174
test: add test for scheduling bug triggered by setting auto-balance to best-effort
#3889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
test: add test for scheduling bug triggered by setting auto-balance to best-effort
#3889
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bcc23ef to
00b7c21
Compare
00b7c21 to
60573f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running: golangci-lint
scheduler/replica_scheduler_test.go:1371:31: QF1008: could remove embedded field "ObjectMeta" from selector (staticcheck)
replica.Spec.NodeID = node.ObjectMeta.Name
^
scheduler/replica_scheduler_test.go:1376:24: QF1008: could remove embedded field "ObjectMeta" from selector (staticcheck)
id := getDiskID(node.ObjectMeta.Name, strconv.FormatInt(index, 10))
^
2 issues:
* staticcheck: 2
@marnixbouhuis CI golangci-lint staticcheck failed. Could you help fix it?
| addDisks(node2, 1, node2disk1, TestDiskAvailableSize/2-100, false) // No replica | ||
| expectedDiskID := addDisks(node2, 2, node2disk2, TestDiskAvailableSize/2, false) // No replica, scheduler should choose this since it has the most storage available from the valid options. | ||
|
|
||
| // TODO: setting the next line to "best-effort" causes the test to fail. Removing this line bypasses the bug and makes the test pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the TODO comment.
6c61a9b to
138e969
Compare
…o best-effort Signed-off-by: Marnix Bouhuis <[email protected]>
138e969 to
b75bafd
Compare
|
Hi @c3y1huang, noticed the branch was force pushed. Is this still an issue? 🙂 |
Which issue(s) this PR fixes:
this PR is not a fix, it's a test case to reproduce the bug described in longhorn/longhorn#11189
What this PR does / why we need it:
reproduce bug
Special notes for your reviewer:
test fails on purpose
Additional documentation or context