dinky icon indicating copy to clipboard operation
dinky copied to clipboard

[Bug] [Admin][Jar Task]When the jar task statement contains "--" comments, the response from the `flinkJarSqlConvertForm` interface is abnormal.

Open jiangwwwei opened this issue 10 months ago • 4 comments

Search before asking

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

What happened

When I add a comment statement starting with "--" to the statement in the JAR task and save it, the comment statement, and even the entire page, cannot be displayed correctly when I reopen the task page. (However, the statement in the JSON response from the interface is complete and correct.)

For detailed information, please refer to the "How to reproduce" section below.

What you expected to happen

The editing page of the JAR task should display and handle comment statements starting with "--" correctly.

How to reproduce

Create a JAR task and fill in the execute JAR information normally. Case 1: 1.1 Add a single comment line in the task statement and save it. 1.2 Close the task tab and reopen it. 1.3 The interface returns the complete statement, but the comment in the editing window disappears.

Image

Case 2: 2.1 Add multiple comment lines at the end of the task statement and save it. 2.2 Close the task tab and reopen it. 2.3 The interface returns the complete statement, but the editing window is cleared.

Image

Case 3: 3.1 Add multiple comment lines and add a normal SET statement at the end of the task statement, then save it. 3.2 Close the task tab and reopen it. 3.3 The interface returns the complete statement, but the first line of the comment in the editing window disappears.

Image

Anything else

No response

Version

1.2.1

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

jiangwwwei avatar Feb 06 '25 07:02 jiangwwwei

Hello @jiangwwwei, this issue is about web, so I assign it to @Zzm0809. If you have any questions, you can comment and reply.

你好 @jiangwwwei, 这个 issue 是关于 web 的,所以我把它分配给了 @Zzm0809。如有任何问题,可以评论回复。

github-actions[bot] avatar Feb 06 '25 07:02 github-actions[bot]

It appears to be an issue caused by the incorrect response returned from the /api/task/flinkJarSqlConvertForm endpoint.

Image

jiangwwwei avatar Feb 07 '25 09:02 jiangwwwei

It appears that there is an issue with the splitting in SqlUtil.getStatements().

Image

jiangwwwei avatar Feb 07 '25 10:02 jiangwwwei

Hello @, this issue has not been active for more than 30 days. This issue will be closed in 7 days if there is no response. If you have any questions, you can comment and reply.

你好 @, 这个 issue 30 天内没有活跃,7 天后将关闭,如需回复,可以评论回复。

github-actions[bot] avatar Apr 01 '25 00:04 github-actions[bot]