Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [parameter] StartParams can't update local params #15280

Closed
2 of 3 tasks
kevinkelin opened this issue Dec 5, 2023 · 0 comments · Fixed by #15544
Closed
2 of 3 tasks

[Bug] [parameter] StartParams can't update local params #15280

kevinkelin opened this issue Dec 5, 2023 · 0 comments · Fixed by #15544
Labels
bug Something isn't working priority:high
Milestone

Comments

@kevinkelin
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

When create a workflow, user can set local params in node definition, like the picture below

image

When start a new instanse by webUI, user can set the param value,

image

But according to the document, the priority of params,

The priority of DolphinScheduler parameters from high to low is: Startup Parameter > Local Parameter > Parameter Context > Global Parameter > Project-level Parameter.

In this case, the value of datat should be "bbbb", but actually, the value of datat is "aaa" which seted in local param.

What you expected to happen

according to the document, the priority of params,

The priority of DolphinScheduler parameters from high to low is: Startup Parameter > Local Parameter > Parameter Context > Global Parameter > Project-level Parameter.

I think Startup Parameter will update local Parameter

How to reproduce

Step1:
Create a workflow, add a shell task.

Step2:
Edit shell task, add stript:

echo ${datat}

image

and add a param "datat", default value is "aaa" and then save this workflow.

Step3:
Start this workflow, and add a startup params, datat, set the value to "bbb"

image

Step4:
Check the task log, the value of param datat is still 'aaa'

[INFO] 2023-12-05 14:20:24.185 +0800 - process start, process id is: 11226
[INFO] 2023-12-05 14:20:25.185 +0800 -  -> 
	aaa
[INFO] 2023-12-05 14:20:25.186 +0800 - process has exited. execute

I check the log,

"prepareParamsMap" : {
    ...
    "datat" : {
      "prop" : "datat",
      "direct" : "IN",
      "type" : "VARCHAR",
      "value" : "aaa"
    },
    ...
    "StartParams" : {
      "prop" : "StartParams",
      "direct" : "IN",
      "type" : "VARCHAR",
      "value" : "{\"datat\":\"bbbb\"}"
    }
    ...
}

Anything else

Did I misunderstand the document and the type of Parameter ?

Version

3.2.x

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@kevinkelin kevinkelin added bug Something isn't working Waiting for reply Waiting for reply labels Dec 5, 2023
@zhongjiajie zhongjiajie added this to the 3.2.1 milestone Jan 30, 2024
zhongjiajie added a commit to zhongjiajie/dolphinscheduler that referenced this issue Jan 31, 2024
@zhongjiajie zhongjiajie removed the Waiting for reply Waiting for reply label Jan 31, 2024
zhongjiajie added a commit to zhongjiajie/dolphinscheduler that referenced this issue Feb 5, 2024
caishunfeng pushed a commit that referenced this issue Feb 5, 2024
* fix: start param for wf not work

fix: #15280

* fix test
zhongjiajie added a commit that referenced this issue Feb 6, 2024
* fix: start param for wf not work

fix: #15280

* fix test

(cherry picked from commit 01eb8f8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants