Skip to content

Conversation

@marnixbouhuis
Copy link

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

@coderabbitai
Copy link

coderabbitai bot commented Jul 1, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@c3y1huang c3y1huang left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the TODO comment.

@c3y1huang c3y1huang force-pushed the feat/test-best-effort-auto-balance-bug branch 2 times, most recently from 6c61a9b to 138e969 Compare November 26, 2025 09:05
@derekbit derekbit force-pushed the feat/test-best-effort-auto-balance-bug branch from 138e969 to b75bafd Compare November 28, 2025 04:04
@marnixbouhuis
Copy link
Author

Hi @c3y1huang, noticed the branch was force pushed. Is this still an issue? 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants