Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
9312abd4
Unverified
Commit
9312abd4
authored
Jan 14, 2023
by
aiwenmo
Committed by
GitHub
Jan 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Optimization-1554][pom] Remove check style and add test (#1555)
Co-authored-by:
wenmo
<
32723967+wenmo@users.noreply.github.com
>
parent
62cfbd30
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
110 additions
and
125 deletions
+110
-125
PULL_REQUEST_TEMPLATE.md
.github/PULL_REQUEST_TEMPLATE.md
+2
-2
backend.yaml
.github/workflows/backend.yaml
+1
-2
docker_build.yaml
.github/workflows/docker_build.yaml
+1
-2
AdminTest.java
dinky-admin/src/test/java/org/dinky/admin/AdminTest.java
+2
-0
SecurityAspectTest.java
.../src/test/java/org/dinky/security/SecurityAspectTest.java
+8
-4
DirUtilTest.java
dinky-admin/src/test/java/org/dinky/utils/DirUtilTest.java
+4
-0
DingTalkTest.java
.../src/test/java/org/dinky/alert/dingtalk/DingTalkTest.java
+3
-0
EmailSenderTest.java
.../src/test/java/org/dinky/alert/email/EmailSenderTest.java
+6
-0
FeiShuSenderTest.java
...rc/test/java/org/dinky/alert/feishu/FeiShuSenderTest.java
+3
-0
WeChatSenderTest.java
...rc/test/java/org/dinky/alert/wechat/WeChatSenderTest.java
+5
-0
pom.xml
dinky-app/dinky-app-base/pom.xml
+1
-1
pom.xml
dinky-app/pom.xml
+1
-1
pom.xml
dinky-catalog/dinky-catalog-mysql/pom.xml
+1
-1
pom.xml
dinky-client/dinky-client-base/pom.xml
+1
-1
pom.xml
dinky-client/pom.xml
+1
-1
pom.xml
dinky-core/pom.xml
+1
-1
pom.xml
dinky-executor/pom.xml
+1
-1
SqlManagerTest.java
...utor/src/test/java/org/dinky/executor/SqlManagerTest.java
+0
-31
CdcSourceTests.java
...r/src/test/java/org/dinky/interceptor/CdcSourceTests.java
+2
-0
FlinkInterceptorTest.java
...test/java/org/dinky/interceptor/FlinkInterceptorTest.java
+2
-2
pom.xml
dinky-flink/pom.xml
+1
-1
pom.xml
dinky-function/pom.xml
+1
-1
pom.xml
dinky-gateway/pom.xml
+1
-1
ClickHouseTest.java
...ouse/src/test/java/org/dinky/metadata/ClickHouseTest.java
+5
-0
DorisTest.java
...ata-doris/src/test/java/org/dinky/metadata/DorisTest.java
+5
-0
HiveTest.java
...adata-hive/src/test/java/org/dinky/metadata/HiveTest.java
+8
-0
MysqlTest.java
...ata-mysql/src/test/java/org/dinky/metadata/MysqlTest.java
+5
-0
OracleTest.java
...a-oracle/src/test/java/org/dinky/metadata/OracleTest.java
+5
-0
PhoenixTest.java
...phoenix/src/test/java/org/dinky/metadata/PhoenixTest.java
+5
-0
PrestoTest.java
...y-metadata-presto/src/test/java/org/dinky/PrestoTest.java
+5
-0
SqlServerTest.java
...erver/src/test/java/org/dinky/metadata/SqlServerTest.java
+5
-0
pom.xml
dlink-web/pom.xml
+2
-0
pull_request.md
docs/docs/developer_guide/contribution/pull_request.md
+15
-27
pom.xml
pom.xml
+1
-45
No files found.
.github/PULL_REQUEST_TEMPLATE.md
View file @
9312abd4
## Purpose of the pull request
## Purpose of the pull request
<!--(For example: This pull request adds
checkstyle
plugin).-->
<!--(For example: This pull request adds
spotless
plugin).-->
## Brief change log
## Brief change log
<!--
*(for example:)*
<!--
*(for example:)*
-
*Add
maven-checkstyle
-plugin to root pom.xml*
-
*Add
spotless-maven
-plugin to root pom.xml*
-->
-->
## Verify this pull request
## Verify this pull request
...
...
.github/workflows/backend.yaml
View file @
9312abd4
...
@@ -41,7 +41,7 @@ jobs:
...
@@ -41,7 +41,7 @@ jobs:
fetch-depth
:
0
fetch-depth
:
0
-
name
:
Check Style
-
name
:
Check Style
run
:
|
run
:
|
./mvnw -T 4C -B --no-snapshot-updates clean spotless:check -P all
./mvnw -T 4C -B --no-snapshot-updates clean spotless:check -P
flink-
all
build_npm
:
build_npm
:
name
:
Build_NPM
name
:
Build_NPM
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
...
@@ -126,7 +126,6 @@ jobs:
...
@@ -126,7 +126,6 @@ jobs:
run
:
|
run
:
|
./mvnw -B clean install \
./mvnw -B clean install \
-Dmaven.test.skip=true \
-Dmaven.test.skip=true \
-Dcheckstyle.skip=true \
-Dspotless.check.skip=true \
-Dspotless.check.skip=true \
-P prod,scala-2.12,flink-${{ matrix.flink }},maven-central \
-P prod,scala-2.12,flink-${{ matrix.flink }},maven-central \
--no-snapshot-updates
--no-snapshot-updates
...
...
.github/workflows/docker_build.yaml
View file @
9312abd4
...
@@ -53,9 +53,8 @@ jobs:
...
@@ -53,9 +53,8 @@ jobs:
run
:
|
run
:
|
./mvnw -B clean install \
./mvnw -B clean install \
-Dmaven.test.skip=true \
-Dmaven.test.skip=true \
-Dcheckstyle.skip=true \
-Dspotless.check.skip=true \
-Dspotless.check.skip=true \
-P prod,scala-2.12,all,web,maven-central,fast \
-P prod,scala-2.12,
flink-
all,web,maven-central,fast \
--no-snapshot-updates
--no-snapshot-updates
-
name
:
Upload release file
-
name
:
Upload release file
uses
:
actions/upload-artifact@v3
uses
:
actions/upload-artifact@v3
...
...
dinky-admin/src/test/java/org/dinky/admin/AdminTest.java
View file @
9312abd4
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
package
org
.
dinky
.
admin
;
package
org
.
dinky
.
admin
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
import
cn.dev33.satoken.secure.SaSecureUtil
;
import
cn.dev33.satoken.secure.SaSecureUtil
;
...
@@ -34,5 +35,6 @@ public class AdminTest {
...
@@ -34,5 +35,6 @@ public class AdminTest {
@Test
@Test
public
void
adminTest
()
{
public
void
adminTest
()
{
String
admin
=
SaSecureUtil
.
md5
(
"admin"
);
String
admin
=
SaSecureUtil
.
md5
(
"admin"
);
Assert
.
assertEquals
(
"21232f297a57a5a743894a0e4a801fc3"
,
admin
);
}
}
}
}
dinky-admin/src/test/java/org/dinky/
admin/Security
Test.java
→
dinky-admin/src/test/java/org/dinky/
security/SecurityAspect
Test.java
View file @
9312abd4
...
@@ -17,14 +17,18 @@
...
@@ -17,14 +17,18 @@
*
*
*/
*/
package
org
.
dinky
.
admin
;
package
org
.
dinky
.
security
;
import
org.dinky.security.SecurityAspect
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
public
class
SecurityTest
{
/**
* SecurityAspectTest
*
* @author wenmo
* @since 2023/1/14 15:59
*/
public
class
SecurityAspectTest
{
@Test
@Test
public
void
testMask
()
{
public
void
testMask
()
{
...
...
dinky-admin/src/test/java/org/dinky/utils/DirUtilTest.java
View file @
9312abd4
...
@@ -25,6 +25,7 @@ import org.dinky.model.FileNode;
...
@@ -25,6 +25,7 @@ import org.dinky.model.FileNode;
import
java.util.List
;
import
java.util.List
;
import
org.assertj.core.api.Assertions
;
import
org.assertj.core.api.Assertions
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
...
@@ -35,18 +36,21 @@ import org.junit.Test;
...
@@ -35,18 +36,21 @@ import org.junit.Test;
*/
*/
public
class
DirUtilTest
{
public
class
DirUtilTest
{
@Ignore
@Test
@Test
public
void
testListDirByPath
()
{
public
void
testListDirByPath
()
{
List
<
FileNode
>
dirList
=
DirUtil
.
listDirByPath
(
DirConstant
.
LOG_DIR_PATH
);
List
<
FileNode
>
dirList
=
DirUtil
.
listDirByPath
(
DirConstant
.
LOG_DIR_PATH
);
Assertions
.
assertThat
(
dirList
).
isNotNull
();
Assertions
.
assertThat
(
dirList
).
isNotNull
();
}
}
@Ignore
@Test
@Test
public
void
testReadFile
()
{
public
void
testReadFile
()
{
String
result
=
DirUtil
.
readFile
(
DirConstant
.
LOG_DIR_PATH
+
"/dinky.log"
);
String
result
=
DirUtil
.
readFile
(
DirConstant
.
LOG_DIR_PATH
+
"/dinky.log"
);
Assertions
.
assertThat
(
result
).
isNotNull
();
Assertions
.
assertThat
(
result
).
isNotNull
();
}
}
@Ignore
@Test
@Test
public
void
testReadRootLog
()
{
public
void
testReadRootLog
()
{
String
result
=
DirUtil
.
readFile
(
DirConstant
.
ROOT_LOG_PATH
);
String
result
=
DirUtil
.
readFile
(
DirConstant
.
ROOT_LOG_PATH
);
...
...
dinky-alert/dinky-alert-dingtalk/src/test/java/org/dinky/alert/dingtalk/DingTalkTest.java
View file @
9312abd4
...
@@ -31,6 +31,7 @@ import java.util.UUID;
...
@@ -31,6 +31,7 @@ import java.util.UUID;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
...
@@ -73,6 +74,7 @@ public class DingTalkTest {
...
@@ -73,6 +74,7 @@ public class DingTalkTest {
config
.
put
(
DingTalkConstants
.
USER
,
"user1,user2"
);
config
.
put
(
DingTalkConstants
.
USER
,
"user1,user2"
);
}
}
@Ignore
@Test
@Test
public
void
sendMarkDownMsgTest
()
{
public
void
sendMarkDownMsgTest
()
{
AlertConfig
config
=
AlertConfig
.
build
(
"MarkDownTest"
,
"DingTalk"
,
DingTalkTest
.
config
);
AlertConfig
config
=
AlertConfig
.
build
(
"MarkDownTest"
,
"DingTalk"
,
DingTalkTest
.
config
);
...
@@ -81,6 +83,7 @@ public class DingTalkTest {
...
@@ -81,6 +83,7 @@ public class DingTalkTest {
Assert
.
assertEquals
(
true
,
result
.
getSuccess
());
Assert
.
assertEquals
(
true
,
result
.
getSuccess
());
}
}
@Ignore
@Test
@Test
public
void
sendTextMsgTest
()
{
public
void
sendTextMsgTest
()
{
config
.
put
(
DingTalkConstants
.
MSG_TYPE
,
ShowType
.
TEXT
.
getValue
());
config
.
put
(
DingTalkConstants
.
MSG_TYPE
,
ShowType
.
TEXT
.
getValue
());
...
...
dinky-alert/dinky-alert-email/src/test/java/org/dinky/alert/email/EmailSenderTest.java
View file @
9312abd4
...
@@ -36,6 +36,7 @@ import java.util.UUID;
...
@@ -36,6 +36,7 @@ import java.util.UUID;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -87,12 +88,14 @@ public class EmailSenderTest {
...
@@ -87,12 +88,14 @@ public class EmailSenderTest {
mailSender
=
new
MailSender
(
emailConfig
);
mailSender
=
new
MailSender
(
emailConfig
);
}
}
@Ignore
@Test
@Test
public
void
testTextSendMails
()
{
public
void
testTextSendMails
()
{
AlertResult
alertResult
=
mailSender
.
send
(
title
,
alertMsg
.
toString
());
AlertResult
alertResult
=
mailSender
.
send
(
title
,
alertMsg
.
toString
());
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
// 格式需要调整
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
// 格式需要调整
}
}
@Ignore
@Test
@Test
public
void
testSendTableMail
()
{
public
void
testSendTableMail
()
{
emailConfig
.
put
(
EmailConstants
.
NAME_SHOW_TYPE
,
ShowType
.
TABLE
.
getValue
());
emailConfig
.
put
(
EmailConstants
.
NAME_SHOW_TYPE
,
ShowType
.
TABLE
.
getValue
());
...
@@ -101,6 +104,7 @@ public class EmailSenderTest {
...
@@ -101,6 +104,7 @@ public class EmailSenderTest {
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
}
}
@Ignore
@Test
@Test
public
void
testAttachmentFile
()
{
public
void
testAttachmentFile
()
{
emailConfig
.
put
(
EmailConstants
.
NAME_SHOW_TYPE
,
ShowType
.
ATTACHMENT
.
getValue
());
emailConfig
.
put
(
EmailConstants
.
NAME_SHOW_TYPE
,
ShowType
.
ATTACHMENT
.
getValue
());
...
@@ -109,6 +113,7 @@ public class EmailSenderTest {
...
@@ -109,6 +113,7 @@ public class EmailSenderTest {
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
}
}
@Ignore
@Test
@Test
public
void
testTableAttachmentFile
()
{
public
void
testTableAttachmentFile
()
{
emailConfig
.
put
(
EmailConstants
.
NAME_SHOW_TYPE
,
ShowType
.
TABLE_ATTACHMENT
.
getValue
());
emailConfig
.
put
(
EmailConstants
.
NAME_SHOW_TYPE
,
ShowType
.
TABLE_ATTACHMENT
.
getValue
());
...
@@ -117,6 +122,7 @@ public class EmailSenderTest {
...
@@ -117,6 +122,7 @@ public class EmailSenderTest {
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
}
}
@Ignore
@Test
@Test
public
void
testGenTextEmail
()
{
public
void
testGenTextEmail
()
{
List
<
LinkedHashMap
>
linkedHashMaps
=
List
<
LinkedHashMap
>
linkedHashMaps
=
...
...
dinky-alert/dinky-alert-feishu/src/test/java/org/dinky/alert/feishu/FeiShuSenderTest.java
View file @
9312abd4
...
@@ -28,6 +28,7 @@ import java.util.UUID;
...
@@ -28,6 +28,7 @@ import java.util.UUID;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
...
@@ -67,6 +68,7 @@ public class FeiShuSenderTest {
...
@@ -67,6 +68,7 @@ public class FeiShuSenderTest {
feiShuConfig
.
put
(
FeiShuConstants
.
AT_USERS
,
"zhumingye"
);
feiShuConfig
.
put
(
FeiShuConstants
.
AT_USERS
,
"zhumingye"
);
}
}
@Ignore
@Test
@Test
public
void
testTextTypeSend
()
{
public
void
testTextTypeSend
()
{
FeiShuSender
feiShuSender
=
new
FeiShuSender
(
feiShuConfig
);
FeiShuSender
feiShuSender
=
new
FeiShuSender
(
feiShuConfig
);
...
@@ -74,6 +76,7 @@ public class FeiShuSenderTest {
...
@@ -74,6 +76,7 @@ public class FeiShuSenderTest {
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
}
}
@Ignore
@Test
@Test
public
void
testPostTypeSend
()
{
public
void
testPostTypeSend
()
{
feiShuConfig
.
put
(
FeiShuConstants
.
MSG_TYPE
,
"post"
);
feiShuConfig
.
put
(
FeiShuConstants
.
MSG_TYPE
,
"post"
);
...
...
dinky-alert/dinky-alert-wechat/src/test/java/org/dinky/alert/wechat/WeChatSenderTest.java
View file @
9312abd4
...
@@ -28,6 +28,7 @@ import java.util.Map;
...
@@ -28,6 +28,7 @@ import java.util.Map;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
/** WeChatSenderTest */
/** WeChatSenderTest */
...
@@ -66,6 +67,7 @@ public class WeChatSenderTest {
...
@@ -66,6 +67,7 @@ public class WeChatSenderTest {
weChatConfig
.
put
(
WeChatConstants
.
SEND_TYPE
,
WeChatType
.
APP
.
getValue
());
weChatConfig
.
put
(
WeChatConstants
.
SEND_TYPE
,
WeChatType
.
APP
.
getValue
());
}
}
@Ignore
@Test
@Test
public
void
testSendAPPMarkDownMsg
()
{
public
void
testSendAPPMarkDownMsg
()
{
WeChatSender
weChatSender
=
new
WeChatSender
(
weChatConfig
);
WeChatSender
weChatSender
=
new
WeChatSender
(
weChatConfig
);
...
@@ -73,6 +75,7 @@ public class WeChatSenderTest {
...
@@ -73,6 +75,7 @@ public class WeChatSenderTest {
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
}
}
@Ignore
@Test
@Test
public
void
testSendAPPTextMsg
()
{
public
void
testSendAPPTextMsg
()
{
weChatConfig
.
put
(
WeChatConstants
.
SHOW_TYPE
,
ShowType
.
TEXT
.
getValue
());
weChatConfig
.
put
(
WeChatConstants
.
SHOW_TYPE
,
ShowType
.
TEXT
.
getValue
());
...
@@ -81,6 +84,7 @@ public class WeChatSenderTest {
...
@@ -81,6 +84,7 @@ public class WeChatSenderTest {
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
}
}
@Ignore
@Test
@Test
public
void
testChatMarkDownMsg
()
throws
IOException
{
public
void
testChatMarkDownMsg
()
throws
IOException
{
weChatConfig
.
put
(
weChatConfig
.
put
(
...
@@ -95,6 +99,7 @@ public class WeChatSenderTest {
...
@@ -95,6 +99,7 @@ public class WeChatSenderTest {
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
Assert
.
assertEquals
(
true
,
alertResult
.
getSuccess
());
}
}
@Ignore
@Test
@Test
public
void
testChatTextMsg
()
throws
IOException
{
public
void
testChatTextMsg
()
throws
IOException
{
weChatConfig
.
put
(
weChatConfig
.
put
(
...
...
dinky-app/dinky-app-base/pom.xml
View file @
9312abd4
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.dinky
</groupId>
<groupId>
org.dinky
</groupId>
...
...
dinky-app/pom.xml
View file @
9312abd4
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<modules>
<modules>
<module>
dinky-app-1.12
</module>
<module>
dinky-app-1.12
</module>
<module>
dinky-app-1.13
</module>
<module>
dinky-app-1.13
</module>
...
...
dinky-catalog/dinky-catalog-mysql/pom.xml
View file @
9312abd4
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<modules>
<modules>
<module>
dinky-catalog-mysql-1.13
</module>
<module>
dinky-catalog-mysql-1.13
</module>
<module>
dinky-catalog-mysql-1.14
</module>
<module>
dinky-catalog-mysql-1.14
</module>
...
...
dinky-client/dinky-client-base/pom.xml
View file @
9312abd4
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.dinky
</groupId>
<groupId>
org.dinky
</groupId>
...
...
dinky-client/pom.xml
View file @
9312abd4
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<modules>
<modules>
<module>
dinky-client-1.12
</module>
<module>
dinky-client-1.12
</module>
<module>
dinky-client-1.13
</module>
<module>
dinky-client-1.13
</module>
...
...
dinky-core/pom.xml
View file @
9312abd4
...
@@ -327,7 +327,7 @@
...
@@ -327,7 +327,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.dinky
</groupId>
<groupId>
org.dinky
</groupId>
...
...
dinky-executor/pom.xml
View file @
9312abd4
...
@@ -232,7 +232,7 @@
...
@@ -232,7 +232,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.dinky
</groupId>
<groupId>
org.dinky
</groupId>
...
...
dinky-executor/src/test/java/org/dinky/executor/SqlManagerTest.java
deleted
100644 → 0
View file @
62cfbd30
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org
.
dinky
.
executor
;
import
org.junit.jupiter.api.Test
;
/** */
class
SqlManagerTest
{
@Test
void
getSqlFragment
()
{
SqlManager
sqlManager
=
new
SqlManager
();
}
}
dinky-executor/src/test/java/org/dinky/interceptor/CdcSourceTests.java
View file @
9312abd4
...
@@ -23,6 +23,7 @@ import org.dinky.executor.Executor;
...
@@ -23,6 +23,7 @@ import org.dinky.executor.Executor;
import
org.dinky.executor.ExecutorSetting
;
import
org.dinky.executor.ExecutorSetting
;
import
org.dinky.executor.LocalStreamExecutor
;
import
org.dinky.executor.LocalStreamExecutor
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
...
@@ -31,6 +32,7 @@ import org.junit.Test;
...
@@ -31,6 +32,7 @@ import org.junit.Test;
*/
*/
public
class
CdcSourceTests
{
public
class
CdcSourceTests
{
@Ignore
@Test
@Test
public
void
printTest
()
throws
Exception
{
public
void
printTest
()
throws
Exception
{
String
statement
=
String
statement
=
...
...
dinky-executor/src/test/java/org/dinky/interceptor/FlinkInterceptorTest.java
View file @
9312abd4
...
@@ -35,8 +35,8 @@ public class FlinkInterceptorTest {
...
@@ -35,8 +35,8 @@ public class FlinkInterceptorTest {
@Test
@Test
public
void
replaceFragmentTest
()
{
public
void
replaceFragmentTest
()
{
String
statement
=
String
statement
=
"nullif1:=NULLIF(1, 0) as val;"
"nullif1:=NULLIF(1, 0) as val;
\n
"
+
"nullif2:=NULLIF(0, 0) as val$null;"
+
"nullif2:=NULLIF(0, 0) as val$null;
\n
"
+
"select ${nullif1},${nullif2}"
;
+
"select ${nullif1},${nullif2}"
;
String
pretreatStatement
=
FlinkInterceptor
.
pretreatStatement
(
Executor
.
build
(),
statement
);
String
pretreatStatement
=
FlinkInterceptor
.
pretreatStatement
(
Executor
.
build
(),
statement
);
Assert
.
assertEquals
(
Assert
.
assertEquals
(
...
...
dinky-flink/pom.xml
View file @
9312abd4
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<modules>
<modules>
<module>
dinky-flink-1.12
</module>
<module>
dinky-flink-1.12
</module>
<module>
dinky-flink-1.13
</module>
<module>
dinky-flink-1.13
</module>
...
...
dinky-function/pom.xml
View file @
9312abd4
...
@@ -204,7 +204,7 @@
...
@@ -204,7 +204,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.dinky
</groupId>
<groupId>
org.dinky
</groupId>
...
...
dinky-gateway/pom.xml
View file @
9312abd4
...
@@ -209,7 +209,7 @@ for k8s commit tasks-->
...
@@ -209,7 +209,7 @@ for k8s commit tasks-->
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.dinky
</groupId>
<groupId>
org.dinky
</groupId>
...
...
dinky-metadata/dinky-metadata-clickhouse/src/test/java/org/dinky/metadata/ClickHouseTest.java
View file @
9312abd4
...
@@ -28,6 +28,7 @@ import org.dinky.model.Schema;
...
@@ -28,6 +28,7 @@ import org.dinky.model.Schema;
import
java.util.List
;
import
java.util.List
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
...
@@ -52,6 +53,7 @@ public class ClickHouseTest {
...
@@ -52,6 +53,7 @@ public class ClickHouseTest {
return
Driver
.
build
(
config
);
return
Driver
.
build
(
config
);
}
}
@Ignore
@Test
@Test
public
void
connectTest
()
{
public
void
connectTest
()
{
String
test
=
getDriver
().
test
();
String
test
=
getDriver
().
test
();
...
@@ -59,6 +61,7 @@ public class ClickHouseTest {
...
@@ -59,6 +61,7 @@ public class ClickHouseTest {
// System.out.println("end...");
// System.out.println("end...");
}
}
@Ignore
@Test
@Test
public
void
schemaTest
()
{
public
void
schemaTest
()
{
List
<
Schema
>
schemasAndTables
=
getDriver
().
getSchemasAndTables
();
List
<
Schema
>
schemasAndTables
=
getDriver
().
getSchemasAndTables
();
...
@@ -66,6 +69,7 @@ public class ClickHouseTest {
...
@@ -66,6 +69,7 @@ public class ClickHouseTest {
// System.out.println("end...");
// System.out.println("end...");
}
}
@Ignore
@Test
@Test
public
void
columnTest
()
{
public
void
columnTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -74,6 +78,7 @@ public class ClickHouseTest {
...
@@ -74,6 +78,7 @@ public class ClickHouseTest {
// System.out.println("end...");
// System.out.println("end...");
}
}
@Ignore
@Test
@Test
public
void
queryTest
()
{
public
void
queryTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
...
dinky-metadata/dinky-metadata-doris/src/test/java/org/dinky/metadata/DorisTest.java
View file @
9312abd4
...
@@ -32,6 +32,7 @@ import java.util.List;
...
@@ -32,6 +32,7 @@ import java.util.List;
import
java.util.UUID
;
import
java.util.UUID
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
public
class
DorisTest
{
public
class
DorisTest
{
...
@@ -56,6 +57,7 @@ public class DorisTest {
...
@@ -56,6 +57,7 @@ public class DorisTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
test
()
throws
SQLException
{
public
void
test
()
throws
SQLException
{
// test
// test
...
@@ -69,6 +71,7 @@ public class DorisTest {
...
@@ -69,6 +71,7 @@ public class DorisTest {
query
();
query
();
}
}
@Ignore
@Test
@Test
public
void
testSchema
()
{
public
void
testSchema
()
{
// schema && table
// schema && table
...
@@ -81,6 +84,7 @@ public class DorisTest {
...
@@ -81,6 +84,7 @@ public class DorisTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
testColumns
()
{
public
void
testColumns
()
{
// columns
// columns
...
@@ -90,6 +94,7 @@ public class DorisTest {
...
@@ -90,6 +94,7 @@ public class DorisTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
query
()
{
public
void
query
()
{
JdbcSelectResult
selectResult
=
driver
.
query
(
"select * from scoreinfo "
,
10
);
JdbcSelectResult
selectResult
=
driver
.
query
(
"select * from scoreinfo "
,
10
);
...
...
dinky-metadata/dinky-metadata-hive/src/test/java/org/dinky/metadata/HiveTest.java
View file @
9312abd4
...
@@ -31,6 +31,7 @@ import java.util.List;
...
@@ -31,6 +31,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
...
@@ -62,6 +63,7 @@ public class HiveTest {
...
@@ -62,6 +63,7 @@ public class HiveTest {
return
Driver
.
build
(
config
);
return
Driver
.
build
(
config
);
}
}
@Ignore
@Test
@Test
public
void
connectTest
()
{
public
void
connectTest
()
{
DriverConfig
config
=
new
DriverConfig
();
DriverConfig
config
=
new
DriverConfig
();
...
@@ -77,6 +79,7 @@ public class HiveTest {
...
@@ -77,6 +79,7 @@ public class HiveTest {
System
.
err
.
println
(
"end..."
);
System
.
err
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
getDBSTest
()
{
public
void
getDBSTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -88,6 +91,7 @@ public class HiveTest {
...
@@ -88,6 +91,7 @@ public class HiveTest {
System
.
err
.
println
(
"end..."
);
System
.
err
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
getTablesByDBTest
()
throws
Exception
{
public
void
getTablesByDBTest
()
throws
Exception
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -100,6 +104,7 @@ public class HiveTest {
...
@@ -100,6 +104,7 @@ public class HiveTest {
System
.
err
.
println
(
"end..."
);
System
.
err
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
getColumnsByTableTest
()
{
public
void
getColumnsByTableTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -112,6 +117,7 @@ public class HiveTest {
...
@@ -112,6 +117,7 @@ public class HiveTest {
System
.
err
.
println
(
"end..."
);
System
.
err
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
getCreateTableTest
()
throws
Exception
{
public
void
getCreateTableTest
()
throws
Exception
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -122,6 +128,7 @@ public class HiveTest {
...
@@ -122,6 +128,7 @@ public class HiveTest {
System
.
err
.
println
(
"end..."
);
System
.
err
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
getTableExtenedInfoTest
()
throws
Exception
{
public
void
getTableExtenedInfoTest
()
throws
Exception
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -138,6 +145,7 @@ public class HiveTest {
...
@@ -138,6 +145,7 @@ public class HiveTest {
* @date: 202/3/23 @Description: 测试hive多条SQL执行 @Param:
* @date: 202/3/23 @Description: 测试hive多条SQL执行 @Param:
* @return:
* @return:
*/
*/
@Ignore
@Test
@Test
public
void
multipleSQLTest
()
throws
Exception
{
public
void
multipleSQLTest
()
throws
Exception
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
...
dinky-metadata/dinky-metadata-mysql/src/test/java/org/dinky/metadata/MysqlTest.java
View file @
9312abd4
...
@@ -28,6 +28,7 @@ import org.dinky.model.Schema;
...
@@ -28,6 +28,7 @@ import org.dinky.model.Schema;
import
java.util.List
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.UUID
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
...
@@ -55,6 +56,7 @@ public class MysqlTest {
...
@@ -55,6 +56,7 @@ public class MysqlTest {
return
Driver
.
build
(
config
);
return
Driver
.
build
(
config
);
}
}
@Ignore
@Test
@Test
public
void
connectTest
()
{
public
void
connectTest
()
{
DriverConfig
config
=
new
DriverConfig
();
DriverConfig
config
=
new
DriverConfig
();
...
@@ -72,6 +74,7 @@ public class MysqlTest {
...
@@ -72,6 +74,7 @@ public class MysqlTest {
System
.
out
.
println
(
"end..."
);
System
.
out
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
schemaTest
()
{
public
void
schemaTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -79,6 +82,7 @@ public class MysqlTest {
...
@@ -79,6 +82,7 @@ public class MysqlTest {
System
.
out
.
println
(
"end..."
);
System
.
out
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
columnTest
()
{
public
void
columnTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -86,6 +90,7 @@ public class MysqlTest {
...
@@ -86,6 +90,7 @@ public class MysqlTest {
System
.
out
.
println
(
"end..."
);
System
.
out
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
queryTest
()
{
public
void
queryTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
...
dinky-metadata/dinky-metadata-oracle/src/test/java/org/dinky/metadata/OracleTest.java
View file @
9312abd4
...
@@ -28,6 +28,7 @@ import org.dinky.model.Schema;
...
@@ -28,6 +28,7 @@ import org.dinky.model.Schema;
import
java.util.List
;
import
java.util.List
;
import
java.util.UUID
;
import
java.util.UUID
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
/**
/**
...
@@ -52,6 +53,7 @@ public class OracleTest {
...
@@ -52,6 +53,7 @@ public class OracleTest {
return
Driver
.
build
(
config
);
return
Driver
.
build
(
config
);
}
}
@Ignore
@Test
@Test
public
void
connectTest
()
{
public
void
connectTest
()
{
DriverConfig
config
=
new
DriverConfig
();
DriverConfig
config
=
new
DriverConfig
();
...
@@ -66,6 +68,7 @@ public class OracleTest {
...
@@ -66,6 +68,7 @@ public class OracleTest {
System
.
out
.
println
(
"end..."
);
System
.
out
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
schemaTest
()
{
public
void
schemaTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -73,6 +76,7 @@ public class OracleTest {
...
@@ -73,6 +76,7 @@ public class OracleTest {
System
.
out
.
println
(
"end..."
);
System
.
out
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
columnTest
()
{
public
void
columnTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
@@ -80,6 +84,7 @@ public class OracleTest {
...
@@ -80,6 +84,7 @@ public class OracleTest {
System
.
out
.
println
(
"end..."
);
System
.
out
.
println
(
"end..."
);
}
}
@Ignore
@Test
@Test
public
void
queryTest
()
{
public
void
queryTest
()
{
Driver
driver
=
getDriver
();
Driver
driver
=
getDriver
();
...
...
dinky-metadata/dinky-metadata-phoenix/src/test/java/org/dinky/metadata/PhoenixTest.java
View file @
9312abd4
...
@@ -30,6 +30,7 @@ import java.util.LinkedHashMap;
...
@@ -30,6 +30,7 @@ import java.util.LinkedHashMap;
import
java.util.List
;
import
java.util.List
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
public
class
PhoenixTest
{
public
class
PhoenixTest
{
...
@@ -49,6 +50,7 @@ public class PhoenixTest {
...
@@ -49,6 +50,7 @@ public class PhoenixTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
testSchema
()
{
public
void
testSchema
()
{
// schema && table
// schema && table
...
@@ -61,6 +63,7 @@ public class PhoenixTest {
...
@@ -61,6 +63,7 @@ public class PhoenixTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
testListTables
()
{
public
void
testListTables
()
{
List
<
Table
>
tables
=
driver
.
listTables
(
""
);
List
<
Table
>
tables
=
driver
.
listTables
(
""
);
...
@@ -69,6 +72,7 @@ public class PhoenixTest {
...
@@ -69,6 +72,7 @@ public class PhoenixTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
testColumns
()
{
public
void
testColumns
()
{
// columns
// columns
...
@@ -79,6 +83,7 @@ public class PhoenixTest {
...
@@ -79,6 +83,7 @@ public class PhoenixTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
query
()
{
public
void
query
()
{
JdbcSelectResult
selectResult
=
driver
.
query
(
"select * from ODS_OUTP_PRESC "
,
10
);
JdbcSelectResult
selectResult
=
driver
.
query
(
"select * from ODS_OUTP_PRESC "
,
10
);
...
...
dinky-metadata/dinky-metadata-presto/src/test/java/org/dinky/PrestoTest.java
View file @
9312abd4
...
@@ -32,6 +32,7 @@ import java.util.List;
...
@@ -32,6 +32,7 @@ import java.util.List;
import
java.util.UUID
;
import
java.util.UUID
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
public
class
PrestoTest
{
public
class
PrestoTest
{
...
@@ -53,6 +54,7 @@ public class PrestoTest {
...
@@ -53,6 +54,7 @@ public class PrestoTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
test
()
throws
SQLException
{
public
void
test
()
throws
SQLException
{
// test
// test
...
@@ -66,6 +68,7 @@ public class PrestoTest {
...
@@ -66,6 +68,7 @@ public class PrestoTest {
query
();
query
();
}
}
@Ignore
@Test
@Test
public
void
testSchema
()
{
public
void
testSchema
()
{
// schema && table
// schema && table
...
@@ -78,6 +81,7 @@ public class PrestoTest {
...
@@ -78,6 +81,7 @@ public class PrestoTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
testColumns
()
{
public
void
testColumns
()
{
// columns
// columns
...
@@ -88,6 +92,7 @@ public class PrestoTest {
...
@@ -88,6 +92,7 @@ public class PrestoTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
query
()
{
public
void
query
()
{
JdbcSelectResult
selectResult
=
driver
.
query
(
"select * from hive.lake.test"
,
10
);
JdbcSelectResult
selectResult
=
driver
.
query
(
"select * from hive.lake.test"
,
10
);
...
...
dinky-metadata/dinky-metadata-sqlserver/src/test/java/org/dinky/metadata/SqlServerTest.java
View file @
9312abd4
...
@@ -32,6 +32,7 @@ import java.util.List;
...
@@ -32,6 +32,7 @@ import java.util.List;
import
java.util.UUID
;
import
java.util.UUID
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.junit.Test
;
public
class
SqlServerTest
{
public
class
SqlServerTest
{
...
@@ -55,6 +56,7 @@ public class SqlServerTest {
...
@@ -55,6 +56,7 @@ public class SqlServerTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
test
()
throws
SQLException
{
public
void
test
()
throws
SQLException
{
// test
// test
...
@@ -68,6 +70,7 @@ public class SqlServerTest {
...
@@ -68,6 +70,7 @@ public class SqlServerTest {
query
();
query
();
}
}
@Ignore
@Test
@Test
public
void
testSchema
()
{
public
void
testSchema
()
{
// schema && table
// schema && table
...
@@ -80,6 +83,7 @@ public class SqlServerTest {
...
@@ -80,6 +83,7 @@ public class SqlServerTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
testColumns
()
{
public
void
testColumns
()
{
// columns
// columns
...
@@ -90,6 +94,7 @@ public class SqlServerTest {
...
@@ -90,6 +94,7 @@ public class SqlServerTest {
}
}
}
}
@Ignore
@Test
@Test
public
void
query
()
{
public
void
query
()
{
JdbcSelectResult
selectResult
=
driver
.
query
(
"select * from t_user"
,
10
);
JdbcSelectResult
selectResult
=
driver
.
query
(
"select * from t_user"
,
10
);
...
...
dlink-web/pom.xml
View file @
9312abd4
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
<artifactId>
dlink-web
</artifactId>
<artifactId>
dlink-web
</artifactId>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<name>
Dinky : Dlink-Web
</name>
<build>
<build>
<finalName>
${project.artifactId}-${project.version}
</finalName>
<finalName>
${project.artifactId}-${project.version}
</finalName>
<plugins>
<plugins>
...
...
docs/docs/developer_guide/contribution/pull_request.md
View file @
9312abd4
...
@@ -11,17 +11,19 @@ Pull Request 本质上是一种软件的合作方式,是将涉及不同功能
...
@@ -11,17 +11,19 @@ Pull Request 本质上是一种软件的合作方式,是将涉及不同功能
标题格式:
[
`Pull Request 类型`-`Issue 号`
][
`模块名`
]
`Pull Request 描述`
标题格式:
[
`Pull Request 类型`-`Issue 号`
][
`模块名`
]
`Pull Request 描述`
例如:
`[Fix-3333][admin] Fix global variables are not valid`
其中
`Pull Request 类型`
和
`Issue 类型`
的对应关系如下:
其中
`Pull Request 类型`
和
`Issue 类型`
的对应关系如下:
| Issue 类型 |
描述 | 样例
|
| Issue 类型 |
Pull Request 类型 | 样例(假设 Issue 号为 3333)
|
| ------------- | ----------------------- |
----------------------------------------------------------
|
| ------------- | ----------------------- |
-----------------------------------------------------
|
|
Issue 类型 | Pull Request 类型 | 样例(假设 Issue 号为 3333)
|
|
Feature | Feature |
[
Feature-3333
][
admin
]
Implement xxx
|
|
Feature | Feature |
[
Feature-3333
][
admin
]
Implement xxx
|
|
Bug | Fix |
[
Fix-3333
][
web
]
Fix xxx
|
|
Bug | Fix |
[
Fix-3333
][
admin
]
Fix xxx
|
|
Optimization | Optimization |
[
Optimization-3333
][
alert
]
Optimize xxx
|
| Improve
ment | Improvement |
[
Improvement-3333
][
alert
]
Improve the performance of xxx
|
| Improve
| Improve |
[
Improve-3333
][
core
]
Improve xxx
|
| Test | Test |
[
Test-3333
][
metadata-mysql
]
Add the e2e test of xxx
|
| Test | Test |
[
Test-3333
][
metadata-mysql
]
Add the e2e test of xxx |
|
Sub-Task | Sub-Task 对应的父类型 |
[
Feature-3333
][
admin
]
Implement xxx
|
|
Document | Document |
[
Document-3333
][
cdc
]
Add the document of xxx
|
其中
`Issue 号`
是指当前 Pull Request 对应要解决的 Issue 号,
`模块名`
同 Issue 的模块名。
其中
`Issue 号`
是指当前 Pull Request 对应要解决的 Issue 号,
`模块名`
同 Issue 的模块名。
...
@@ -35,32 +37,18 @@ Pull Request 本质上是一种软件的合作方式,是将涉及不同功能
...
@@ -35,32 +37,18 @@ Pull Request 本质上是一种软件的合作方式,是将涉及不同功能
### Pull Request Code Style
### Pull Request Code Style
当你向 Dinky 提交 pull request 的时候 code-style 是你不得不考虑的问题。我们在 CI 中使用 Checkstyle
[
参考
](
https://checkstyle.sourceforge.io/
)
来保持代码风格的统一,它是一种帮助开发者编写遵循编码规范的 Java 代码开发工具。如果你的 pull request 没有通过 Checkstyle 的检测,那它将不会被合并到主库中。你可以在提交 pull request 前使用 Checkstyle 来检测或者格式化你的代码。如下的步骤将引领你配置并激活 Checkstyle
当你向 Dinky 提交 pull request 的时候 code-style 是你不得不考虑的问题。我们在 CI 中使用 Spotless 来保持代码风格的统一,它是一种帮助开发者编写遵循编码规范的 Java 代码格式化工具。如果你的 pull request 没有通过 Spotless 的检测,那它将不会被合并到主库中。你可以在提交 pull request 前使用 Spotless 来检测或者格式化你的代码。
1.
准备 Checkstyle 配置文件:你可以点击
[
这里
](
https://github.com/apache/dolphinscheduler/blob/dev/style/checkstyle.xml
)
手动下载,但是我们更加推荐在 Dinky 代码库中找到它。当你将代码库克隆下来后,你可以在路径
`style/checkstyle.xml`
下找到配置文件
2.
下载 Intellij IDEA Checkstyle 插件:通过关键字
**CheckStyle-IDEA**
或者通过
[
这个页面
](
https://plugins.jetbrains.com/plugin/1065-checkstyle-idea
)
安装均可。如果你不清楚如何安装Intellij IDEA插件,可以参考
[
这个连接
](
https://www.jetbrains.com/help/idea/managing-plugins.html#install_plugin_from_repo
)
3.
配置并激活 Checkstyles 以及 Intellij IDEA 代码风格:当完成上面几步后,你就可以配置并激活他们了。你可以在路径
`Preferences -> Tool -> Checkstyle`
中找到 Checkstyle,请参照下图完成其配置
<p
align=
"center"
>
<img
src=
"/img/checkstyle-idea.png"
alt=
"checkstyle idea configuration"
/>
</p>
截止目前,Checkstyle 插件已经配置完成了,当有代码或者文件不符合风格时就会显示在 Checkstyle 中。但强烈建议同时配置 Intellij IDEA 的代码风格,完成配置后可以使用 Intellij IDEA 自动格式化功能。你可以在路径
`Preferences -> Editor -> Code Style -> Java`
找到配置,请参照下图完成其配置
<p
align=
"center"
>
1.
在提交 pull request 前格式化你的代码:执行
`mvn spotless:apply -P flink-all`
自动格式化。格式化代码的最佳时间是将你的修改提交到本地 git 版本库之前
<img
src=
"/img/code-style-idea.png"
alt=
"code style idea configuration"
/>
</p>
1.
在提交 pull request 前格式化你的代码:完成上面全部后,你可以使用快捷键
`Command + L`
(Mac用户) or
`Ctrl+L`
(Windows用户)在 Intellij IDEA 完成自动格式化。格式化代码的最佳时间是将你的修改提交到本地 git 版本库之前
2.
在提交 pull request 前编译整个项目:在 IDEA 中的 Profiles 中选择 aliyun,flink-all,nexus,prod,scala-2.12,web,重载项目后执行
`mvn clean install -P aliyun,prod,scala-2.12,web,flink-all`
,编译成功后即可提交代码
### 相关问题
### 相关问题
-
怎样处理一个 Pull Request 对应多个 Issue 的场景。
-
怎样处理一个 Pull Request 对应多个 Issue 的场景。
首先 Pull Request 和 Issue 一对多的场景是比较少的。Pull Request 和 Issue 一对多的根本原因就是出现了多个
首先 Pull Request 和 Issue 一对多的场景是比较少的。Pull Request 和 Issue 一对多的根本原因就是出现了多个
Issue 需要做大体相同的一件事情的场景,通常针对这种场景有两种解决方法:第一种就是把多个功能相同的 Issue 合并到同一个 Issue 上,然后把其他的
Issue 需要做大体相同的一件事情的场景,通常针对这种场景就是把多个功能相同的 Issue 合并到同一个 Issue 上,然后把其他的
Issue 进行关闭;第二种就是多个 Issue 大体上是在做一个功能,但是存在一些细微的差别,这类场景下可以把每个 Issue 的职责划分清楚,每一个
Issue 进行关闭。
Issue 的类型都标记为 Sub-Task,然后将这些 Sub-Task 类型的 Issue 关联到一个总 Issue 上,在提交
Pull Request 时,每个 Pull Request 都只关联一个 Sub-Task 的 Issue。
尽量把一个 Pull Request 作为最小粒度。如果一个 Pull Request 只做一件事,Contributor 容易完成,Pull Request 影响的范围也会更加清晰,对 reviewer 的压力也会小。
尽量把一个 Pull Request 作为最小粒度。如果一个 Pull Request 只做一件事,Contributor 容易完成,Pull Request 影响的范围也会更加清晰,对 reviewer 的压力也会小。
pom.xml
View file @
9312abd4
...
@@ -73,7 +73,6 @@
...
@@ -73,7 +73,6 @@
<log4j.version>
2.19.0
</log4j.version>
<log4j.version>
2.19.0
</log4j.version>
<lombok.version>
1.18.24
</lombok.version>
<lombok.version>
1.18.24
</lombok.version>
<maven-assembly-plugin.version>
3.4.2
</maven-assembly-plugin.version>
<maven-assembly-plugin.version>
3.4.2
</maven-assembly-plugin.version>
<maven-checkstyle-plugin.version>
3.1.2
</maven-checkstyle-plugin.version>
<maven-compiler-plugin.version>
3.8.1
</maven-compiler-plugin.version>
<maven-compiler-plugin.version>
3.8.1
</maven-compiler-plugin.version>
<maven-jar-plugin.version>
3.3.0
</maven-jar-plugin.version>
<maven-jar-plugin.version>
3.3.0
</maven-jar-plugin.version>
<maven-surefire-plugin.version>
3.0.0-M5
</maven-surefire-plugin.version>
<maven-surefire-plugin.version>
3.0.0-M5
</maven-surefire-plugin.version>
...
@@ -604,38 +603,6 @@
...
@@ -604,38 +603,6 @@
<artifactId>
maven-surefire-plugin
</artifactId>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
${maven-surefire-plugin.version}
</version>
<version>
${maven-surefire-plugin.version}
</version>
</plugin>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-checkstyle-plugin
</artifactId>
<version>
${maven-checkstyle-plugin.version}
</version>
<configuration>
<consoleOutput>
true
</consoleOutput>
<encoding>
UTF-8
</encoding>
<configLocation>
style/checkstyle.xml
</configLocation>
<failOnViolation>
true
</failOnViolation>
<includeTestSourceDirectory>
true
</includeTestSourceDirectory>
<sourceDirectories>
<sourceDirectory>
${project.build.sourceDirectory}
</sourceDirectory>
</sourceDirectories>
<excludes>
**\/generated-sources\/
</excludes>
</configuration>
<dependencies>
<dependency>
<groupId>
com.puppycrawl.tools
</groupId>
<artifactId>
checkstyle
</artifactId>
<version>
8.45
</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>
check
</goal>
</goals>
<phase>
compile
</phase>
</execution>
</executions>
</plugin>
</plugins>
</plugins>
</pluginManagement>
</pluginManagement>
...
@@ -670,10 +637,6 @@
...
@@ -670,10 +637,6 @@
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<artifactId>
maven-surefire-plugin
</artifactId>
</plugin>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-checkstyle-plugin
</artifactId>
</plugin>
<plugin>
<plugin>
<groupId>
com.diffplug.spotless
</groupId>
<groupId>
com.diffplug.spotless
</groupId>
<artifactId>
spotless-maven-plugin
</artifactId>
<artifactId>
spotless-maven-plugin
</artifactId>
...
@@ -918,7 +881,7 @@
...
@@ -918,7 +881,7 @@
</profile>
</profile>
<profile>
<profile>
<id>
all
</id>
<id>
flink-
all
</id>
</profile>
</profile>
<profile>
<profile>
...
@@ -1015,13 +978,6 @@
...
@@ -1015,13 +978,6 @@
<build>
<build>
<pluginManagement>
<pluginManagement>
<plugins>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-checkstyle-plugin
</artifactId>
<configuration>
<skip>
true
</skip>
</configuration>
</plugin>
<plugin>
<plugin>
<groupId>
com.diffplug.spotless
</groupId>
<groupId>
com.diffplug.spotless
</groupId>
<artifactId>
spotless-maven-plugin
</artifactId>
<artifactId>
spotless-maven-plugin
</artifactId>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment