This is an automated email from the ASF dual-hosted git repository.

zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 860a1c5c43 [Fix-17943][dolphinscheduler-task-dinky] When 
DolphinScheduler calls a Dinky job and passes date parameters, the actual 
values are not being replaced (#18080)
860a1c5c43 is described below

commit 860a1c5c43139ee1c7f2847cf3c4d8ba9a73ad66
Author: shaolei7788 <[email protected]>
AuthorDate: Tue Mar 31 14:09:41 2026 +0800

    [Fix-17943][dolphinscheduler-task-dinky] When DolphinScheduler calls a 
Dinky job and passes date parameters, the actual values are not being replaced 
(#18080)
---
 .../plugin/task/dinky/DinkyTask.java               | 30 ++++++++++------------
 1 file changed, 13 insertions(+), 17 deletions(-)

diff --git 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-dinky/src/main/java/org/apache/dolphinscheduler/plugin/task/dinky/DinkyTask.java
 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-dinky/src/main/java/org/apache/dolphinscheduler/plugin/task/dinky/DinkyTask.java
index 70bc8fbffb..ca53126147 100644
--- 
a/dolphinscheduler-task-plugin/dolphinscheduler-task-dinky/src/main/java/org/apache/dolphinscheduler/plugin/task/dinky/DinkyTask.java
+++ 
b/dolphinscheduler-task-plugin/dolphinscheduler-task-dinky/src/main/java/org/apache/dolphinscheduler/plugin/task/dinky/DinkyTask.java
@@ -27,8 +27,6 @@ import 
org.apache.dolphinscheduler.plugin.task.api.TaskException;
 import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
 import org.apache.dolphinscheduler.plugin.task.api.model.Property;
 import 
org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;
-import org.apache.dolphinscheduler.plugin.task.api.parser.PlaceholderUtils;
-import org.apache.dolphinscheduler.plugin.task.api.utils.GlobalParameterUtils;
 import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils;
 
 import org.apache.commons.lang3.StringUtils;
@@ -339,24 +337,22 @@ public class DinkyTask extends AbstractRemoteTask {
 
     private Map<String, String> generateVariables() {
         Map<String, String> variables = new ConcurrentHashMap<>();
-        List<Property> propertyList =
-                
GlobalParameterUtils.deserializeGlobalParameter(taskExecutionContext.getGlobalParams());
-        if (propertyList != null && !propertyList.isEmpty()) {
-            for (Property property : propertyList) {
-                variables.put(property.getProp(), property.getValue());
+        Map<String, Property> prepareParamsMap = 
taskExecutionContext.getPrepareParamsMap();
+        prepareParamsMap.forEach((key, property) -> {
+            if (property != null && property.getValue() != null) {
+                variables.put(key, property.getValue().trim());
             }
-        }
+        });
         List<Property> localParams = this.dinkyParameters.getLocalParams();
-        Map<String, Property> prepareParamsMap = 
taskExecutionContext.getPrepareParamsMap();
-        if (localParams == null || localParams.isEmpty()) {
-            return variables;
-        }
-        Map<String, String> convertMap = 
ParameterUtils.convert(prepareParamsMap);
-        for (Property property : localParams) {
-            String propertyValue = property.getValue();
-            String value = PlaceholderUtils.replacePlaceholders(propertyValue, 
convertMap, true);
-            variables.put(property.getProp(), value);
+        if (localParams != null) {
+            for (Property property : localParams) {
+                String value = 
ParameterUtils.convertParameterPlaceholders(property.getValue(), variables);
+                if (value != null && !value.isEmpty()) {
+                    variables.put(property.getProp(), value.trim());
+                }
+            }
         }
+        log.info("sending variables to dinky: {}", variables);
         return variables;
     }
 

Reply via email to