You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it is impossible to se a template variable for the priority field since it is an integer in the psconfig schema, which is checked prior to variable expansion. For example, when it sees {% jq 8 %} it fails.
For stuff in test specs, archiver specs, etc the base psconfig only cares that they are JSON objects and defers to pscheduler on validating the contents of those object. That means this is a non-issue for those fields since the base psconfig schema has nothing to say about their type. Once the jq temaplate variables are expanded, they correctly let jq determine the quoting.
We need to update the psconfig schema to allow for priority to be an integer or a string. We also need to determine how we wan to validate that field by either defining a pattern in the schema too match jq variables or some type of post expansion step.
I think this was discussed verbally or on Slack at some point, but just to close the loop:
The JSON in the template obviously needs a string so this stuff can be specified (e.g., "priority": "{% jq 8 %}") but forces the returned value to be interpreted as a string "priority": "8").
My recommendation would be to treat strings that are entirely a jq substitution ("{% jq ... %}") as a value that's of the returned type. This would make "{% jq 8 %}" and "{% jq \"eight\" %}" behave as one would expect.
Currently it is impossible to se a template variable for the priority field since it is an integer in the psconfig schema, which is checked prior to variable expansion. For example, when it sees {% jq 8 %} it fails.
For stuff in test specs, archiver specs, etc the base psconfig only cares that they are JSON objects and defers to pscheduler on validating the contents of those object. That means this is a non-issue for those fields since the base psconfig schema has nothing to say about their type. Once the jq temaplate variables are expanded, they correctly let jq determine the quoting.
We need to update the psconfig schema to allow for priority to be an integer or a string. We also need to determine how we wan to validate that field by either defining a pattern in the schema too match jq variables or some type of post expansion step.
The text was updated successfully, but these errors were encountered: