You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "njnu-seafish (via GitHub)" <gi...@apache.org> on 2026/03/13 09:30:28 UTC
[PR] [Fix-18064][ApiServer]Update globalParams replace logic and test case [dolphinscheduler]
njnu-seafish opened a new pull request, #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068
<!--Thanks very much for contributing to Apache DolphinScheduler, we are happy that you want to help us improve DolphinScheduler! -->
## Was this PR generated or assisted by AI?
NO
## Purpose of the pull request
close #18064
## Brief change log
Update globalParams replace logic and test case
## Verify this pull request
<!--*(Please pick either of the following options)*-->
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:
<!--*(example:)*
- *Added dolphinscheduler-dao tests for end-to-end.*
- *Added CronUtilsTest to verify the change.*
- *Manually verified the change by testing locally.* -->
(or)
## Pull Request Notice
[Pull Request Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
If your pull request contains incompatible change, you should also add it to `docs/docs/en/guide/upgrade/incompatible.md`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4131132147
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068) **Quality Gate failed**
Failed conditions
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=18068&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4212878137
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068) **Quality Gate failed**
Failed conditions
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=18068&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4054222208
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068) **Quality Gate passed**
Issues
 [4 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=18068&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=18068&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=18068&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [84.2% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=18068&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=18068&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4066791928
> It's better to use a utils to do this, the calculate logic also exist in master.
>
> I think we should use a table to store some of the runtime context of workflow instances, such as parameters.(This can be a final solution)
Sure, I'll wait until the other PRs are merged before fixing this one to avoid conflicts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4317838508
Although I think the current approach is a bit difficult to maintain, I’ll look into how to optimize it later. Runtime instance parameters should be encapsulated within the master/worker engine; the API shouldn’t be aware of this parameter substitution logic, otherwise it would be too tightly coupled. Plus, if someone makes changes on the master side, they might not realize that the API also needs to be updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4323635695
@SbloodyS Could you please help review this? Thanks a lot!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS merged PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4213094733
> It's better to use a utils to do this, the calculate logic also exist in master.
>
> I think we should use a table to store some of the runtime context of workflow instances, such as parameters.(This can be a final solution)
There is already a utility class for this functionality:
dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ParameterUtils.java
<img width="2236" height="1352" alt="企业微信截图_17757267763928" src="https://github.com/user-attachments/assets/d41a6f26-c95e-4184-aa86-28a8e33ae81f" />
@ruanwenjun Could you please take a look at the code? Thanks a lot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4087327701
> I think we should use a table to store some of the runtime context of workflow instances, such as parameters.(This can be a final solution)
The table currently stores placeholders that have not yet been replaced with actual values. Additionally, the placeholders must be substituted based on the actual execution time.
mysql> select * from t_ds_workflow_instance order by start_time desc limit 1 \G;
command_param: {"commandType":"START_PROCESS","subWorkflowInstance":false,"startNodes":[],"commandParams":[{"prop":"a","direct":"IN","type":"VARCHAR","value":"11"},{"prop":"b","direct":"IN","type":"VARCHAR","value":"2"},{"prop":"c","direct":"IN","type":"VARCHAR","value":"$[yyyyMMdd]"},{"prop":"d","direct":"IN","type":"VARCHAR","value":"4"},{"prop":"e","direct":"IN","type":"VARCHAR","value":"$[yyyyMMdd+1]"}],"timeZone":"GMT+08:00"}
global_params: [{"prop":"a","direct":"IN","type":"VARCHAR","value":"11"},{"prop":"b","direct":"IN","type":"VARCHAR","value":"2"},{"prop":"c","direct":"IN","type":"VARCHAR","value":"$[yyyyMMdd]"},{"prop":"d","direct":"IN","type":"VARCHAR","value":"4"},{"prop":"e","direct":"IN","type":"VARCHAR","value":"$[yyyyMMdd+1]"}]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "njnu-seafish (via GitHub)" <gi...@apache.org>.
njnu-seafish commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4087372588
> > It's better to use a utils to do this, the calculate logic also exist in master.
Personally, I don't think it's advisable to extract a utility method for replacing global variables, as the logic differs significantly between the API and Master modules.
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/expand/CuringParamsServiceImpl.java
<img width="1175" height="992" alt="企业微信截图_17738893026411" src="https://github.com/user-attachments/assets/8b0046b7-de1a-4c1a-828d-b8e048787f9c" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4213727612
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068) **Quality Gate failed**
Failed conditions
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=18068&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4317878833
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068) **Quality Gate failed**
Failed conditions
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=18068&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4054215279
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068) **Quality Gate passed**
Issues
 [4 New issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=18068&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=18068&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=18068&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [84.2% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=18068&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=18068&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement-18064][ApiServer] Update globalParams replace logic and test case [dolphinscheduler]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #18068:
URL: https://github.com/apache/dolphinscheduler/pull/18068#issuecomment-4326189421
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068) **Quality Gate failed**
Failed conditions
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=18068&metric=new_coverage&view=list) (required ≥ 60%)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=18068)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org