Cloud template creation fails with a syntax error: "Invalid argument type calling 'max': expected array of number or string but was array containing null" after upgrading Aria Automation from version 8.16 to any higher version.
The error occurs consistently when attempting to create or modify Cloud templates (Blueprints). Sample CT code
capacityGb: '${propgroup.pgtest[input.machines[0].feature][count.index % length(propgroup.pgtest[input.machines[0].feature])].size < 0 ? max([not_null(ceil(input.machines[0][propgroup.pgtest[input.machines[0].feature][count.index % length(propgroup.pgtest[input.machines[0].feature])].property] * propgroup.pgtest[input.machines[0].feature][count.index % length(propgroup.pgtest[input.machines[0].feature])].sizeFactor), propgroup.pgtest[input.machines[0].feature][count.index % length(propgroup.pgtest[input.machines[0].feature])].min, 0)]) : propgroup.pgtest[input.machines[0].feature][count.index % length(propgroup.pgtest[input.machines[0].feature])].size}'
Aria Automation 8.16.1 onwards
A code change introduced in Aria Automation 8.16.x and later versions affects how the max function handles arrays containing null values. The function max expects an array of numbers or strings, but due to the code change, it now throws an error when encountering null values in the array.
The issue has been identified and acknowledged and a fix is scheduled to be included in the upcoming 8.18.1 Patch 2.