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

cf marketplace lists disabled plans #967

Closed
jamesjoshuahill opened this issue Sep 30, 2016 · 25 comments · Fixed by #1625 or #1633
Closed

cf marketplace lists disabled plans #967

jamesjoshuahill opened this issue Sep 30, 2016 · 25 comments · Fixed by #1625 or #1633

Comments

@jamesjoshuahill
Copy link

  • Commands
cf create-service-broker SERVICE_BROKER USERNAME PASSWORD URL
# Note: the service offering has more than one plan

cf enable-service-access SERVICE -p PLAN_NAME

cf marketplace
# OR
cf marketplace -s SERVICE
  • What occurred, incl. error and/or stack trace
    The output of cf marketplace lists all the plans of the service offering.
    The output of cf marketplace -s SERVICE_NAME lists all the plans of the service offering.
  • What you expected to occur
    We expected marketplace commands to list one plan only, i.e. the PLAN_NAME used in the cf enable-service-access command.
  • CLI Version
    6.22.1+6b7af9c-2016-09-24
  • CC API Endpoint Version
    2.57.0
  • CF Trace
    Here is an excerpt that to show that we noticed that public is not true for both plans:
REQUEST
GET /v2/service_plans?q=service_guid%3A<SERVICE_PLAN_GUID> HTTP/1.1

RESPONSE
{
  "total_results": 2,
  "total_pages": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "metadata": {
        ...
      },
      "entity": {
        "name": "100mb",
        "free": true,
        ...
        "public": true,
        "active": true,
      }
    },
    {
      "metadata": {
        ...
      },
      "entity": {
        "name": "1gb",
        "free": true,
        ...
        "public": false,
        "active": true,
        ...
      }
    }
  ]
}
  • Platform & Shell Details
    Mac OS X 10.11.6
    iTerm 3.0.9
    bash 4.4
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/131441835

The labels on this github issue will be updated when the story is started.

@n4wei
Copy link
Contributor

n4wei commented Sep 30, 2016

@jamesjoshuahill
Hi James. We need additional information to reproduce the behavior you experienced. We would like to know what user privileges you are logged in as when got this output.

We suspect that the "1gb" plan is in the output because you may be logged in with admin privileges. With "space-developer" privileges, one should not be able to see the non-public plans.

@jamesjoshuahill
Copy link
Author

Thanks @nickwei84. Yes, I can confirm that this was behaviour was seen as the admin user. Why does the admin user see disabled (non-public) plans?

@dkoper
Copy link

dkoper commented Oct 4, 2016

@jamesjoshuahill Because else they wouldn't be able to make them public again.

@jamesjoshuahill
Copy link
Author

@dkoper @nickwei84 Thank you for your replies.

The UX is inconsistent. If the aim is to allow admin's to discover non-public plans with cf marketplace, then:

a) why can't the admin user see any plans when none is public?

b) why doesn't the CLI output indicate which plans are public?

@n4wei
Copy link
Contributor

n4wei commented Oct 7, 2016

@jamesjoshuahill
Answers to your questions:
a) This is a bug in the CLI. Thanks for finding this.
b) This information is available from cf service-access.

@jamesjoshuahill
Copy link
Author

Thank you @nickwei84. Here's my tuppence:

I still think it's weird that admins do not see the same cf marketplace output as a Space Developer. An admin cannot create an instance of a disabled plan, so do disabled plans belong in the marketplace?

If admins only saw enabled plans in cf marketplace then cf service-access would be the way to discover disabled services and plans. That makes more sense to me than showing all plans to admins in the marketplace.

@n4wei
Copy link
Contributor

n4wei commented Oct 13, 2016

@jamesjoshuahill: @dkoper, our PM might have thoughts on this. Cluing him in.

@dkoper
Copy link

dkoper commented Oct 21, 2016

@jamesjoshuahill Thanks for reporting the inconsistency.
I agree it makes more sense to hide disabled plans from the marketplace from admins as well.
That said, it's been like this for quite some time so we'll address this later when we make other changes to this command.

@avade
Copy link

avade commented Mar 27, 2017

Any plans to fix? We are seeing more and more teams at Pivotal confused by this behaviour.

@mfine30
Copy link

mfine30 commented Apr 5, 2017

Agreed. I know this has caused problems for my team and Core Services as well.

/cc @menicosia's

@n4wei
Copy link
Contributor

n4wei commented Apr 5, 2017 via email

@menicosia
Copy link

Yep, @mfine30 is right, the fact that cf m is not scoped to current org/space may be as designed, but it's not intuitive that if I can see a service plan in one Org, that I should be able to see it in all Orgs, regardless if I can actually instantiate it.

I'm fine if cf service-access is the correct command, and we should direct people away from cf marketplace, but right now that's not clear nor intuitive. In fact, for me, cf service-access with no args returns zero output, so that seems not optimal.

@XenoPhex
Copy link
Contributor

@jamesjoshuahill we may be able to improve cf m, when we refactor the command, which we hope will help with usability including improving the issues you've described.

As folks have pointed out above, we advise users to utilize cf service-access instead, and that permissions are set up appropriately.

Closing the issue due to inactivity.

@XenoPhex XenoPhex added the closed due to inactivity closed due to inactivity - reopen if this is still an issue label Apr 12, 2018
@gberche-orange
Copy link

gberche-orange commented Nov 25, 2019

@addytripathi @abbyachau @waterlink

I still reproduce this problem "cf marketplace lists disabled plans" with cf cli version 6.47.2+d526c2cb3.2019-11-05

Any chance to reopen this issue as to avoid duplicate issues?

See that #1625 and #1633 were merged but reverted (respectively by d3f8214 and by #1642 )

@gberche-orange
Copy link

ping @addytripathi @abbyachau

@menicosia
Copy link

/cc @zrob re: @gberche-orange's comments that this is still an issue, though I assume pretty low priority?

@addytripathi
Copy link

Hey @gberche-orange .. I had a chat with @AartiKriplani about this. Apparently the erstwhile SAPI team tried fixing this a couple of time, but chose to revert the changes - as the changes are complex and introduce new bugs. Given this context, we'd like to not fix the bug in V6 and are keen to do so in V7: https://www.pivotaltracker.com/n/projects/2105761/stories/170342318

@addytripathi addytripathi reopened this Dec 19, 2019
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/170378343

The labels on this github issue will be updated when the story is started.

@gberche-orange
Copy link

thanks @addytripathi for reopening the issue and for sharing plans for fixing this into v7. It would be useful to make sure the V3 API makes this fix easier. See related issue cloudfoundry/cc-api-v3-style-guide#60.

@FelisiaM
Copy link
Member

Will close this issue as it is fixed in the new implementation of cf marketplaces in the new CLI version.

Thanks to everyone who contributed to this issue,
Felisia

blgm added a commit to blgm/docs-services that referenced this issue May 26, 2020
The actual behavior of cf marketplace may be different to what is
documented, see cloudfoundry/cli#967

The plan is for marketplace to show inactive plans, but to mark them as
inactive, see: https://www.pivotaltracker.com/story/show/172413998

It makes sense for the documentation to fall in line
cshollingsworth pushed a commit to cloudfoundry/docs-services that referenced this issue May 29, 2020
The actual behavior of cf marketplace may be different to what is
documented, see cloudfoundry/cli#967

The plan is for marketplace to show inactive plans, but to mark them as
inactive, see: https://www.pivotaltracker.com/story/show/172413998

It makes sense for the documentation to fall in line
cshollingsworth pushed a commit to cloudfoundry/docs-services that referenced this issue May 29, 2020
The actual behavior of cf marketplace may be different to what is
documented, see cloudfoundry/cli#967

The plan is for marketplace to show inactive plans, but to mark them as
inactive, see: https://www.pivotaltracker.com/story/show/172413998

It makes sense for the documentation to fall in line
cshollingsworth pushed a commit to cloudfoundry/docs-services that referenced this issue May 29, 2020
The actual behavior of cf marketplace may be different to what is
documented, see cloudfoundry/cli#967

The plan is for marketplace to show inactive plans, but to mark them as
inactive, see: https://www.pivotaltracker.com/story/show/172413998

It makes sense for the documentation to fall in line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet