Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Fix ServicePlan resync #2797

Merged
merged 4 commits into from
May 14, 2020
Merged

Conversation

polskikiel
Copy link
Contributor

This PR is a

  • Feature Implementation
  • Bug Fix
  • Documentation

What this PR does / why we need it:

This PR fixes a situation when some ServicePlan was marked as removedFromBrokerCatalog and it wasn't removed on ServicePlan reconcile. The removing logic was blocked due to a bug, which I'm trying to address in this PR.

Please leave this checklist in the PR comment so that maintainers can ensure a good PR.

Merge Checklist:

  • New feature
    • Tests
    • Documentation
  • SVCat CLI flag
  • Server Flag for config
    • Chart changes
    • removing a flag by marking deprecated and hiding to avoid
      breaking the chart release and existing clients who provide a
      flag that will get an error when they try to update

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 12, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @polskikiel. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 12, 2020
@mszostok
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 12, 2020
@mszostok
Copy link
Contributor

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 12, 2020
@@ -62,7 +62,7 @@ func (c *controller) reconcileServicePlanKey(key string) error {
return err
}
pcb := pretty.NewContextBuilder(pretty.ServicePlan, namespace, name, "")
plan, err := c.servicePlanLister.ServicePlans(namespace).Get(key)
plan, err := c.servicePlanLister.ServicePlans(namespace).Get(name)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we cover that with some unit-test to do not have any regression in the future? 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I managed to test that logic. I created a ticket for other controllers that don't have this kind of test coverage: #2799.

@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 May 12, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 12, 2020
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 13, 2020
@mszostok
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 13, 2020
@@ -18,6 +18,7 @@ package controller

import (
"errors"
"k8s.io/client-go/tools/cache"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: it will be good to have imports sorted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

imports fixed

@k8s-ci-robot k8s-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label May 14, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 14, 2020
@mszostok
Copy link
Contributor

/test pull-service-catalog-test-integration

@mszostok
Copy link
Contributor

/test pull-build-all-images-for-arm64

@mszostok
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 14, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mszostok, polskikiel

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 May 14, 2020
@k8s-ci-robot k8s-ci-robot merged commit e12c79f into kubernetes-retired:master May 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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 Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

3 participants