-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[Feature- 9837][plugin/ui] support FlinkSQL Task #9840
Conversation
Hi @Dannila , can you please add this to the docs? Thanks. |
Codecov Report
@@ Coverage Diff @@
## dev #9840 +/- ##
============================================
+ Coverage 40.31% 40.67% +0.36%
- Complexity 4532 4576 +44
============================================
Files 835 834 -1
Lines 33750 33829 +79
Branches 3727 3745 +18
============================================
+ Hits 13606 13761 +155
+ Misses 18857 18749 -108
- Partials 1287 1319 +32
Continue to review full report at Codecov.
|
...r-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkConstants.java
Show resolved
Hide resolved
ok, another pr will be mentioned later to add documents |
@@ -14,15 +14,27 @@ | |||
* See the License for the specific language governing permissions and | |||
* limitations under the License. | |||
*/ | |||
import { computed, ref } from 'vue' | |||
import { computed, ref , watchEffect} from 'vue' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prettier format code should be used here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WatchEffect is added here to monitor the value of programType and let flinkVersion change dynamically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a better way to modify it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a better way to modify it
this is a matter of code style. import { computed, ref, watchEffect} from 'vue'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can install prettier plugin for editor or run pnpm run prettier
model.programType === 'SQL' ? 24 : 0 | ||
) | ||
|
||
const flinkVersionOptions = computed(() => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
above
validator(validate: any, value: string) { | ||
if (model.programType !== 'PYTHON' && !value) { | ||
if (model.programType !== 'PYTHON' && !value && model.programType !== 'SQL') { | ||
return new Error(t('project.node.main_class_tips')) | ||
} | ||
} | ||
} | ||
}, | ||
useMainJar(model), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should judge programType in useMainJar
. It should not request queryResourceByProgramType
when programType is SQL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the user clicks the programType as sql on the front end, the mainClass will be removed, and the edit box will be displayed for the user to fill in the sql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the user clicks the programType as sql on the front end, the mainClass will be removed, and the edit box will be displayed for the user to fill in the sql
But it still call queryResourceByProgramType
func and send a request to the backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dannila modify use-main-jar.ts watch function
Please also add documents in this PR. Thanks. |
Quindi aggiungerò il documento ora |
good job, supporting Flink sql is big feature, By the way, the doc is very important, the PR with relevant doc will keep the code and documentation as consistent as possible |
Well done, I had approved to run CI. |
BTW, please check the https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=9840&resolved=false&types=SECURITY_HOTSPOT |
@zhuangchong Excuse me, do you think this PR needs to be further optimized? |
@Dannila Please resolve conflicts. |
OK, I'll fix it in the next commit. |
Please |
Yes, in the latest commit, I have |
It may be an operation problem. We removed the old |
Excuse me, is this operation successful in the latest commit? |
yes, will review later. |
Gratitude! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The backend part LGTM. PTAL @zhongjiajie
To ensure the quality and style of the front-end code, you should run |
could we add it to CI? when could not formatted will fail our CI @devosend ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other LGTM
we should have frontend get at least one approval from our frontend developer |
Sorry, I don't know much about front-end, I don't know much about this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The front end part LGTM
Greatful |
Kudos, SonarCloud Quality Gate passed! |
Thanks for your contribution. This is a good beginning. Considering that it's your first contribution, I think we can get deep communication, you can contact me through mail or add WeChat(SbloodyS), when mail or added, please tell me who you are. I think I can help to familiar with the Dolphinscheduler if you meet with problems. |
Purpose of the pull request
We want FlinkTask to have an editor to fill out flink sql.
Users can implement flink sql tasks or flink sql cdc tasks through the sql editor, which is convenient for users to perform data processing and ETL.
This change added tests and can be verified as follows:
Brief change log
ProgramType.class add sql type
FlinkTask.class and FlinkTask.class add main logical for support Spark sql command
FlinkConstants.class 和 FlinkParameters.class Common parameters for connecting Flink sql commands and methods for obtaining parameters
use-flink.ts adds some logic to support front-end pages supporting spark sql editing SQL
close #9837
Verify this pull request
This change added tests and can be verified as follows:
org.apache.dolphinscheduler.plugin.task.flink.FlinkTaskTest
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows: