Skip to content

Commit

Permalink
use toRawJson in Argo Event trigger parameters in order to not unnece…
Browse files Browse the repository at this point in the history
…ssarily escape html characters (#1911)
  • Loading branch information
saikonen authored Jul 2, 2024
1 parent d4021b2 commit 120f6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metaflow/plugins/argo/argo_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2158,7 +2158,7 @@ def _compile_sensor(self):
# NOTE: We need the conditional logic in order to successfully fall back to the default value
# when the event payload does not contain a key for a parameter.
# NOTE: Keys might contain dashes, so use the safer 'get' for fetching the value
data_template='{{ if (hasKey $.Input.body.payload "%s") }}{{- (get $.Input.body.payload "%s" | toJson) -}}{{- else -}}{{ (fail "use-default-instead") }}{{- end -}}'
data_template='{{ if (hasKey $.Input.body.payload "%s") }}{{- (get $.Input.body.payload "%s" | toRawJson) -}}{{- else -}}{{ (fail "use-default-instead") }}{{- end -}}'
% (v, v),
# Unfortunately the sensor needs to
# record the default values for
Expand Down

0 comments on commit 120f6ef

Please sign in to comment.