Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bobh66
Copy link
Contributor

@bobh66 bobh66 commented Mar 17, 2022

What type of PR is this?

/kind bug
/kind regression

What this PR does / why we need it:

Fixes exception in WSClient.update() caused by select not having a poll() attribute when running under eventlet. Introduced by PR kubernetes-client/python-base#268

Which issue(s) this PR fixes:

Fixes #1753

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

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

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. labels Mar 17, 2022
@k8s-ci-robot
Copy link
Contributor

Keywords which can automatically close issues and at(@) mentions are not allowed in the title of a Pull Request.

You can edit the title by writing /retitle in a comment.

When GitHub merges a Pull Request, the title is included in the merge commit. To avoid invalid keywords in the merge commit, please edit the title of the PR.

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/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

Welcome @bobh66!

It looks like this is your first PR to kubernetes-client/python 🎉. 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-client/python 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 the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 17, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bobh66
To complete the pull request process, please assign roycaihw after the PR has been reviewed.
You can assign the PR to them by writing /assign @roycaihw in a comment when ready.

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

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 requested review from fabianvf and yliaog March 17, 2022 20:08
@bobh66 bobh66 changed the title Update select poll logic to support eventlet. Fixes #1753 Update select poll logic to support eventlet. Mar 17, 2022
# However, only works on linux.
if sys.platform.startswith('linux') or sys.platform in ['darwin']:
# Will not work on Linux when eventlet is being used.
if ((sys.platform.startswith('linux') and getattr(select, "poll", None) is not None) or
Copy link
Contributor

Choose a reason for hiding this comment

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

eventlet supports epoll, does it make sense to use epoll

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If that's a better solution I'm happy to rework the PR. I'm not very familiar with select and poll but if epoll is equivalent I'll update the change.

@k8s-ci-robot
Copy link
Contributor

Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages.

The list of commits with invalid commit messages:

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/test-infra repository. I understand the commands that are listed here.

# However, only works on linux.
if sys.platform.startswith('linux') or sys.platform in ['darwin']:
# Will not work on Linux when eventlet is being used.
if ((sys.platform.startswith('linux') and getattr(select, "poll", None) is not None) or
Copy link
Contributor

@Akasurde Akasurde Mar 22, 2022

Choose a reason for hiding this comment

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

You can take an inspiration from python/cpython#21257 and ansible/ansible#70352

@roycaihw
Copy link
Member

/assign @yliaog

@k8s-triage-robot
Copy link

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

This bot triages issues and PRs according to the following rules:

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

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 26, 2022
@roycaihw
Copy link
Member

Closing due to inactivity.
/close

@k8s-ci-robot
Copy link
Contributor

@roycaihw: Closed this PR.

In response to this:

Closing due to inactivity.
/close

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WSClient.update() fails on select.poll() when running in eventlet on Linux
7 participants