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

service plan cost truncated in 1st service display #3431

Closed
2 of 11 tasks
gberche-orange opened this issue Mar 13, 2019 · 3 comments
Closed
2 of 11 tasks

service plan cost truncated in 1st service display #3431

gberche-orange opened this issue Mar 13, 2019 · 3 comments
Assignees
Labels

Comments

@gberche-orange
Copy link
Contributor

Frontend Deployment type

  • Cloud Foundry Application (cf push)
  • Kubernetes, using a helm chart
  • Docker, using docker compose
  • 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, using docker compose
  • Docker, single container deploying all components
  • Other (please specify below)

Expected behaviour

Service plan costs display is consistent over time

Actual behaviour

Service plan costs display is initially truncated, and then properly displayed once a service instance creation screen has shown

Steps to reproduce the behavior

  • Deploy a service broker which returns the following V2/catalog payload
{
  "services": [	
    {
      "id": "noop-ondemand-service",
      "name": "noop-ondemand",
      "description": "On demand noop dedicated cluster",
      "bindable": true,
      "plans": [
        {
          "id": "noop-ondemand-plan",
          "name": "default",
          "description": "Default plan (beta).",
          "metadata": {
            "key1": "value1",
            "costs": [
              {
                "amount": {
                  "eur": 48
                },
                "unit": "Monthly"
              }
            ],
            "key2": "value2",
            "displayName": "noop plan display name",
            "bullets": [
              "2GB storage",
              "50 concurrent connections"
            ]
          },
          "free": false
        }
      ],
      "tags": [
        "noop",
        "document"
      ],
      "metadata": {},
      "requires": []
    }
  ]
}
  • Go to marketplace
  • Display service plans for a given service : the cost is truncated
    image
  • Start service instance creation workflow: service plan displays correctly
    image
  • Cancel service instance creation
  • Display service plans for the service: cost is not truncated
    image

Log output covering before error and any error statements

Insert log hereCopy

Detailed Description

Following #2959
image the costs are properly displayed.

Context

Why is this change important to you? How would you use it?

our users see broken costs display in their marketplace. This triggers support requests.

Reproduced with current stable stratos with commit hash a728011

Possible Implementation

Suspecting the create service instance workflow is modifying/normalizing the service catalog data, and that this logic is missing when only displaying service plans

/CC @ldangeard-orange

@richard-cox
Copy link
Contributor

Good spot! I think we use a common component to show all, so it could be that the data is missing in one instance. We'll look into this

@richard-cox
Copy link
Contributor

@gberche-orange Found the issue! We failed to register the fr locale, which it used to format the currency value, at the service plan table level. This already happens when we show the service plan card in the create service stepper, which explains why after visiting it the amount is shown correctly. I've created a PR and the fix will be in the next release

@richard-cox richard-cox self-assigned this Mar 22, 2019
@gberche-orange
Copy link
Contributor Author

great, thanks @richard-cox !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants