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

Test svcat gracefully handles the ns-broker flag being disabled #2234

Conversation

carolynvs
Copy link
Contributor

@carolynvs carolynvs commented Jul 25, 2018

svcat will need to gracefully handle interacting with servers that have the feature flag for namespaced broker resources disabled.

  • The list commands that have been modified to retrieve both cluster and ns-scoped resources will ignore "resource not found" errors and return just the cluster resources.
  • FYI, as we add support for retrieving a single ns-scoped resource, like svcat describe broker --namespace NS NAME, I believe that should be a real error. Since that wasn't a supported command before. When we add support for those, we'll add test cases to ensure the proper error behavior.

We'll probably want to keep this around for at least until the feature flag is removed, perhaps longer so that people don't need to be careful about which client version they use with a particular version of the api server.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 25, 2018
@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. labels Jul 25, 2018
@carolynvs carolynvs force-pushed the do-not-assume-ns-brokers-enabled branch from b4c570b to c1d2033 Compare July 25, 2018 16:00
@carolynvs carolynvs requested review from jberkhahn and duglin and removed request for n3wscott July 25, 2018 16:03
@carolynvs carolynvs changed the title [WIP] Test svcat gracefully handles the ns-broker flag being disabled Test svcat gracefully handles the ns-broker flag being disabled Jul 25, 2018
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 25, 2018
@carolynvs carolynvs requested review from jeremyrickard and removed request for kikisdeliveryservice July 25, 2018 16:45
)

var catalogRequestRegex = regexp.MustCompile("/apis/servicecatalog.k8s.io/v1beta1/(.*)")
var coreRequestRegex = regexp.MustCompile("/api/v1/(.*)")

// Verify that svcat gracefully handles when the namespaced broker feature flag is disabled
// TODO: Once we take Namespaced brokers out from behind the feature flag, this test won't be necessary
Copy link
Contributor

Choose a reason for hiding this comment

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

probably once we get it out from the feature flag + some number of versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think you are right, I'm just not sure how long yet. Maybe until 1.0 honestly...

@jeremyrickard
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 25, 2018
@duglin duglin added the LGTM2 label Jul 25, 2018
@duglin
Copy link
Contributor

duglin commented Jul 25, 2018

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: duglin

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 Jul 25, 2018
@k8s-ci-robot k8s-ci-robot merged commit 853b508 into kubernetes-retired:master Jul 25, 2018
@carolynvs carolynvs deleted the do-not-assume-ns-brokers-enabled branch October 4, 2018 21:29
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. lgtm Indicates that a PR is ready to be merged. LGTM1 LGTM2 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.

5 participants