#7722 treat nil variableMap as empty so no-input tasks can launch
Pull request opened by
ursucarina
Why are the changes needed?
JSONValuesToLiterals errored with variableMap cannot be nil when passed a nil variableMap. That happens legitimately for a task with no declared inputs — its interface.inputs is unset, so callers (e.g. the launch form converting form values back to literals) pass a nil map. There are no expected inputs in that case, so it should produce zero literals rather than fail.
What changes were proposed in this pull request?
In JSONValuesToLiterals, treat a nil variableMap as an empty one instead of erroring. An empty payload yields no literals, and any provided values are unmapped and ignored (debug-logged), consistent with the existing unmapped-field handling.
How was this patch tested?
go test ./dataproxy/converter/... — passing. Updated the nil-variableMap test to assert an empty result with no error (both an empty payload and a payload whose values have no matching variable).
Labels
fixed
Setup process
Screenshots
Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
Related PRs
Stack
If you do use
git town
to manage PR Stacks, the stack relevant to this PR
will show below. Otherwise, you can ignore this section.
Docs link
flyteorg/flyte