Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复任务未执行节点预览时免渲染表单项中变量仍被渲染问题 #7358 #7383

Open
wants to merge 5 commits into
base: release_humming_bird
Choose a base branch
from
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion gcloud/tasktmpl3/domains/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Loading