Running cf html5-list -a deletes service binding of Cloud Foundry application.
Expected
When html5-plugin reuses existing service key or binding and not creates new one to execute the command, the reused service key / binding should not be deleted at the end of command execution.
Environment
Plugin version (e.g. 1.3.0) - 1.4.7
OS (macOS/Windows) - macOS
SAP CF Landscape (e.g. Canary) - Canary
IaaS provider (e.g. AWS) - AWS
Region (e.g. eu10) - eu12
CLI Output
$> DEBUG=1 cf html5-list -a ar
14:47:42.397599 Running CloudFoundry html5-plugin 1.4.7
14:47:42.398845 Initializing command 'html5-list'
14:47:42.399170 Configuration file found. Clearing cache
14:47:42.405220 Executing command 'html5-list': args: '[-a ar]'
14:47:42.405243 Listing HTML5 applications available for CF application 'ar'
14:47:42.405246 Getting context (org/space/username)
Getting list of HTML5 application available in scope of application ar in org ORG / space SPACE as john.doe@sap.com...
14:47:42.407026 Getting HTML5 context
14:47:42.407033 Getting list of services
14:47:42.407369 Making request to: /v3/service_offerings?space_guids=c189ec25-ce15-4e19-b9e2-bcd123ef00dc
14:47:43.063846 Looking for 'html5-apps-repo' service
14:47:43.063940 Getting service plans for 'html5-apps-repo' service (GUID: 73210b64-6f92-4a16-bd1c-401f00cbe597)
14:47:43.063950 Making request to: /v3/service_plans?service_offering_guids=73210b64-6f92-4a16-bd1c-401f00cbe597
14:47:43.684829 Looking for app-runtime service plan
14:47:43.684974 Getting service instances of 'html5-apps-repo' service app-runtime plan (&{Name:app-runtime GUID:74b88153-e9ad-4f5f-b2df-3a65923c1a80})
14:47:43.685042 Making request to: /v3/service_instances?service_plan_guids=74b88153-e9ad-4f5f-b2df-3a65923c1a80&space_guids=c189ec25-ce15-4e19-b9e2-bcd123ef00dc
14:47:43.999140 Getting list of service keys for service rt
14:47:43.999203 Making request to: /v3/service_credential_bindings?service_instance_guids=42d83575-8376-441e-a255-1a72090c1d1f
14:47:44.254583 Making request to: https://api.cf.sap.hana.ondemand.com/v3/service_credential_bindings/784f838d-9b8c-4ec7-95b9-1fa07725830c/details14:47:44.723936 Found 1 service keys for service rt, using: {Name: GUID:784f838d-9b8c-4ec7-95b9-1fa07725830c Credentials:{Vendor:0xc000065120 URI:0xc000065130 GrantType:0xc000065100 SapCloudService:0xc000065110 SapCloudServiceAlias: UAA:0xc00020ca20 HTML5AppsRepo: Endpoints:}}
14:47:44.723991 Getting token for service key
14:47:44.724093 Making request to: https://approutertest.authentication.sap.hana.ondemand.com/oauth/token
14:47:45.172599 Access token for service key : [ SENSITIVE DATA ]
14:47:45.173697 Looking for app-host service plan
14:47:45.173826 Getting service instances of html5-apps-repo service app-host plan (&{Name:app-host GUID:87267fe3-30eb-49a6-aca2-6c509118449e})
14:47:45.173859 Making request to: /v3/service_instances?service_plan_guids=87267fe3-30eb-49a6-aca2-6c509118449e&space_guids=c189ec25-ce15-4e19-b9e2-bcd123ef00dc
14:47:45.513121 Getting list of applications for app-host plan ({Name:app-host-1679898832 GUID:8cfcea1b-bb5e-4990-b448-9fc8eec21127 UpdatedAt:2023-03-27T06:33:53Z LastOperation:{Type:create State:succeeded Description: UpdatedAt:2023-03-27T06:33:53Z CreatedAt:2023-03-27T06:33:53Z}})
14:47:45.513237 Making request to: https://html5-apps-repo-rt.cfapps.sap.hana.ondemand.com/applications/metadata/
14:47:46.170042 Making request to: /v3/apps?names=ar
14:47:46.443827 Number of applications with name ar: 1
14:47:46.443930 Making request to: /v3/apps/8d9063f0-653d-4f16-be7d-1aff598162d5/env
14:47:46.705114 Deleting service key
14:47:46.705192 Making request to (try 1/3): /v3/service_credential_bindings/784f838d-9b8c-4ec7-95b9-1fa07725830c
OK
name version app-host-id service instance visibility last changed
app 1.0.0 8cfcea1b-bb5e-4990-b448-9fc8eec21127 app-host-1679898832 private Mon, 27 Mar 2023 06:33:56 GMT
Description
Actual
Running
cf html5-list -a
deletes service binding of Cloud Foundry application.Expected
When
html5-plugin
reuses existing service key or binding and not creates new one to execute the command, the reused service key / binding should not be deleted at the end of command execution.Environment
CLI Output
name version app-host-id service instance visibility last changed
app 1.0.0 8cfcea1b-bb5e-4990-b448-9fc8eec21127 app-host-1679898832 private Mon, 27 Mar 2023 06:33:56 GMT