Custom query json does not work after upgrade

book

Article ID: 211348

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio)

Issue/Introduction

Hello,

we have a custom action pack developed 3 years ago that works.

After the upgrade to 6.6 the action finishes successfully but does not return any value. The agent is not upgraded only the management and the execution server.

This is the query I launch and I attach the file over we make the query:

  results[?(@.name=="kyue_mult_web.ear")].path  

 

Cause

The support for double quotes in filters was added in version 2.2.0 (https://github.com/json-path/JsonPath/commit/0364d444071f2b7f7e805200746f9b902e261ddb)

6.6 & 6.7 uses 2.0.0 version of json-path.

Why it was working prior to upgrade?

  • We checked our commit histories and we can see that it happened in 6.4 release fixing one of the defect where json-path was upgraded to 2.2.0 and most likely the lib stayed in 6.5 on the customer environment, which explains why their action was working.
  • The version was later downgraded again to 2.0.0 and it stays on this version both in 6.6 and 6.7. 

Environment

Release : 6.6(GA), 6.7(GA)

Component : CA RELEASE AUTOMATION CORE

Resolution

Solution: Below are two solution to address identified problem, please choose one whichever is feasible.

A: (Modification required in action)

    • Try to replace double quotes with single quotes in only one action and see if it helps.


B: (No modification required in actions)

    • If solution A doesn't help, then put json-path-2.2.0.jar (can be downloaded from https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path/2.2.0) to the uploadActions folder on active NAC
    • Restart the NAC service, it will result in moving this jar to NAC's actionsLib folder.
    • The JAR will propagate to the agent executing the action. This will allow the use of double quotes without modifying any other actions.

 

Additional Information

We have plan to upgrade to JSON-PATH 2.2.0 in upcoming cumulative of 6.6 and 6.7 as default. Please refer the release notes of cumulative.