Skip to content

Commit

Permalink
feature: bamboo-pipeline 支持流程级别网关配置
Browse files Browse the repository at this point in the history
  • Loading branch information
normal-wls committed Oct 24, 2023
1 parent de8379d commit af48abc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion runtime/bamboo-pipeline/pipeline/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

default_app_config = "pipeline.apps.PipelineConfig"

__version__ = "3.27.0"
__version__ = "3.28.0"
2 changes: 1 addition & 1 deletion runtime/bamboo-pipeline/pipeline/eri/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def ready(self):
pipeline_exclusive_gateway_expr_func_text = getattr(
settings, "PIPELINE_EXCLUSIVE_GATEWAY_EXPR_FUNC_TEXT", "1==1"
)
check_result = pipeline_exclusive_gateway_expr_func(pipeline_exclusive_gateway_expr_func_text, {})
check_result = pipeline_exclusive_gateway_expr_func(pipeline_exclusive_gateway_expr_func_text, {}, {})
if not check_result:
raise ConfigValidationError("config validate error, the expr func return False")

Expand Down
5 changes: 4 additions & 1 deletion runtime/bamboo-pipeline/pipeline/eri/imp/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
EmptyStartEvent,
EmptyEndEvent,
ExecutableEndEvent,
Condition, DefaultCondition,
Condition,
DefaultCondition,
)

from pipeline.eri.models import Node as DBNode
Expand Down Expand Up @@ -67,6 +68,7 @@ def _get_node(self, node: DBNode):
type=NodeType.ExclusiveGateway,
conditions=[Condition(**c) for c in node_detail["conditions"]],
default_condition=DefaultCondition(**default_condition) if default_condition else None,
extra_info=node_detail.get("extra_info"),
**common_args
)

Expand All @@ -82,6 +84,7 @@ def _get_node(self, node: DBNode):
converge_gateway_id=node_detail["converge_gateway_id"],
conditions=[Condition(**c) for c in node_detail["conditions"]],
default_condition=DefaultCondition(**default_condition) if default_condition else None,
extra_info=node_detail.get("extra_info"),
**common_args
)

Expand Down
4 changes: 4 additions & 0 deletions runtime/bamboo-pipeline/pipeline/eri/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ def _gen_gateway_node(self, gateway: dict, pipeline: dict, root_id: str, parent_
if default_condition
else None
)
if gateway.get("extra_info"):
detail["extra_info"] = gateway["extra_info"]
elif gateway["type"] == NodeType.ParallelGateway.value:
detail["converge_gateway_id"] = gateway["converge_gateway_id"]

Expand All @@ -215,6 +217,8 @@ def _gen_gateway_node(self, gateway: dict, pipeline: dict, root_id: str, parent_
if default_condition
else None
)
if gateway.get("extra_info"):
detail["extra_info"] = gateway["extra_info"]
detail["converge_gateway_id"] = gateway["converge_gateway_id"]
elif gateway["type"] == NodeType.ConvergeGateway.value:
pass
Expand Down
4 changes: 2 additions & 2 deletions runtime/bamboo-pipeline/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bamboo-pipeline"
version = "3.27.0"
version = "3.28.0"
description = "runtime for bamboo-engine base on Django and Celery"
authors = ["homholueng <[email protected]>"]
license = "MIT"
Expand All @@ -16,7 +16,7 @@ requests = "^2.22.0"
django-celery-beat = "^2.1.0"
Mako = "^1.1.4"
pytz = "2019.3"
bamboo-engine = "2.8.1"
bamboo-engine = "2.9.0"
jsonschema = "^2.5.1"
ujson = "4.1.*"
pyparsing = "^2.2.0"
Expand Down

0 comments on commit af48abc

Please sign in to comment.