added basic asyncio support#2547
Conversation
|
/assign @roycaihw |
|
👏 |
roycaihw
left a comment
There was a problem hiding this comment.
One minor comment regarding README. LGTM otherwise.
| + # There is no hard-limit defined by k8s, but the etcd default | ||
| + # maximum request size is 1.5MiB. | ||
| + # https://github.com/kubernetes/kubernetes/issues/19781 | ||
| + read_bufsize=2**21 |
There was a problem hiding this comment.
(Non blocking for this PR) Some of the patches like this seem to also apply to the syncio client.
There was a problem hiding this comment.
i'm not sure this applies to synchronous client, the reason to have this patch is due to the use of aiohttp as the comment mentioned.
-
# Watch events containing large resource objects can exceed -
# aiohttp's default read buffer size
| # Validate the run can be executed on Windows | ||
| if type(asyncio.get_event_loop()).__name__ == '_WindowsSelectorEventLoop': | ||
| raise ConfigException( | ||
| 'exec: _WindowsSelectorEventLoop does NOT support subprocesses, see README.md' |
There was a problem hiding this comment.
We also need to port some of the root README.md to this repo
|
Test results look good. /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roycaihw, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cc @tomplus |
|
I'm happy to see you are working on it. I'm ready to help but to be honest I'm worried about upgrading the generator. I'm not sure if you are aware of this issue: tomplus/kubernetes_asyncio#293 So I decided to stick to the old version of generator in my async lib. I applied patches if needed, I developed typing as a set of In addition, I'd suggest copying my entire lib into the kubernetes-client/python-asyncio. Could you consider this? I know, maintaining two libraries may be difficult, but I believe discrepancies between sync and async are inevitable and it wouldn't be any easier maintained in a single repo. Thanks! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: