-
Feature Request
-
Resolution: Unresolved
-
Major
-
None
-
None
-
False
-
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
-
Current behavior
- When updating a method and the reference of the method in a mapping rule in the Backend CR the following error is shown:
Error sync backend [backend-name] mappingrules: backend metric method ref for mapping rule not found
- When updating a method and the reference of the method in a mapping rule in the Product CR the following error is shown:
Error sync product [product-name] mappingrules: product metric method ref for mapping rule not found
Steps to reproduce:
1) Create a Backend with a couple of mapping rules
2) Create a Product which has the Backend referenced
3) Promote the Product
4) Delete the existing mapping rules and methods and put new ones in the Backend CR at the same time (as one operation). The Backend CR will not sync and will show the error: "'Task failed SyncMappingRules: Error sync backend [backend-reproducer] mappingrules: backend metric method ref for mapping rule not found'"
5) OR instead of step 4), update the method and the reference of the method in the mapping rule at the same time. For example:
Initial mapping rules:
mappingRules:
- httpMethod: GET
increment: 1
last: false
metricMethodRef: GET_one
pattern: /one
- httpMethod: POST
increment: 1
last: false
metricMethodRef: POST_one
pattern: /one
methods:
GET_one:
friendlyName: GET /one
POST_one:
friendlyName: POST /one
Change applied:
mappingRules:
- httpMethod: GET
increment: 1
last: false
metricMethodRef: GET_two ----> method udpated
pattern: /one
- httpMethod: POST
increment: 1
last: false
metricMethodRef: POST_one
pattern: /one
methods:
GET_two:
friendlyName: GET /two ----> method udpated
POST_one:
friendlyName: POST /one
Currently the 3scale Operator cannot delete a method that is referenced by at least one mapping rule from an active gateway configuration. The solution to the issue is shared in this KCS solution:
- Create new methods and/or metrics
- Update the mapping rules to use those methods/metrics and/or create new mapping rules
- Promote the Product
- Delete the methods and mapping rules not in use
- Promote the Product
Expected behavior
It should be possible updating any methods and references of the methods in mapping rules at once either in a Product CR or Backend CR.