-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Automated cherry pick of #118257: dra scheduler plugin test: fix loopvar bug and "reserve" #118283
Automated cherry pick of #118257: dra scheduler plugin test: fix loopvar bug and "reserve" #118283
Conversation
The `listAll` function returned a slice where all pointers referred to the same instance. That instance had the value of the last list entry. As a result, unit tests only compared that element. During the reserve phase, the first claim gets reserved in two test cases. Those two tests must expect that change. That hadn't been noticed before because that first claim didn't get compared.
The reason for cherry-picking a fix for a test is to make the code ready for a future Go release with different loopvar behavior (see kubernetes/release#3076). /cc @liggitt |
/lgtm |
LGTM label has been added. Git tree hash: 82bc550ecae76d27cf28868ecba5946176664b8d
|
/cc @kubernetes/release-managers |
/triage accepted |
/kind bug |
/release-note-none |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, pohly, saschagrunert 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 |
Cherry pick of #118257 on release-1.27.
#118257: dra scheduler plugin test: fix loopvar bug and "reserve"
For details on the cherry pick process, see the cherry pick requests page.