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

Avoid returning nil responseKind in v1beta1 aggregated discovery #119835

Merged

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Aug 8, 2023

What type of PR is this?

/kind bug
/kind regression

What this PR does / why we need it:

Applies fixup to returned aggregated discovery v1beta1 to avoid sending nil responseKind fields, which v0.26.0-v0.26.3 clients cannot handle.

Which issue(s) this PR fixes:

xref #118361 #116603 #119840

Even though the nil panic in client-go was fixed in 0.26.4+, there is widespread usage of impacted versions (https://grep.app/search?q=k8s.io/client-go%20v0%5C.26%5C.%5B0123%5D&regexp=true&filter[path.pattern][0]=go.mod)

Mitigating this server-side for v1beta1 seems prudent to avoid breaking clients when 1.27+ servers enable aggregated discovery by default.

cc @apelisse @seans3 @dims

Fixes a regression in 1.27 default server configurations: Aggregated discovery now returns `responseKind: {}` for resources which are missing group/version/kind information, to ensure compatibility with v0.26.0-v0.26.3 clients.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/regression Categorizes issue or PR as related to a regression from a prior release. labels Aug 8, 2023
@k8s-ci-robot
Copy link
Contributor

Please note that we're already in Test Freeze for the release-1.28 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.28.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Mon Aug 7 22:33:07 UTC 2023.

@k8s-ci-robot k8s-ci-robot added 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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Aug 8, 2023
@liggitt
Copy link
Member Author

liggitt commented Aug 8, 2023

/milestone v1.29

if we do this, we'll merge into 1.29 and backport, this isn't blocking for 1.28

@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Aug 8, 2023
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver area/code-generation kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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 8, 2023
@liggitt
Copy link
Member Author

liggitt commented Aug 8, 2023

cc @deads2k @jpbetz
for api-machinery visibility

@liggitt
Copy link
Member Author

liggitt commented Aug 8, 2023

(I'll add more tests if we get agreement on this direction)

@dims
Copy link
Member

dims commented Aug 8, 2023

+1 from me on the direction! 🧭

@alexzielenski
Copy link
Contributor

/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 8, 2023
@alexzielenski
Copy link
Contributor

/cc @Jefftree

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 9, 2023
@liggitt
Copy link
Member Author

liggitt commented Aug 9, 2023

/retest

1 similar comment
@liggitt
Copy link
Member Author

liggitt commented Aug 9, 2023

/retest

@jpbetz
Copy link
Contributor

jpbetz commented Aug 9, 2023

/approve
For SIG api-machinery

+1 for inclusion in 1.28.0

EDIT: clarified that I'd like to see this in 1.28.0 (not wait for 1.28.1)

@liggitt
Copy link
Member Author

liggitt commented Aug 9, 2023

/milestone v1.28
per discussion in https://kubernetes.slack.com/archives/C0EG7JC6T/p1691598626756569

1.27 and 1.26 picks open as well to exercise CI

/hold for coordination with release team relative to rc1

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 9, 2023
@k8s-ci-robot k8s-ci-robot modified the milestones: v1.29, v1.28 Aug 9, 2023
@liggitt
Copy link
Member Author

liggitt commented Aug 9, 2023

OOMKiller flake (#119600)
/retest

@liggitt
Copy link
Member Author

liggitt commented Aug 9, 2023

/retest

@dims
Copy link
Member

dims commented Aug 9, 2023

/approve
/lgtm

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

LGTM label has been added.

Git tree hash: aa44f93e0fffc21295ab412964ccbf7b5050050f

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, jpbetz, liggitt

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

@liggitt
Copy link
Member Author

liggitt commented Aug 9, 2023

/retest

@liggitt
Copy link
Member Author

liggitt commented Aug 9, 2023

/hold cancel

per release-manager discussion in https://kubernetes.slack.com/archives/CJH2GBF7Y/p1691607686137089

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 9, 2023
@dims
Copy link
Member

dims commented Aug 9, 2023

/priority critical-urgent

@k8s-ci-robot k8s-ci-robot added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 9, 2023
@k8s-ci-robot k8s-ci-robot merged commit 3d941af into kubernetes:master Aug 9, 2023
13 checks passed
k8s-ci-robot added a commit that referenced this pull request Aug 10, 2023
…835-upstream-release-1.27

Automated cherry pick of #119835: Avoid returning nil responseKind in v1beta1 aggregated
k8s-ci-robot added a commit that referenced this pull request Aug 10, 2023
…835-upstream-release-1.26

Automated cherry pick of #119835: Avoid returning nil responseKind in v1beta1 aggregated
@liggitt liggitt deleted the mitigate-aggregated-discovery-npe branch August 10, 2023 15:26
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. area/apiserver area/code-generation area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. 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. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

7 participants