Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: avoid creating unused ThreadPools #91

Merged
merged 2 commits into from
Dec 17, 2018

Conversation

tomplus
Copy link
Member

@tomplus tomplus commented Dec 7, 2018

I port this PR swagger-api/swagger-codegen#8061 from swagger-codegen as a patch. This PR has approvals but swagger-codegen is not maintained regularly and we don't know when it will be merged, if at all.

It solves or mitigates these issues:

kubernetes-client/python#545
kubernetes-client/python#411
kubernetes-client/python#566
tomplus/kubernetes_asyncio#52

Thank you.

cc: @roycaihw

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 7, 2018
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 7, 2018
@@ -82,6 +82,9 @@ if [ ${PACKAGE_NAME} == "client" ]; then
find "${OUTPUT_DIR}/client/" -type f -name \*.py -exec sed -i "s/async parameter/async_req parameter/g" {} +
find "${OUTPUT_DIR}/client/" -type f -name \*.py -exec sed -i "s/if not async/if not async_req/g" {} +

# workaround https://github.com/swagger-api/swagger-codegen/pull/8061 (thread pool only on demand)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add TODO: Remove this when above merges (and below too)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, added.

@brendandburns
Copy link
Contributor

Man, I really don't love this, but forward progress is worthwhile I suppose.

We're not going to be able to sustain carrying lots of patches like this...

@tomplus
Copy link
Member Author

tomplus commented Dec 15, 2018

@brendandburns I couldn't agree more. It's extremely hard to maintain scripts. I've created an issue to discuss another idea #93

@brendandburns
Copy link
Contributor

/lgtm
/approve

I'd like us to move to openapi-codegen asap...

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 17, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, tomplus

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

The pull request process is described 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2018
@k8s-ci-robot k8s-ci-robot merged commit 9d14077 into kubernetes-client:master Dec 17, 2018
drewwalters96 pushed a commit to drewwalters96/armada that referenced this pull request Apr 25, 2019
This version [0] makes the adal package optional [1], which also
removes its dependency on the cryptography package.

It also fixes a thread pool issue [2] allowing us to remove the
workaround we had in place.

[0]: https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md#v900
[1]: kubernetes-client/python-base#108
[2]: kubernetes-client/gen#91

Change-Id: I55aa8b97483b118fbde7e11df817ad8330da9bf1
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants