Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-12074

Update methods and mapping rules at once in a Product or Backend CR

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • 3scale Operator
    • False
    • Hide

      None

      Show
      None
    • 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:

      1. Create new methods and/or metrics
      2. Update the mapping rules to use those methods/metrics and/or create new mapping rules
      3. Promote the Product
      4. Delete the methods and mapping rules not in use
      5. 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. 

              rhn-support-atra An Tran
              rhn-support-avilatus Anna Vila Tusell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: