diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java index 2f7f9b9e61e84d044f4ca0294e3f3b50f3a133d9..bcb62f7333599d8aed20d461d1770d1605813ba5 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/python/PythonGateway.java @@ -203,7 +203,6 @@ public class PythonGateway { * and if would always fresh exists schedule if not null * @param warningType warning type * @param warningGroupId warning group id - * @param locations locations json object about all tasks * @param timeout timeout for process definition working, if running time longer than timeout, * task will mark as fail * @param workerGroup run task in which worker group @@ -221,7 +220,6 @@ public class PythonGateway { String schedule, String warningType, int warningGroupId, - String locations, int timeout, String workerGroup, String tenantCode, @@ -242,10 +240,10 @@ public class PythonGateway { // make sure process definition offline which could edit processDefinitionService.releaseProcessDefinition(user, projectCode, processDefinitionCode, ReleaseState.OFFLINE); Map result = processDefinitionService.updateProcessDefinition(user, projectCode, name, processDefinitionCode, description, globalParams, - locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType); + null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType); } else { Map result = processDefinitionService.createProcessDefinition(user, projectCode, name, description, globalParams, - locations, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType); + null, timeout, tenantCode, taskRelationJson, taskDefinitionJson, otherParamsJson, executionType); processDefinition = (ProcessDefinition) result.get(Constants.DATA_LIST); processDefinitionCode = processDefinition.getCode(); } diff --git a/dolphinscheduler-python/pydolphinscheduler/UPDATING.md b/dolphinscheduler-python/pydolphinscheduler/UPDATING.md index d772c6f8f6e98ac450d0e8d674362a8352b508b9..448ac37e15e7a42fea4b74668a296415bc63e9d5 100644 --- a/dolphinscheduler-python/pydolphinscheduler/UPDATING.md +++ b/dolphinscheduler-python/pydolphinscheduler/UPDATING.md @@ -24,10 +24,9 @@ It started after version 2.0.5 released ## dev -* Change variable about where to keep pydolphinscheduler configuration from ``PYDOLPHINSCHEDULER_HOME`` to - ``PYDS_HOME`` which is same as other environment variable name. +* Remove parameter ``task_location`` in process definition and Java Gateway service ([#11681](https://github.com/apache/dolphinscheduler/pull/11681)) -## 3.0.0a0 +## 3.0.0 * Integrate Python gateway server into Dolphinscheduler API server, and you could start Python gateway service by command `./bin/dolphinscheduler-daemon.sh start api-server` instead of independent command @@ -35,3 +34,5 @@ It started after version 2.0.5 released * Remove parameter `queue` from class `ProcessDefinition` to avoid confuse user when it change but not work * Change `yaml_parser.py` method `to_string` to magic method `__str__` make it more pythonic. * Use package ``ruamel.yaml`` replace ``pyyaml`` for write yaml file with comment. +* Change variable about where to keep pydolphinscheduler configuration from ``PYDOLPHINSCHEDULER_HOME`` to + ``PYDS_HOME`` which is same as other environment variable name. \ No newline at end of file diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py index 980b18e96d88d143387b2c4ca4d6eb5d29166de1..df05b01edef58477ea7f476eb97cab48b22f8531 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py @@ -274,19 +274,6 @@ class ProcessDefinition(Base): "timezoneId": self.timezone, } - # TODO inti DAG's tasks are in the same location with default {x: 0, y: 0} - @property - def task_location(self) -> List[Dict]: - """Return all tasks location for all process definition. - - For now, we only set all location with same x and y valued equal to 0. Because we do not - find a good way to set task locations. This is requests from java gateway interface. - """ - if not self.tasks: - return [self.tasks] - else: - return [{"taskCode": task_code, "x": 0, "y": 0} for task_code in self.tasks] - @property def task_list(self) -> List["Task"]: # noqa: F821 """Return list of tasks objects.""" @@ -400,7 +387,6 @@ class ProcessDefinition(Base): json.dumps(self.param_json), self.warning_type, self.warning_group_id, - json.dumps(self.task_location), self.timeout, self.worker_group, self._tenant, diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py index a460a466bbbaccbeb9006ecf6e16eaeb4148f78f..59d411b62ca38e1056f9b7b1c3cc836e69e0f7ee 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py @@ -165,7 +165,6 @@ class JavaGate: global_params: str, warning_type: str, warning_group_id: int, - locations: str, timeout: int, worker_group: str, tenant_code: str, @@ -186,7 +185,6 @@ class JavaGate: schedule, warning_type, warning_group_id, - locations, timeout, worker_group, tenant_code, diff --git a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-graph-auto-layout.ts b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-graph-auto-layout.ts index 853e7adc636af44f0b838bda1670453d7c30da02..b662b192ef971cd2373a086b80713ed4bf74292f 100644 --- a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-graph-auto-layout.ts +++ b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-graph-auto-layout.ts @@ -155,6 +155,8 @@ export function useGraphAutoLayout(options: Options) { format(formValue.value) toggle(false) }) + } else { + format({} as LayoutConfig) } }