python icon indicating copy to clipboard operation
python copied to clipboard

content-type for patch commands

Open tomplus opened this issue 4 years ago • 29 comments

Hi all.

In this PR I'd like to discuss possible solution for problems with selecting content-type when K8s' objects are patching. This problem is nicely documented in https://github.com/kubernetes-client/python/issues/866 and https://github.com/tomplus/kubernetes_asyncio/issues/68

This idea is to introduce a new parameter in ApiClient to be able to control a return from the select_header_content_type method and remove the problematic detection from rest.py. Optionally we can add this as an argument to each patch method. It'll be breaking change if an application uses patch_* methods.

Please take a look. If we accept the solution I prepare PR in openapi-generator and temporary patch for this repo.

cc: @roycaihw @yliaog @HaraldGustafsson @nolar

Thanks.

tomplus avatar Sep 22 '19 01:09 tomplus

@roycaihw Could you take a look at the last concept? I'd like to prepare generator to manage with it. Thanks.

tomplus avatar Nov 08 '19 14:11 tomplus

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Feb 06 '20 15:02 fejta-bot

/remove-lifecycle stale

tomplus avatar Feb 06 '20 15:02 tomplus

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar May 18 '20 20:05 fejta-bot

/remove-lifecycle stale

tomplus avatar May 18 '20 23:05 tomplus

Any update on this? this would be really handy for me.

lizfeed avatar Jun 15 '20 20:06 lizfeed

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Sep 13 '20 21:09 fejta-bot

/remove-lifecycle stale

Edit: Sorry there was a typo in my first message

erdii avatar Sep 14 '20 14:09 erdii

/remove-lifecycle stale

erdii avatar Sep 14 '20 14:09 erdii

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tomplus To complete the pull request process, please assign yliaog after the PR has been reviewed. You can assign the PR to them by writing /assign @yliaog 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 avatar Nov 11 '20 22:11 k8s-ci-robot

I'm back to this PR. I had to squash previous commits and rebase with the master branch (it was very old, before openapi-generator). I hope it helps to discuss the idea. This PR won't be merge because some changes have to be added to the generator. It's like an example how it will look like.

Thanks.

tomplus avatar Nov 11 '20 22:11 tomplus

Hi, is there any update here?

regards

floriankoch avatar Jan 25 '21 19:01 floriankoch

It would be really nice if someone could look at @tomplus's work. I seem to have to monkey patch around this every time i want to use this library.

Jc2k avatar Feb 16 '21 13:02 Jc2k

So I read the last comment from the author as being about getting feedback from upstream about the direction/approach? My bad 😄

Jc2k avatar Feb 16 '21 17:02 Jc2k

@krichter722 It's marked WIP because it shouldn't be merged in this form. I'm waiting for reviewing this PR to prepare changes in OpenAPI Generator

cc: @roycaihw

tomplus avatar Feb 16 '21 23:02 tomplus

@tomplus: PR needs rebase.

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.

k8s-ci-robot avatar May 01 '21 01:05 k8s-ci-robot

@tomplus: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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.

k8s-ci-robot avatar May 03 '21 22:05 k8s-ci-robot

I know it needs rebase but it's only to show and discuss the idea. At the end the generator will be extended.

@yliaog @roycaihw please take a look.

/hold

tomplus avatar May 03 '21 22:05 tomplus

Thanks for putting together this! It's a huge improvement to this client and can also benefit other generated clients. LGTM

roycaihw avatar May 05 '21 00:05 roycaihw

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

k8s-triage-robot avatar Aug 03 '21 01:08 k8s-triage-robot

/remove-lifecycle stale

tomplus avatar Aug 04 '21 05:08 tomplus

Hi team. Can you guys prioritize this PR ? It's more than 2 years since this got opened and I'm keen to use this improvement.

tadrian88 avatar Oct 07 '21 13:10 tadrian88

@tadrian88 this PR is for discussing the idea, it cannot be merged as is, i think.

yliaog avatar Oct 11 '21 23:10 yliaog

My update - Openapi-generator already has required changes (PR #10686 & 10978) in the legacy and new python generator. It is in the master branch and will be released in v5.3.1. We can continue work on it when we switch to the latest version of generator - it's addressed here https://github.com/kubernetes-client/python/issues/1589.

tomplus avatar Dec 09 '21 19:12 tomplus

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-triage-robot avatar Mar 09 '22 20:03 k8s-triage-robot

/remove-lifecycle stale

tomplus avatar Mar 09 '22 20:03 tomplus

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-triage-robot avatar Jun 07 '22 21:06 k8s-triage-robot

/remove-lifecycle stale

tomplus avatar Jun 07 '22 21:06 tomplus

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-triage-robot avatar Sep 05 '22 21:09 k8s-triage-robot

The Kubernetes project currently lacks enough active 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 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 rotten

k8s-triage-robot avatar Oct 05 '22 22:10 k8s-triage-robot