Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix stream bug when use ssl#2422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Novelfor wants to merge1 commit intokubernetes-client:master
base:master
Choose a base branch
Loading
fromNovelfor:dev_fix_stream_bug

Conversation

@Novelfor
Copy link

@NovelforNovelfor commentedJul 22, 2025
edited
Loading

What type of PR is this?

/kind bug

What this PR does / why we need it:

Stream api will block data when use ssl socket.

Which issue(s) this PR fixes:

Fixes#2414

Special notes for your reviewer:

According to this documenthttps://docs.python.org/3/library/ssl.html#ssl-nonblocking, select() may lose some data, it only happen when use ssl socket

I test the code in my self-host kubernetes server

Does this PR introduce a user-facing change?

NONE

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

@k8s-ci-robotk8s-ci-robot added release-note-noneDenotes a PR that doesn't merit a release note. kind/bugCategorizes issue or PR as related to a bug. labelsJul 22, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR isNOT APPROVED

This pull-request has been approved by:Novelfor
Once this PR has been reviewed and has the lgtm label, please assignroycaihw for approval. For more information seethe Code Review Process.

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

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

@linux-foundation-easycla
Copy link

linux-foundation-easyclabot commentedJul 22, 2025
edited
Loading

CLA Signed


The committers listed above are authorized under a signed CLA.

@k8s-ci-robotk8s-ci-robot added the cncf-cla: noIndicates the PR's author has not signed the CNCF CLA. labelJul 22, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome@Novelfor!

It looks like this is your first PR tokubernetes-client/python 🎉. Please refer to ourpull 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-client/python hasits own contribution guidelines.

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

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

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robotk8s-ci-robot added the size/XSDenotes a PR that changes 0-9 lines, ignoring generated files. labelJul 22, 2025
@k8s-ci-robotk8s-ci-robot added cncf-cla: yesIndicates the PR's author has signed the CNCF CLA. and removed cncf-cla: noIndicates the PR's author has not signed the CNCF CLA. labelsJul 23, 2025
@ivaradi
Copy link

I think this could be improved by calling poll/select only when ssl_pending is 0.

@roycaihw
Copy link
Member

/assign

(self.sock.sock, ), (), (),timeout)

ifr:
ifrorssl_pending>0:
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a test?

Copy link
Author

Choose a reason for hiding this comment

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

Current e2e test has stream exec test. but i think it's not easy to find ssl blocking by current test code.

  1. The blocking is not clearly observable in the program (if the data is sent continuously, once the next chunk is sent, it will also carry over any previously blocked data).
  2. Setting up SSL in minikube requires additional work.
    I can think about designing a reliable testing approach later, it's not easy to write a work test (current e2e casehttps://github.com/kubernetes-client/python/blob/master/kubernetes/e2e_test/test_client.py#L130 contain stream exec test, but it hard to reflect blocking). But I hope we can merge this first so that I don't have to keep using my own forked version on my cluster.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity,lifecycle/stale is applied
  • After 30d of inactivity sincelifecycle/stale was applied,lifecycle/rotten is applied
  • After 30d of inactivity sincelifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with/remove-lifecycle stale
  • Close this PR with/close
  • Offer to help out withIssue Triage

Please send feedback to sig-contributor-experience atkubernetes/community.

/lifecycle stale

@k8s-ci-robotk8s-ci-robot added the lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale. labelOct 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@roycaihwroycaihwroycaihw left review comments

@fabianvffabianvfAwaiting requested review from fabianvf

@yliaogyliaogAwaiting requested review from yliaog

Assignees

@roycaihwroycaihw

Labels

cncf-cla: yesIndicates the PR's author has signed the CNCF CLA.kind/bugCategorizes issue or PR as related to a bug.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.release-note-noneDenotes a PR that doesn't merit a release note.size/XSDenotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

stream api will lose data when use sslsocket

5 participants

@Novelfor@k8s-ci-robot@ivaradi@roycaihw@k8s-triage-robot

[8]ページ先頭

©2009-2025 Movatter.jp