Skip to content

Add a test to validate deferredResponseWriter on multiple writes #130190

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
nkeert:test-validate-deferredResponseWriter-for-multiple-writes
Feb 19, 2025
Merged

Add a test to validate deferredResponseWriter on multiple writes #130190
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
nkeert:test-validate-deferredResponseWriter-for-multiple-writes

Conversation

@nkeert
Copy link
Copy Markdown
Contributor

@nkeert nkeert commented Feb 15, 2025

What type of PR is this?

What this PR does / why we need it:

Thie PR adds test for deferredResponseWriter as requested in #130168

Which issue(s) this PR fixes:

Fixes #130168

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 15, 2025
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Feb 15, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: nkeert / name: NKeert (45e2f3e)

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Feb 15, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Welcome @nkeert!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 15, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @nkeert. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Feb 15, 2025
@k8s-ci-robot k8s-ci-robot requested review from enj and tkashem February 15, 2025 05:40
@k8s-ci-robot k8s-ci-robot added area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 15, 2025
@nkeert nkeert changed the title Add a test to validate deferredResponseWriteron multiple write calls Add a test to validate deferredResponseWriter on multiple writes Feb 15, 2025
t.Fatalf("failed to decompress: %v", err)
}

if len(decompressed) != tt.resSize {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you compare contents instead of just size?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, I have update the PR with the suggestion.

@serathius
Copy link
Copy Markdown
Contributor

Looks great! Thanks for fast response.

/ok-to-test
cc @liggitt

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 16, 2025
@nkeert nkeert force-pushed the test-validate-deferredResponseWriter-for-multiple-writes branch 3 times, most recently from 817a620 to f35ddf8 Compare February 16, 2025 12:39
@serathius
Copy link
Copy Markdown
Contributor

/retest

name string
chunks [][]byte
expectGzip bool
resSize int
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't think testing resSize is needed anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review. I have updated the PR.

@serathius
Copy link
Copy Markdown
Contributor

/lgtm

/assign @liggitt @deads2k

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 17, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 45c22fef75c75b44415e59a51d5b9b729a15b184

Signed-off-by: nkeert <197718357+nkeert@users.noreply.github.com>
@nkeert nkeert force-pushed the test-validate-deferredResponseWriter-for-multiple-writes branch from f35ddf8 to 45e2f3e Compare February 17, 2025 23:53
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 17, 2025
@nkeert
Copy link
Copy Markdown
Contributor Author

nkeert commented Feb 17, 2025

/retest

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM(nb)!

@serathius
Copy link
Copy Markdown
Contributor

/retest

Copy link
Copy Markdown
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

{
name: "two small chunk writes",
chunks: [][]byte{smallChunk, smallChunk},
expectGzip: false,
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.

just leaving a comment here that we consider this to be sort of a bug, so that when we change the implementation in the future and fix this case, editing the unit test at the same time will not be surprising in the diff

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 18, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 3f516ee30accd341287d0314ba0fd6b30048070b

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fuweid, liggitt, nkeert

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 18, 2025
@cici37
Copy link
Copy Markdown
Contributor

cici37 commented Feb 18, 2025

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 18, 2025
@serathius
Copy link
Copy Markdown
Contributor

/kind feature

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Feb 19, 2025
@serathius
Copy link
Copy Markdown
Contributor

/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 Feb 19, 2025
@k8s-ci-robot k8s-ci-robot merged commit 7fc8a86 into kubernetes:master Feb 19, 2025
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Feb 19, 2025
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/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement tests for deferredResponseWriter to validate behavior on multiple writer calls.

8 participants