Skip to content

[Fix-17943][dolphinscheduler-task-dinky] When DolphinScheduler calls a Dinky job and passes date parameters, the actual values are not being replaced#18080

Open
shaolei7788 wants to merge 4 commits intoapache:devfrom
shaolei7788:dev
Open

[Fix-17943][dolphinscheduler-task-dinky] When DolphinScheduler calls a Dinky job and passes date parameters, the actual values are not being replaced#18080
shaolei7788 wants to merge 4 commits intoapache:devfrom
shaolei7788:dev

Conversation

@shaolei7788
Copy link

Was this PR generated or assisted by AI?

Purpose of the pull request

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not create multiple PRs repeatedly next time. This will lead to an increase in reviewer's work.

}

}
} No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert unnessnary chanage.

@SbloodyS SbloodyS added bug Something isn't working first time contributor First-time contributor labels Mar 18, 2026
@SbloodyS SbloodyS added this to the 3.4.2 milestone Mar 18, 2026
Comment on lines +340 to +355
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe directly use taskExecutionContext.getPrepareParamsMap() is enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working first time contributor First-time contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants