Skip to content

fix: stop reseeding picker RNG on every pick#2805

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
danehans:fix-picker-rng-seeding
Apr 7, 2026
Merged

fix: stop reseeding picker RNG on every pick#2805
k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
danehans:fix-picker-rng-seeding

Conversation

@danehans
Copy link
Copy Markdown
Contributor

@danehans danehans commented Apr 7, 2026

What type of PR is this?
/kind bug
/kind flake

What this PR does / why we need it:
This switches picker randomness away from creating a fresh time-seeded RNG on every call and instead uses a shared locked RNG stream for shuffle and weighted sampling.

That removes timing-sensitive behavior in the weighted random picker path and stabilizes the picker tests that can fail intermittently in broader test and release runs.

Which issue(s) this PR fixes:
Fixes #2804

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/flake Categorizes issue or PR as related to a flaky test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 7, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danehans

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 7, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 2636202
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/69d55f1b83b9ac00081c3e01
😎 Deploy Preview https://deploy-preview-2805--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Fixes kubernetes-sigs#2804

Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
@danehans danehans force-pushed the fix-picker-rng-seeding branch from 82fecae to 2636202 Compare April 7, 2026 19:46
@danehans danehans changed the title Stop reseeding picker RNG on every pick fix: stop reseeding picker RNG on every pick Apr 7, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Keywords which can automatically close issues and hashtag(#) mentions are not allowed in commit messages.

The list of commits with invalid commit messages:

  • 2636202 fix: stop reseeding picker RNG on every pick
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@danehans danehans removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Apr 7, 2026
@ahg-g
Copy link
Copy Markdown
Contributor

ahg-g commented Apr 7, 2026

/assign @kaushikmitr

@kaushikmitr
Copy link
Copy Markdown
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 7, 2026
@k8s-ci-robot k8s-ci-robot merged commit 4dacdb9 into kubernetes-sigs:main Apr 7, 2026
13 checks passed
@danehans danehans deleted the fix-picker-rng-seeding branch April 7, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/flake Categorizes issue or PR as related to a flaky test. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WeightedRandomPicker reseeds per pick and makes picker tests flaky

4 participants