Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Visiting marketplace tab breaks service list #4397

Closed
2 of 9 tasks
rschollmeyer opened this issue Jun 25, 2020 · 5 comments · Fixed by #4417
Closed
2 of 9 tasks

Visiting marketplace tab breaks service list #4397

rschollmeyer opened this issue Jun 25, 2020 · 5 comments · Fixed by #4417
Labels
bug community Community Raised Issue
Milestone

Comments

@rschollmeyer
Copy link

rschollmeyer commented Jun 25, 2020

Frontend Deployment type

  • Cloud Foundry Application (cf push)
  • Kubernetes, using a helm chart
  • Docker, single container deploying all components
  • npm run start
  • Other (please specify below)

Backend (Jet Stream) Deployment type

  • Cloud Foundry Application (cf push)
  • Kubernetes, using a helm chart
  • Docker, single container deploying all components
  • Other (please specify below)

Expected behaviour

Services list shows all existing services.

Actual behaviour

When you initially click on the Services tab all services are shown as expected. After clicking the marketplace tab and go back to the Services tab services are sometimes not shown at all (see image and the corresponding error message below). Refreshing the browser on the services page makes the services list works as expected again.

broken

Note: It occurs in both CF Stratos & Suse Stratos.

Steps to reproduce the behavior

  1. Click Services tab, you will see all services
  2. Click Marketplace tab, nothing to do here
  3. Click Services tab again, list is broken
  4. Refresh the browser on the services page, you will see all services again

Log output covering before error and any error statements

The browser console shows this error multiple times.

ERROR TypeError: "this.serviceInstanceEntity.entity.service_plan.entity.service.entity is undefined"

Note: We also opened this issue in the Suse Stratos github repository SUSE#399

@richard-cox
Copy link
Contributor

@rschollmeyer Thanks for raising this issue. I've had some trouble recreating this in our master branch or latest release 3.2.1. Could you confirm in which version you see this in? Were there a large number of services and service instances in your CF?

I think this might be either a timing issue (maybe some dependent requests have failed to complete in time) or to do with the services shown (different user provider service / service instances visible or number of instances).

There might be a way to force the error by starting in the marketplace, moving to service and then seeing a service instance that was created from a service that was not visible in the first page of the marketplace.

A workaround might be to put better guarding around the troubled line, but I'd really like to recreate the error before committing to this.

@rschollmeyer
Copy link
Author

Could you confirm in which version you see this in? Were there a large number of services and service instances in your CF?

@richard-cox thanks for your reply. We had this issue with both master branch and the latest version 3.2.1. Furthermore the problem occurred in an environment with 5 services and 6 service instances as well as in an environment with 16 services and 17 service instances.

There might be a way to force the error by starting in the marketplace, moving to service and then seeing a service instance that was created from a service that was not visible in the first page of the marketplace.

We checked that and we also that the error when there was only one page in the marketplace.

We also discovered that the problem only occurs in the "card view" of the services tab and not in the list view.

richard-cox added a commit that referenced this issue Jul 2, 2020
- fixes #4397
- accessing entity via this.serviceInstanceEntity.entity.service_plan.entity.service.entity.service_broker_guid can sometimes fail
- fetch service, and thus service broker guid, from store instead
- this matches the table way of getting the broker
@richard-cox
Copy link
Contributor

I've created a PR (#4417) that makes how we access the service resource safer (and matches the way we do it in the table view). I was still struggling to reproduce this though, so if you have the chance could you confirm it fixes your issue?

We'll be migrating to v3 of the CF API soon. The services endpoints have been reworked and a lot of our components will need updating, including this card. I'll bear this issue in mind when making those changes.

@richard-cox richard-cox added this to the 4.0.0 milestone Jul 2, 2020
@rschollmeyer
Copy link
Author

We will try it as soon as possible, I'll let you know if it helps. Thank you so far!

@rschollmeyer
Copy link
Author

@richard-cox We tried the code from your PR and it really fixed our issue! I'm going to close this and SUSE#399 aswell. Thank you very much!

nwmac pushed a commit that referenced this issue Jul 8, 2020
…4417)

* Fetch service in service instances card via store rather than inline
- fixes #4397
- accessing entity via this.serviceInstanceEntity.entity.service_plan.entity.service.entity.service_broker_guid can sometimes fail
- fetch service, and thus service broker guid, from store instead
- this matches the table way of getting the broker

* Fix unit test

* Fix & Improve Service Instance Card
- ensure async properties have async pipe in html
- bind to params rather than properties
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug community Community Raised Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants