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

[fix][python] Correct variable type of SQL type #10464

Merged
merged 8 commits into from
Jun 16, 2022

Conversation

hiSandog
Copy link
Contributor

@hiSandog hiSandog commented Jun 15, 2022

When SQL type tasks are uploaded through Python-Gate, the web page displays an error.

image

If I create sql type task from web page, the type of sql-type is string.
But when I upload SQL type tasks via Python-Gate, the type of sql-type is int.
So these two sides should be unified.

fix: #10463

@hiSandog hiSandog changed the title [Bug-10463] [Python] When SQL type tasks are uploaded through Python Gate, the web page displays an error. [Fix-10463] [Python] When SQL type tasks are uploaded through Python Gate, the web page displays an error. Jun 15, 2022
@SbloodyS
Copy link
Member

Hi @hiSandog ,please associate issue.

@SbloodyS SbloodyS added bug Something isn't working backend Python labels Jun 15, 2022
@SbloodyS SbloodyS added this to the 3.0.0-beta-3 milestone Jun 15, 2022
@zhongjiajie
Copy link
Member

When SQL type tasks are uploaded through Python-Gate, the web page displays an error.

image

If I create sql type task from web page, the type of sql-type is string. But when I upload SQL type tasks via Python-Gate, the type of sql-type is int. So these two sides should be unified.

#10463

Hi @hiSandog, when you target to a specific issue, you should use the keyword fix or close before it, such as fix: #10463 in this case, and the issue will be closed when the PR merged

@zhongjiajie
Copy link
Member

FYI @SbloodyS I change the milestone from 300b3 to 300b2 due to this is a bugfix and we still not close the 300b2 bug fix process

@zhongjiajie
Copy link
Member

I wonder why this will not fail our tests, and go to see our SQL task tests. finally I find we just using the variable instead of constants. 🤣 @hiSandog please change

this line from SqlType.SELECT to "1", using the contants variable in uinttest is a bad choose

@zhongjiajie
Copy link
Member

and you can change the function test_property_task_params too if you want. The test_get_sql_type can or can not change because if only test the sql type itself instead of the final param pass to python gateway server

zhongjiajie
zhongjiajie previously approved these changes Jun 15, 2022
Copy link
Member

@zhongjiajie zhongjiajie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, waiting for CI

@zhongjiajie zhongjiajie changed the title [Fix-10463] [Python] When SQL type tasks are uploaded through Python Gate, the web page displays an error. [fix][python] Correct variable type of SQL type Jun 15, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #10464 (9576956) into dev (eecc49e) will decrease coverage by 0.00%.
The diff coverage is 60.00%.

@@             Coverage Diff              @@
##                dev   #10464      +/-   ##
============================================
- Coverage     40.90%   40.89%   -0.01%     
- Complexity     4850     4851       +1     
============================================
  Files           883      883              
  Lines         35970    35972       +2     
  Branches       3991     3991              
============================================
- Hits          14712    14711       -1     
- Misses        19802    19806       +4     
+ Partials       1456     1455       -1     
Impacted Files Coverage Δ
...inscheduler/api/service/impl/UsersServiceImpl.java 72.50% <0.00%> (ø)
.../org/apache/dolphinscheduler/common/Constants.java 80.95% <ø> (ø)
.../org/apache/dolphinscheduler/api/enums/Status.java 100.00% <100.00%> (ø)
.../apache/dolphinscheduler/api/utils/CheckUtils.java 75.86% <100.00%> (+0.86%) ⬆️
...e/dolphinscheduler/remote/NettyRemotingClient.java 50.00% <0.00%> (-2.78%) ⬇️
...r/plugin/task/sqoop/parameter/SqoopParameters.java 53.33% <0.00%> (ø)
...er/master/dispatch/host/assign/RandomSelector.java 83.33% <0.00%> (+5.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d16e0dd...9576956. Read the comment docs.

@sonarcloud
Copy link

sonarcloud bot commented Jun 15, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@zhongjiajie zhongjiajie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks to bring this up

@zhongjiajie zhongjiajie merged commit f512e3c into apache:dev Jun 16, 2022
devosend pushed a commit that referenced this pull request Jun 18, 2022
hstdream pushed a commit to hstdream/dolphinscheduler that referenced this pull request Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] [Python] When SQL type tasks are uploaded through Python Gate, the web page displays an error.
4 participants