Skip to content

conformance: make weight test 100x faster - #4740

Merged
k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
howardjohn:c/weight-fast
Apr 15, 2026
Merged

k8s-ci-robot merged 2 commits into
kubernetes-sigs:mainfrom
howardjohn:c/weight-fast

Conversation

@howardjohn

Copy link
Copy Markdown
Contributor

What type of PR is this?

/area conformance-machinery

What this PR does / why we need it:
The current test takes 17s due to randomly injected sleep across 500 requests. This happens twice (HTTP and GRPC) for a total of 34s for these 2 tests.

With this PR, the test takes <1s for me.

For context, our entire e2e suite outside of gateway-api conformance takes 27s, so this 1 test is more than doubling our test times.

The original context for this was
#3827 (comment). I don't think this is needed for the test; if an implementation requires the entropy to properly distribute weight then it is broken and should fail. And I am not sure of any possible implementation that would only work with entropy; however, I did leave the randomized payload part of the suggestion (the original suggestion was to add something not necesarily sleeping).

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:


The current test takes 17s due to randomly injected sleep across 500
requests. This happens twice (HTTP and GRPC) for a total of 34s for
these 2 tests.

With this PR, the test takes <1s for me.

For context, our entire e2e suite outside of gateway-api conformance
takes 27s, so this 1 test is more than doubling our test times.

The original context for this was
kubernetes-sigs#3827 (comment).
I don't think this is needed for the test; if an implementation requires
the entropy to properly distribute weight then it is broken and *should*
fail. And I am not sure of any possible implementation that would only
work *with* entropy; however, I did leave the randomized payload part of
the suggestion (the original suggestion was to add *something* not
necesarily sleeping).
@k8s-ci-robot k8s-ci-robot added area/conformance-machinery Issues or PRs related to the machinery and the suite used to run conformance tests. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 9, 2026
@howardjohn

Copy link
Copy Markdown
Contributor Author

/assign @LiorLieberman

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 9, 2026
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 9, 2026
@howardjohn howardjohn changed the title conformance: make weight test 1000x faster conformance: make weight test 100x faster Apr 9, 2026

@snorwin snorwin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@howardjohn thanks, just added a small nit.

Comment thread conformance/utils/weight/weight.go Outdated
Comment on lines 213 to 215
// AddRandomEntropy randomly chooses to add delay, random value, or both
// The addRandomValue function should be provided by the caller to handle
// protocol-specific ways of adding the random value (HTTP headers, gRPC metadata, etc.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: the description here should be updated as well

@snorwin

snorwin commented Apr 14, 2026

Copy link
Copy Markdown
Member

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 14, 2026
Comment thread conformance/utils/weight/weight.go Resolved

@snorwin snorwin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@howardjohn thanks a lot.

/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 15, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: howardjohn, snorwin

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 merged commit a811d17 into kubernetes-sigs:main Apr 15, 2026
20 checks passed
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. area/conformance-machinery Issues or PRs related to the machinery and the suite used to run conformance tests. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants