Skip to content

KEP-5116: Add KEP (Streaming response encoding)#5119

Merged
k8s-ci-robot merged 2 commits into
kubernetes:masterfrom
serathius:kep-5116
Feb 13, 2025
Merged

KEP-5116: Add KEP (Streaming response encoding)#5119
k8s-ci-robot merged 2 commits into
kubernetes:masterfrom
serathius:kep-5116

Conversation

@serathius

Copy link
Copy Markdown
Contributor

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 31, 2025
@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory 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. labels Jan 31, 2025
@deads2k

deads2k commented Jan 31, 2025

Copy link
Copy Markdown
Contributor

@benluddy can you ptal?

@serathius serathius force-pushed the kep-5116 branch 3 times, most recently from 05be44a to 7267cf4 Compare February 3, 2025 13:04
@serathius

Copy link
Copy Markdown
Contributor Author

/assign @jpbetz

@serathius serathius force-pushed the kep-5116 branch 2 times, most recently from 032c3d0 to 8b5656f Compare February 3, 2025 18:40
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md
@serathius serathius force-pushed the kep-5116 branch 3 times, most recently from 2c8682a to 80a5cb2 Compare February 5, 2025 10:21

@sftim sftim left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks. Here's a bunch of feedback.

Key points:

  • let's be clear about the status of YAML and that streaming encoding to YAML won't be available
    • (does using legacy encoding to YAML provide a route for a malicious client to overload API server memory)?
  • formally, the response to a list is a collection
  • we style list in lower case bold in docs, and I recommend doing that here too.

Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md
@sftim

sftim commented Feb 5, 2025

Copy link
Copy Markdown

BTW if we want to ship JSON and ProtoBuf as beta for v1.33, I don't see anything stopping us doing that and still adding streaming YAML collections before we close the KEP as Done.

Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md
Comment on lines +153 to +155
Then, we will rewrite the gzip compression to buffer the response and delay the
decision to enable compression until we have observed enough bytes to hit the threshold
or we received whole response and we can write it without compressing.

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 an implementation note, by adding an intermediate buffer to the gzip writer wrapper, be careful not to reintroduce the issue where we don't flush headers until a non-zero number of bytes are written

https://github.com/kubernetes/kubernetes/pull/31446/files#diff-67dd9e8f3ee257072765326cb4f242852554a2c0753563fa51e292c0a63a7b94R2488

maybe the code path that hits deferredResponseWriter isn't vulnerable to that issue if it already has the single object it is serializing, but watch out for buffering a generic gzip writer wrapper if we're not sure whether or not we'll have immediate output

@liggitt

liggitt commented Feb 5, 2025

Copy link
Copy Markdown
Member

a couple suggestions but lgtm overall

@serathius serathius force-pushed the kep-5116 branch 2 times, most recently from dfa1854 to fbcb030 Compare February 6, 2025 00:15
@liggitt

liggitt commented Feb 6, 2025

Copy link
Copy Markdown
Member

/lgtm

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

@fuweid fuweid 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.

LGTM(non-binding)!

@liggitt liggitt 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.

this lgtm, will let @deads2k (for apimachinery) and @jpbetz (for PRR) have approval

Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/kep.yaml Outdated
Co-authored-by: Tim Bannister <tim@scalefactory.com>
@sftim

sftim commented Feb 10, 2025

Copy link
Copy Markdown

/retitle KEP-5116: Add KEP (Streaming response encoding)

@k8s-ci-robot k8s-ci-robot changed the title Propose KEP-5116: Streaming response encoding KEP-5116: Add KEP (Streaming response encoding) Feb 10, 2025
@wojtek-t

Copy link
Copy Markdown
Member

this lgtm, will let @deads2k (for apimachinery) and @jpbetz (for PRR) have approval

I'm fine with this as well.

@deads2k @jpbetz - friendly ping for review

@benluddy

Copy link
Copy Markdown
Contributor

LGTM. Strictly constraining the supported types keeps the special-case implementation simple, and client behavior remains unchanged.

Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/sig-api-machinery/5116-streaming-response-encoding/README.md Outdated
Comment thread keps/prod-readiness/sig-api-machinery/5116.yaml Outdated
@deads2k

deads2k commented Feb 12, 2025

Copy link
Copy Markdown
Contributor

needs updates for PRR enable/disable and monitoring. The list of tests looks good. lgtm otherwise.

@serathius

Copy link
Copy Markdown
Contributor Author

needs updates for PRR enable/disable and monitoring. The list of tests looks good. lgtm otherwise.

Fixed, thanks for review!

@deads2k

deads2k commented Feb 13, 2025

Copy link
Copy Markdown
Contributor

/lgtm
/approve

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

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, fuweid, serathius

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 13, 2025
@k8s-ci-robot k8s-ci-robot merged commit 0eb98c7 into kubernetes:master Feb 13, 2025
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Feb 13, 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants