apache / linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.
https://linkis.apache.org/
Apache License 2.0
3.3k stars 1.17k forks source link

[Bug] StartupParams has lost in CodeLogicalUnitExecTask.toRequestTask method #4208

Closed fjibj closed 1 year ago

fjibj commented 1 year ago

Search before asking

Linkis Component

linkis-engineconnn-plugin, linkis-orchestrator

Steps to reproduce

Step 1: Add some attributes such as "jdbc.url" for workflow JDBC node, just insert some key in dss_workflow_node_ui table. You can see a new input appear in Attribute information of jdbc. So you can get the request json include "jdbc.url" in startup params.

params: {variable: {}, configuration: {special: {}, runtime: {,…}, startup: {ReuseEngine: "true",…}}} configuration: {special: {}, runtime: {,…}, startup: {ReuseEngine: "true",…}} runtime: {,…} contextID: "{"type":"HAWorkFlowContextID","value":"{\"instance\":null,\"backupInstance\":null,\"user\":\"root\",\"workspace\":\"bdapWorkspace\",\"project\":\"test22\",\"flow\":\"t22flow1\",\"contextId\":\"8-8--cs_1_devcs_1_dev20\",\"version\":\"v000001\",\"env\":\"BDAP_DEV\"}"}" nodeName: "jdbc_3011" special: {} startup: {ReuseEngine: "true",…} ReuseEngine: "true" jdbc.url: "jdbc:mysql://xx.xx.xx.xx:yyyy/mysql" variable: {}

Step 2: But you can't get the value of "jdbc.url" params from the properties of engineExecutorContext in EngineExecutor classes , such as JDBCEngineConnExecutor.scala, So, it must lost during the transmission process.

Expected behavior

I expect to get the value of startup params in the properties of engineExecutorContext in any EngineExecutor classes, or give me some other method to get them,maybe from JobHistory.

But in my opinion, it is a public problem that needs to be fixed. I checked the code and found it lost in CodeLogicalUnitExecTask.toRequestTask method that passed a lot of parames except startup.

I added some code in CodeLogicalUnitExecTask.toRequestTask method as an interim proposal // add by fangjin 20230210 if (null != getParams.getStartupParams) { requestTask.getProperties.putAll(getParams.getStartupParams.getConfigurationMap) } //

Your environment

Anything else

No response

Are you willing to submit a PR?

github-actions[bot] commented 1 year ago

:blush: Welcome to the Apache Linkis community!!

We are glad that you are contributing by opening this issue.

Please make sure to include all the relevant context. We will be here shortly.

If you are interested in contributing to our website project, please let us know! You can check out our contributing guide on :point_right: How to Participate in Project Contribution.

Community

WeChat Assistant WeChat Public Account

Mailing Lists

Name Description Subscribe Unsubscribe Archive
dev@linkis.apache.org community activity information subscribe unsubscribe archive
peacewong commented 1 year ago

Thank you for your explanation, this should be a DSS bug. Because StartUp should be the parameter used when starting Ec. You can refer to: org.apache.linkis.orchestrator.computation.execute.DefaultCodeExecTaskExecutorManager#createMarkReq The URL of JDBC should be put into Runtime parmas. But I think it can be compatible here, but in order to prevent parameter duplication, it is recommended to put startUP first and then put runtime

casionone commented 1 year ago

I will close this issue. You can reopen if necessary