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

Merged
SbloodyS merged 6 commits intoapache:devfrom
shaolei7788:dev
Mar 31, 2026
Merged

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

Conversation

@shaolei7788
Copy link
Copy Markdown
Contributor

@shaolei7788 shaolei7788 commented Mar 18, 2026

Was this PR generated or assisted by AI?

Purpose of the pull request

fix #17943

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
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Revert unnessnary chanage.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Revert unnessnary chanage.

ok

@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
Copy Markdown
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?

Copy link
Copy Markdown
Contributor Author

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?

No,it is not enough. The time function is not converted.

Copy link
Copy Markdown
Member

@ruanwenjun ruanwenjun Mar 20, 2026

Choose a reason for hiding this comment

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

Are you sure? please test it on dev branch, this should be handled at master server.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes,I am sure

@shaolei7788
Copy link
Copy Markdown
Contributor Author

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

ok

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
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.

LGTM

@SbloodyS SbloodyS merged commit 860a1c5 into apache:dev Mar 31, 2026
122 checks passed
@boring-cyborg
Copy link
Copy Markdown

boring-cyborg bot commented Mar 31, 2026

Awesome work, congrats on your first merged pull request!

shrihari7396 pushed a commit to shrihari7396/dolphinscheduler that referenced this pull request Apr 4, 2026
…a Dinky job and passes date parameters, the actual values are not being replaced (apache#18080)
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.

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

3 participants