Details
-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
2.12.0 GA
-
False
-
None
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Description
Current behaviour
- A Product CR has one or more application plans under the spec, applicationPlans object.
- An application has been created from the UI/API with one of the existing application plans created by the Product CR.
- When deleting the applicationPlans object from the Product CR, the following error appears in the Product CR:
status:
conditions:
- lastTransitionTime: '2022-07-29T12:34:49Z'
message: >-
Task failed SyncApplicationPlans: Error sync product [operatedproduct1]
plans: product [operatedproduct1] delete applicationPlan: error calling
3scale system - reason: {"errors":{"base":["This application plan cannot
be deleted! At least one application depends on it."]}} - code: 403
which is expected since there is an application that is binded to the plan.
- However, when refreshing the Product CR yaml file, the object applicationPlans has been deleted and the application plans can be seen in the admin portal UI.
spec: backendUsages: backend1: path: / metrics: hits: description: Number of API hits friendlyName: Hits unit: hit name: OperatedProduct 1 policies: - configuration: {} enabled: true name: apicast version: builtin systemName: operatedproduct1 status:
*Expected behaviour: *
After refreshing the Product CR yaml file, because the application plans have not been deleted the applicationPlans object should not be deleted from the Product CR yaml file:
spec: name: "OperatedProduct 1" systemName: "operatedproduct1" backendUsages: backend1: path: / applicationPlans: plan01: name: "My Plan 01" setupFee: "14.56" plan02: name: "My Plan 02" trialPeriod: 3 costMonth: 3