Skip to content

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

@kevinkelin

Description

@kevinkelin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions