Uploaded image for project: 'mod-configuration'
  1. mod-configuration
  2. MODCONF-44

POST item with id still makes server side ID

    XMLWordPrintable

Details

    • CP: sprint 79
    • 2
    • Core: Platform

    Description

      Client side generated UUIDs for the items are not obeyed and a different one is returned.

      Running tenant init twice -... eg upgrade rails with

      adam@fry:~/folio$ ./ref-init.sh 
      adam@fry:~/folio$ ./ref-init.sh 
      PUT http://localhost:8081/configurations/entries/b873eb5a-7a50-488a-9624-d4fbc4daad51 returned status 404: b873eb5a-7a50-488a-9624-d4fbc4daad51 POST http://localhost:8081/configurations/entries returned status 422: {
        "errors" : [ {
          "message" : "Cannot have more than one tenant or user record with the same module, config name and code",
          "parameters" : [ ],
          "configName" : "locale",
          "code" : "system.currency_code.dk",
          "module" : "SETTINGS",
          "userId" : null
        } ]
      

      The initial error 404 for the PUT is very misleading.. Obviously the configuration does exist!

      tenant sample/ref data was introduced with MODCONF-33

      The problem seems to boil down to this: client side id (UUID) is not what's returned. That's why the PUT returns 404 in 2nd run.

      $ cat currency_code_dk.json 
      {
          "id": "b873eb5a-7a50-488a-9624-d4fbc4daad51",
           "module": "SETTINGS",
           "configName": "locale",
           "code": "system.currency_code.dk",
           "description": "currency",
           "default": false,
           "enabled": true,
           "value": "DKK"
      }
      $ curl  -HX-Okapi-Tenant:testlib4 -d@currency_code_dk.json -HContent-Type:application/json \
          '-HAccept:*/*' http://localhost:8081/configurations/entries
      {
        "id" : "5818aafa-06e4-4c2d-aefe-3ab97a882b72",
        "module" : "SETTINGS",
        "configName" : "locale",
        "code" : "system.currency_code.dk",
        "description" : "currency",
        "default" : false,
        "enabled" : true,
        "value" : "DKK",
        "metadata" : {
          "createdDate" : "2019-12-18T12:18:40.329+0000",
          "updatedDate" : "2019-12-18T12:18:40.329+0000"
        }
      }
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                adam Adam Dickmeiss (Inactive)
                adam Adam Dickmeiss (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases