diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e599933bae..196ed9ed72 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: hooks: - id: check-merge-conflict - repo: https://github.com/psf/black - rev: stable + rev: 22.8.0 hooks: - id: black language_version: python3.6 diff --git a/gcloud/tasktmpl3/domains/constants.py b/gcloud/tasktmpl3/domains/constants.py index 3ab3a6077b..6aa3e961b6 100644 --- a/gcloud/tasktmpl3/domains/constants.py +++ b/gcloud/tasktmpl3/domains/constants.py @@ -125,8 +125,16 @@ def get_need_render_context_keys(): if node_type == NodeType.ServiceActivity.value and node_code != "subprocess_plugin": need_render_context_keys = get_need_render_context_keys() else: - need_render_context_keys = list(pipeline["data"].get("inputs", {}).keys()) + list(parent_params.keys()) + need_render_context_keys = set(list(pipeline["data"].get("inputs", {}).keys()) + list(parent_params.keys())) + no_need_render_keys = set( + { + "${%s}" % key + for key, val in pipeline["activities"].get(node_id, {}).get("component", {}).get("inputs", {}).items() + if val.get("need_render") is False + } + ) + need_render_context_keys = need_render_context_keys.difference(no_need_render_keys) context_values = [ ContextValue(key=key, type=VAR_CONTEXT_MAPPING[info["type"]], value=info["value"], code=info.get("custom_type")) for key, info in list(pipeline["data"].get("inputs", {}).items()) + list(parent_params.items())