pingidentity-devops-getting-started icon indicating copy to clipboard operation
pingidentity-devops-getting-started copied to clipboard

ping-bulk-config tool add-config ignores paths with multiple slashes

Open samir-gandhi opened this issue 3 years ago • 1 comments
trafficstars

Describe the bug The bulk-config-tool seems to ignore adding paths that have multiple slashes.

To Reproduce Steps to reproduce the behavior:

  1. get a data.json, set up env as described in docs. example of relevant section of data.json:
    {
      "resourceType": "/idp/spConnections",
      "operationType": "SAVE",
      "items": [
        {}
      ]
    },
  1. config.json
{
  "add-config": [
    {
      "resourceType": "/idp/spConnections",
      "item": {
        "foo": "bar"
      }
    }
  ],
  "config-aliases": [],
  "remove-config": [],
  "expose-parameters": []
}

run command:

docker run --rm -v /tmp/pftest/shared:/shared ping-bulkconfig /shared/config.json /shared/data.json /shared/env_vars /shared/data.json.subst > shared/output.log

Expected behavior output of relevant section data.json.subst should be:

        {
            "operationType": "SAVE",
            "items": [{"foo": "bar"}],
            "resourceType": "/idp/spConnections"
        },

This is effectively the same as our default example in docs. working with a resource without multiple slashes (like /redirectValidation) works just fine. In fact, even just removing the second slash from "/idp/spConnections" on data.json and config.json works

samir-gandhi avatar Oct 10 '22 22:10 samir-gandhi

@ttranatping would you mind taking a look into this?

samir-gandhi avatar Oct 11 '22 15:10 samir-gandhi

reviving this for resolution/inquiry, @ttranatping

PingDavidR avatar Jul 12 '23 15:07 PingDavidR

Hi - will look into it today/tomorrow.

ttranatping avatar Jul 18 '23 05:07 ttranatping

I've resolved the processAddConfig issue and merged it into master @samir-gandhi @PingDavidR

ttranatping avatar Jul 28 '23 00:07 ttranatping

Thanks @ttranatping !

PingDavidR avatar Jul 31 '23 16:07 PingDavidR