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

set the content-type Header when the dynamic client sends the request #104327

Merged
merged 1 commit into from Oct 18, 2021

Conversation

sxllwx
Copy link
Member

@sxllwx sxllwx commented Aug 12, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

Set the content-type Header when the dynamic client sends the request

Which issue(s) this PR fixes:

Fixes # kubernetes/client-go#980

Special notes for your reviewer:

Does this PR introduce a user-facing change?

The client-go dynamic client sets the header 'Content-Type: application/json' by default

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. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 12, 2021
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 12, 2021
@caesarxuchao
Copy link
Member

/assign
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 12, 2021
Copy link
Member

@caesarxuchao caesarxuchao left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

Can you update the unit tests in client_test.go to verify the content type header is set in the requests?

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 16, 2021
@sxllwx
Copy link
Member Author

sxllwx commented Aug 16, 2021

Can you update the unit tests in client_test.go to verify the content type header is set in the requests?

Thanks for the elaborate explanation! I have added a new unit test in response to your suggestion. PTAL

@sxllwx
Copy link
Member Author

sxllwx commented Aug 26, 2021

/ping @caesarxuchao PTAL , thx..

@sxllwx
Copy link
Member Author

sxllwx commented Sep 10, 2021

/ping @caesarxuchao

@caesarxuchao
Copy link
Member

Sorry for dropping the ball.
Thanks for the explanation on the Patch method.

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caesarxuchao, sxllwx

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 Oct 5, 2021
@pacoxu
Copy link
Member

pacoxu commented Oct 18, 2021

It seems that a release note may be needed.
or you can comment /release-note-none.

@aojea
Copy link
Member

aojea commented Oct 18, 2021

@sxllwx can you add a release note? I think that something like

The client-go dynamic client sets the header 'Content-Type: application/json' by default

@pacoxu
Copy link
Member

pacoxu commented Oct 18, 2021

/release-note-edit

The client-go dynamic client sets the header 'Content-Type: application/json' by default

CI-bot can edit the release note now.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 18, 2021
@sxllwx
Copy link
Member Author

sxllwx commented Oct 18, 2021

Thanks @aojea for the reminder and @pacoxu for the help.

@sxllwx
Copy link
Member Author

sxllwx commented Oct 18, 2021

/retest-required

@k8s-ci-robot k8s-ci-robot merged commit a78e313 into kubernetes:master Oct 18, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Oct 18, 2021
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. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants