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] fix NPE in SQLCodeCheckInterceptor #4061

Closed GuoPhilipse closed 1 year ago

GuoPhilipse commented 1 year ago

Search before asking

Linkis Component

linkis-computation-governance

Steps to reproduce

execute the following command

sh bin/linkis-cli -submitUser hadoop -engineType shell -codeType shell -code "whoami"

the error logs will shown

[INFO] User does not provide usr-configuration file. Will use default config
[INFO] user does not specify proxy-user, will use current submit-user "hadoop" by default.
[INFO] connecting to linkis gateway:http://127.0.0.1:9001
[ERROR] EXE0011,Error occured during execution: Failed to submit job
Caused by: org.apache.linkis.httpclient.exception.HttpClientResultException: errCode: 10905 ,desc: URL /api/rest_j/v1/entrance/submit request failed! ResponseBody is {"method":null,"status":1,"message":"operation failed(操作失败)s!the reason(原因):NullPointerException: ","data":{"errorMsg":{"serviceKind":"linkis-cg-entrance","level":2,"port":9104,"errCode":0,"ip":"tv3-hadoop-06","desc":"operation failed(操作失败)s!the reason(原因):NullPointerException: "}}}. errCode: 10905 ,desc: URL /api/rest_j/v1/entrance/submit request failed! ResponseBody is {"method":null,"status":1,"message":"operation failed(操作失败)s!the reason(原因):NullPointerException: ","data":{"errorMsg":{"serviceKind":"linkis-cg-entrance","level":2,"port":9104,"errCode":0,"ip":"tv3-hadoop-06","desc":"operation failed(操作失败)s!the reason(原因):NullPointerException: "}}}. ,ip: null ,port: 0 ,serviceKind: null ,ip: null ,port: 0 ,serviceKind: null
############Execute Error!!!########

Expected behavior

we need consider whether enginer type is null

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 (incubating) 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