Skip to content

cri streaming option a hardcut - add new staging repositories streaming and cri-streaming#137298

Merged
k8s-ci-robot merged 5 commits into
kubernetes:masterfrom
dims:dsri/cri-streaming-option-a-hardcut
Mar 13, 2026
Merged

cri streaming option a hardcut - add new staging repositories streaming and cri-streaming#137298
k8s-ci-robot merged 5 commits into
kubernetes:masterfrom
dims:dsri/cri-streaming-option-a-hardcut

Conversation

@dims

@dims dims commented Feb 27, 2026

Copy link
Copy Markdown
Member

What type of PR is this?

/kind cleanup
/kind feature

What this PR does / why we need it:

Extracts CRI streaming and shared streaming transport code into dedicated staging modules, while preserving public client-go API compatibility for downstream users.

  • Adds new staging module k8s.io/cri-streaming
    • CRI exec/attach/portforward server implementation, request cache, server wiring, and tests.
  • Adds new staging module k8s.io/streaming
    • canonical home for shared transport primitives: httpstream, spdy, wsstream, and runtime helpers.
  • Switches in-tree transport consumers to k8s.io/streaming
    • includes client-go, apiserver, kubectl, kube-aggregator, e2e/framework callers, and related tests.
  • Removes in-tree kubelet CRI streaming package (staging/src/k8s.io/kubelet/pkg/cri/streaming).
  • Preserves NO_PROXY/no_proxy CIDR behavior in the extracted SPDY roundtripper default proxier.
  • Adds deprecated compatibility wrappers in k8s.io/apimachinery/pkg/util/httpstream (httpstream, spdy, wsstream) backed by k8s.io/streaming for external users.
  • Restores exported client-go SPDY/portforward API signatures to k8s.io/apimachinery/pkg/util/httpstream types to avoid downstream breakage.
  • Adds streaming-native client-go adapters/constructors (spdy + portforward) so in-tree callers can use k8s.io/streaming types directly while compatibility signatures remain stable.
  • Deduplicates SPDY-over-websocket dial negotiation shared by compat and streaming tunneling dialers.
  • Adds logging for dropped unknown stream types in RemoveStreams adapter fallbacks to improve compatibility-path debuggability.
  • Adds integration coverage for the streaming-upgrader-to-client-go-compat adapter path against a real cri-streaming exec endpoint.
  • Clarifies kubectl streaming import aliasing to avoid httpstream package ambiguity.
  • Removes unused deprecated staging/src/k8s.io/apiserver/pkg/util/wsstream/legacy.go.
  • Updates import restrictions, staging publishing metadata, and module/workspace/vendor metadata.

Which issue(s) this PR is related to:

N/A

Special notes for your reviewer:

  • This PR is intentionally a single squashed commit.
  • Compatibility decision: k8s.io/apimachinery/pkg/util/httpstream remains as deprecated wrapper APIs for external consumers; in-tree callers are migrated to k8s.io/streaming.

Does this PR introduce a user-facing change?

Introduces new staging modules `k8s.io/streaming` and `k8s.io/cri-streaming` for Kubernetes streaming transport and CRI streaming server code.

`k8s.io/apimachinery/pkg/util/httpstream` (including `spdy` and `wsstream`) remains available as a deprecated compatibility wrapper backed by `k8s.io/streaming`.

The extracted SPDY roundtripper preserves CIDR matching in `NO_PROXY`/`no_proxy`.

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

N/A

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. 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: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. 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. labels Feb 27, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 27, 2026
@k8s-ci-robot k8s-ci-robot requested review from a team, cpanato and derekwaynecarr February 27, 2026 21:18
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dependency Issues or PRs related to dependency changes area/kubelet area/release-eng Issues or PRs related to the Release Engineering subproject area/test sig/node Categorizes an issue or PR as relevant to SIG Node. sig/release Categorizes an issue or PR as relevant to SIG Release. labels Feb 27, 2026
@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Feb 27, 2026
@k8s-ci-robot k8s-ci-robot added the wg/device-management Categorizes an issue or PR as relevant to WG Device Management. label Feb 27, 2026
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 27, 2026
@dims

dims commented Mar 1, 2026

Copy link
Copy Markdown
Member Author

/test pull-kubernetes-unit

@dims

dims commented Mar 1, 2026

Copy link
Copy Markdown
Member Author

/skip

1 similar comment
@dims

dims commented Mar 1, 2026

Copy link
Copy Markdown
Member Author

/skip

Comment thread staging/src/k8s.io/streaming/OWNERS
Comment thread staging/publishing/import-restrictions.yaml
Comment thread staging/src/k8s.io/api/go.mod Outdated
@dims

dims commented Mar 6, 2026

Copy link
Copy Markdown
Member Author

/test pull-kubernetes-integration
/test pull-kubernetes-unit-windows-master

dims added 4 commits March 12, 2026 09:59
Extract streaming code into dedicated staging modules while keeping stable
compatibility APIs for external client-go consumers.

This commit:
- adds `k8s.io/cri-streaming` for CRI exec/attach/portforward server code
- adds `k8s.io/streaming` as the canonical home for shared transport
  primitives (`httpstream`, `spdy`, `wsstream`, runtime helpers)
- switches in-tree transport consumers to `k8s.io/streaming`
- removes in-tree kubelet CRI streaming package
- preserves NO_PROXY/no_proxy CIDR handling in extracted SPDY proxier logic
- adds deprecated `k8s.io/apimachinery/pkg/util/httpstream` compatibility
  wrappers (`httpstream`, `spdy`, `wsstream`) backed by `k8s.io/streaming`
- restores exported client-go SPDY/portforward API signatures to
  apimachinery `httpstream` types for downstream compatibility
- adds streaming-native client-go adapters/constructors so in-tree callers
  can use `k8s.io/streaming` without changing external compatibility APIs
- deduplicates SPDY-over-websocket dial negotiation shared by compat and
  streaming tunneling dialers
- logs dropped unknown stream types in `RemoveStreams` adapter fallbacks to
  improve compatibility-path debuggability
- adds integration coverage for the streaming-upgrader-to-client-go-compat
  adapter path against a real cri-streaming exec endpoint
- clarifies kubectl streaming import aliasing to avoid `httpstream` package
  ambiguity
- updates tests, import restrictions, publishing metadata, and vendor/module
  metadata for the new staging modules

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Remove github.com/stretchr/testify from k8s.io/streaming's test
files. testify's assert/yaml subpackage pulls in gopkg.in/yaml.v3,
whose test dependencies (gopkg.in/check.v1 → kr/pretty →
rogpeppe/go-internal) were propagating into k8s.io/apimachinery and
k8s.io/api via the streaming dependency.

Removes stretchr/testify, gopkg.in/yaml.v3, gopkg.in/check.v1,
github.com/kr/pretty, and github.com/rogpeppe/go-internal from
streaming/go.mod.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@dims

dims commented Mar 12, 2026

Copy link
Copy Markdown
Member Author

/test pull-publishing-bot-validate

1 similar comment
@dims

dims commented Mar 12, 2026

Copy link
Copy Markdown
Member Author

/test pull-publishing-bot-validate

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@dims

dims commented Mar 12, 2026

Copy link
Copy Markdown
Member Author

/assign @seans3 @aojea @liggitt @mikebrow @haircommander @tallclair

/hold for reviews

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@dims: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-publishing-bot-validate b3c1418 link false /test pull-publishing-bot-validate
pull-kubernetes-linter-hints b3c1418 link false /test pull-kubernetes-linter-hints
pull-kubernetes-unit-windows-master b3c1418 link false /test pull-kubernetes-unit-windows-master
pull-kubernetes-e2e-storage-kind-disruptive b3c1418 link false /test pull-kubernetes-e2e-storage-kind-disruptive

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@dims

dims commented Mar 12, 2026

Copy link
Copy Markdown
Member Author

/skip

@SergeyKanzhelev

Copy link
Copy Markdown
Member

/lgtm

it will be great to merge soon so we have some time to try to use it from from cri-tool repo or similar to see if we missed anything before code freeze.

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 30677cad00596f4cf183211a2ab8e155130f5a10

@dims

dims commented Mar 12, 2026

Copy link
Copy Markdown
Member Author

@SergeyKanzhelev let me wait for the beta.0 cut to wrap up today/early tomorrow - https://kubernetes.slack.com/archives/CJH2GBF7Y/p1773342173228169 and then remove hold on this. there are probably a few more things to tweak, don't want to destabilize the release process by landing this now.

@dims

dims commented Mar 13, 2026

Copy link
Copy Markdown
Member Author

Looks like the release process is stuck! https://kubernetes.slack.com/archives/CJH2GBF7Y/p1773351611764119?thread_ts=1773342173.228169&cid=CJH2GBF7Y

will go ahead and land this.

/hold cancel

@akhilerm

Copy link
Copy Markdown
Member

@dims The publishing fails after merging this with

	+ echo 'Packaging up pseudo version v0.0.0-20260312143435-6759320cdb61 into go mod cache...'
	+ mkdir -p /go-workspace/pkg/mod/cache/download/k8s.io/streaming/@v
	+ cp go.mod /go-workspace/pkg/mod/cache/download/k8s.io/streaming/@v/v0.0.0-20260312143435-6759320cdb61.mod
	cp: cannot stat 'go.mod': No such file or directory

Did we miss some step while creating the new staging repo for streaming?

@dims

dims commented Mar 13, 2026

Copy link
Copy Markdown
Member Author

@akhilerm let's try fixing repos.sh in publishing-bot? like dims/publishing-bot@361246e

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 area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/kube-proxy area/kubectl area/kubelet area/release-eng Issues or PRs related to the Release Engineering subproject area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/release Categorizes an issue or PR as relevant to SIG Release. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. wg/device-management Categorizes an issue or PR as relevant to WG Device Management.

Projects

Archived in project
Archived in project
Archived in project
Archived in project
Archived in project

Development

Successfully merging this pull request may close these issues.