cloudfoundry / cloudfoundry/multiapps-cli-plugin

Console output doesn't count services correctly

Open
#76 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
87
Forks
42
Avg merge
17d 21h
Merged PRs (30d)
1

Description

Description

When I'm deploying a mta, which uses multiple services (>2), the console doesn't indicate how many services have been created yet. It only shows "0 of 1" multiple times.
Here's an example of this outout:

 cf deploy city-explorer-demo-app_1.1.0.mtar
Deploying multi-target app archive city-explorer-demo-app_1.1.0.mtar in org D00000trial_d00000 / space dev as marius.obert@sap.com...

Uploading 1 files...
  /home/adele/city-explorer-demo-app_1.1.0.mtar
OK
Deploying in org "D00000trial_d00000" and space "dev"
Detected MTA schema version: "2"
No deployed MTA detected - this is initial deployment
Detected new MTA version: "1.1.0"
Processing service "azure-blob-storage"...
Creating service "azure-blob-storage" from MTA resource "azure-blob-storage"...
Processing service "city-hdi-container"...
Creating service "city-hdi-container" from MTA resource "city-hdi-container"...
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
1 of 1 done
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
1 of 1 done
Creating application "city-app-router" from MTA module "city-app-router"...
Uploading application "city-app-router"...
Scaling application "city-app-router" to "1" instances...
Staging application "city-app-router"...
Application "city-app-router" staged
Starting application "city-app-router"...
...
Your environment
  • MultiApps Controller version -
  • MultiApps CF CLI Plugin version -
  • which CF vendor is used - SAP Cloud Platform Trial
  • which backing services are used - HANA HDI trial, and Azure storage account via OSB for Azure
Steps to reproduce

Tell us how to reproduce this issue: Here's the descriptor file (the issue might be related that both services come from two service brokers):

_schema-version: 2.0.0
ID: city-explorer-demo-app
version: 1.1.0
modules:
  - name: city-app-router
    type: approuter.nodejs
    path: app
    parameters:
      disk-quota: 256M
      memory: 256M
    requires:
      - name: srv_api
        group: destinations
        properties:
          forwardAuthToken: true
          strictSSL: false
          name: srv_api
          url: ~{url}
      - name: uploader_api
        group: destinations
        properties:
          forwardAuthToken: true
          strictSSL: false
          name: uploader_api
          url: ~{url}
  - name: city-app-db
    type: hdb
    path: db
    parameters:
      memory: 256M
      disk-quota: 512M
    requires:
      - name: city-hdi-container
  - name: city-cap-srv
    type: nodejs
    path: srv
    parameters:
      memory: 512M
      disk-quota: 512M
    provides:
      - name: srv_api
        properties:
          url: ${default-url}
    requires:
      - name: city-hdi-container
  - name: city-image-uploader
    type: nodejs
    path: uploader
    parameters:
      memory: 512M
      disk-quota: 512M
    provides:
      - name: uploader_api
        properties:
          url: ${default-url}
    requires:
      - name: azure-blob-storage
resources:
  - name: city-hdi-container
    type: com.sap.xs.hdi-container
    properties:
      hdi-container-name: ${service-name}
    parameters:
      service: hanatrial
  - name: azure-blob-storage
    type: org.cloudfoundry.managed-service
    parameters:
      service: azure-storage-blob-storage-account-and-container
      service-plan: all-in-one
      config:
        location: "northeurope"
        resourceGroup: "SAPTechEd"
        accessTier: "Cool"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided city-explorer-demo-app descriptor using cf deploy, then trace the CLI's service-creation progress reporting. Verify how the total and completed service counts are calculated when multiple services are created, including services from different brokers. Done means the console reports the correct total and progress for both services without repeated incorrect counts.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.