fix: support variable parsing in arrays for job arguments #7254
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, variables like
$var:f/path/to/variablewere not beingresolved when they appeared inside arrays in job arguments. This was
because the
transform_json_valuefunction incommon.rsonlyhandled recursive transformation for
Value::Object, but was missingthe case for
Value::Array.This commit adds support for recursively transforming array elements,
allowing variables to be properly resolved when used within arrays.
Example:
["$var:f/Narration/jina_api_key"]would remain as literal string["jina_this_is_real_jian_key_value"](variable is properly resolved)Note: String concatenation with variables (e.g., "Bearer: $var:...")
is still not supported as it requires a more complex implementation
with regex-based pattern matching and substitution.
Fixes issue #7253 where variables in array parameters were not being parsed.