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

Automated cherry pick of #120108: Fix OpenAPI aggregation cleanup #120362

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented Sep 1, 2023

Cherry pick of #120108 on release-1.27.

#120108: Fix OpenAPI aggregation cleanup

For details on the cherry pick process, see the cherry pick requests page.


There were four issues in OpenAPI aggregation cleanup:
1. When removing an APIService, openAPIAggregationController was called
   twice while openAPIV3AggregationController was never called, leading
   to OpenAPI v3 for the APIService not cleaned up.
2. When removing a local APIService, v2 specAggregator should not return
   ErrAPIServiceNotFound when it doesn't find the APIService because
   local APIServices were never added to its cache, otherwise confusing
   error logs would be generated. Besides, the method's comment
   indicates that the desired behavior is that no error is returned if
   the APIService does not exist.
3. When removing an APIService, v3 specProxier should update
   openapiv2converter's cache, like when updating an APIService,
   otherwise the API would not be removed from "/openapi/v3".
4. When v3 AggregationController reconciles an APIService, it should
   stop requeueing it if it fails with ErrAPIServiceNotFound as the
   APIService has been removed, like what v2 AggregationController does,
   otherwise it would keep reconciling the APIService forever.

Signed-off-by: Quan Tian <qtian@vmware.com>
@k8s-ci-robot k8s-ci-robot added the do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. label Sep 1, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.27 milestone Sep 1, 2023
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. 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. labels Sep 1, 2023
@k8s-ci-robot k8s-ci-robot added area/test 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. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 1, 2023
@alexzielenski
Copy link
Contributor

/assign @Jefftree
/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 Sep 5, 2023
@Jefftree
Copy link
Member

Jefftree commented Sep 6, 2023

/lgtm
/assign @sttts

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

LGTM label has been added.

Git tree hash: 578dafa8d8bcac966d269074dde896ad0ed4a8e9

@xmudrii
Copy link
Member

xmudrii commented Sep 6, 2023

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 6, 2023
@sttts
Copy link
Contributor

sttts commented Sep 6, 2023

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sttts, tnqn

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 Sep 6, 2023
@Verolop Verolop added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Sep 7, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. label Sep 7, 2023
@k8s-ci-robot k8s-ci-robot merged commit ca7e6fd into kubernetes:release-1.27 Sep 7, 2023
15 checks passed
@tnqn tnqn deleted the automated-cherry-pick-of-#120108-upstream-release-1.27 branch September 11, 2023 12:25
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/test cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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. 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/M Denotes a PR that changes 30-99 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

7 participants