Skip to content

Commit bf1cb5b

Browse files
aiceflowerclaude
andauthored
[LINKIS-1.9.0] Feature toggles, dependency optimization and bug fixes for linkis-web and backend (#5400)
* update version to 1.9.0 * #AI commit# refactor: 调整 GatewaySpringConfiguration 中 SecurityFilter 设置逻辑 - 添加 userRestful 字段注入 - 将 SecurityFilter.setUserRestful 调用从 createUserRestful 方法移至 @PostConstruct init 方法 * #AI commit# refactor: 升级 Knife4j 和 Springfox 到 3.x 版本 - 在 apache profile 中升级 knife4j.version 从 2.0.9 到 3.0.3 - 在 apache profile 中升级 springfox.version 从 2.10.5 到 3.0.0 - 添加 hbase-shaded-jetty 和 hbase-protocol-shaded 排除依赖,解决 Jetty 冲突 - SwaggerBeanPostProcessor 保持兼容 Springfox 3.x API 修复问题: - 解决 publicservice 服务启动失败问题 - 解决 DynamicResponseModelReader 依赖 TypeNameExtractor 错误 - 解决 Jetty ServletHolder.setClassFrom IllegalStateException 错误 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * #AI COMMIT# Exclude hbase dependencies from JDBC and Hive engine connectors Add exclusions for hbase-shaded-jetty and hbase-protocol-shaded to prevent Jetty class conflicts in JDBC and Hive EngineConn plugins. Modified files: - linkis-engineconn-plugins/jdbc/pom.xml - linkis-engineconn-plugins/hive/pom.xml * #AI COMMIT# Exclude hbase-shaded-jetty from assembly packaging Add hbase-shaded-jetty and hbase-protocol-shaded exclusions to distribution.xml files to prevent Jetty class conflicts at runtime. Modified files: - linkis-public-enhancements/distribution.xml - linkis-engineconn-plugins/hive/src/main/assembly/distribution.xml - linkis-engineconn-plugins/jdbc/src/main/assembly/distribution.xml * #AI COMMIT# Use wildcard pattern to exclude all hbase-shaded jars Change from excluding individual hbase-shaded-* jars to using wildcard pattern to exclude all hbase-shaded packages at once. Modified files: - linkis-public-enhancements/distribution.xml - linkis-engineconn-plugins/hive/src/main/assembly/distribution.xml - linkis-engineconn-plugins/jdbc/src/main/assembly/distribution.xml * #AI COMMIT# Exclude all hbase-shaded jars explicitly List each hbase-shaded jar explicitly instead of using wildcard pattern which doesn't work with Maven assembly plugin. Modified files: - linkis-public-enhancements/distribution.xml - linkis-engineconn-plugins/hive/src/main/assembly/distribution.xml - linkis-engineconn-plugins/jdbc/src/main/assembly/distribution.xml * #AI COMMIT# Exclude all hbase jars from linkis-public-enhancements assembly Add comprehensive exclusions for all hbase-related jars to prevent Jetty class conflicts and reduce unnecessary dependencies. Modified: - linkis-public-enhancements/distribution.xml * # AI COMMIT# Optimize linkis scripts - service alias and status output format ## Changes ### 1. Service Alias Mapping (alias 1-6) - alias [1] --> mg-eureka - alias [2] --> mg-gateway - alias [3] --> ps-publicservice - alias [4] --> cg-linkismanager - alias [5] --> cg-entrance - alias [6] --> cg-engineconnmanager ### 2. Status Output Format - Unified format: alias->[X] [service-name] [OK/FAILED] - Service names left-aligned in 22-character width - Green [OK] for running services - Red [FAILED] for failed services ### 3. Files Modified - linkis-dist/package/sbin/linkis - linkis-dist/package/sbin/linkis-start-all.sh ### 4. Help Information Updated help message to show new alias format * #AI COMMIT# feat: Add build-time parameter for Python Module feature toggle - Add PYTHON_MODULE environment variable support in vue.config.js - Create separate python-module-config virtual module to avoid circular dependency - Modify router.js to conditionally register pythonModule route - Update index.vue to control menu visibility based on feature flag - Default: enabled, use PYTHON_MODULE=false npm run build to disable Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * #AI COMMIT# docs: Remove Python Module documentation files These documentation files are not required by the project and can be removed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * #AI COMMIT# fix: Fix i18n key for add button in datasourceAccess module - Change 'message.linkis.basedata.add' to 'message.linkis.basedataManagement.add' - Keep consistent with other modules like datasourceEnv - Fix Chinese translation not displaying for add button Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * #AI COMMIT# feat: Add build-time parameter for disallow system user login feature Add compile-time toggle for disallow login feature, similar to python module: - Default enabled (feature ON) - Use DISALLOW_LOGIN=false npm run build to disable - Create virtual module disallow-login-config.js for config injection Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent df83ec0 commit bf1cb5b

18 files changed

Lines changed: 235 additions & 348 deletions

File tree

linkis-dist/package/sbin/linkis

Lines changed: 99 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,17 @@ if [ "$LINKIS_CONF_DIR" = "" ]; then
3434
fi
3535
source $LINKIS_CONF_DIR/linkis-env.sh
3636

37-
export ENGINE_MANAGER=cg-engineconnmanager
38-
export ENTRANCE=cg-entrance
39-
export LINKISMANAGER=cg-linkismanager
40-
export GATEWAY=mg-gateway
4137
export EUREKA=mg-eureka
42-
export PUBLICSERVICE=ps-publicservice
38+
export GATEWAY=mg-gateway
39+
export PUBLICSERVICE=ps-publicservice
40+
export LINKISMANAGER=cg-linkismanager
41+
export ENTRANCE=cg-entrance
42+
export ENGINE_MANAGER=cg-engineconnmanager
4343

4444
YELLOW='\033[0;33m'
45+
GREEN='\033[0;32m'
46+
RED='\033[0;31m'
47+
NC='\033[0m'
4548

4649
help() {
4750
echo "<----------------------------------------------------------->"
@@ -70,12 +73,12 @@ help() {
7073
echo " restart [service-name], restart [service-name] service"
7174
echo ""
7275
echo "SERVICE-NAME"
73-
echo " cg-engineconnmanager alias 1"
74-
echo " cg-entrance alias 2"
75-
echo " cg-linkismanager alias 3"
76-
echo " mg-eureka alias 4"
77-
echo " mg-gateway alias 5"
78-
echo " ps-publicservice alias 6"
76+
echo " alias [1] --> mg-eureka"
77+
echo " alias [2] --> mg-gateway"
78+
echo " alias [3] --> ps-publicservice"
79+
echo " alias [4] --> cg-linkismanager"
80+
echo " alias [5] --> cg-entrance"
81+
echo " alias [6] --> cg-engineconnmanager"
7982
echo "<----------------------------------------------------------->"
8083
exit 1
8184
}
@@ -84,29 +87,32 @@ status(){
8487
sh $LINKIS_HOME/sbin/linkis-daemon.sh status $1
8588
}
8689

87-
function checkServer() {
88-
echo -e "<-------------- ${YELLOW}Linkis-$1 ${NC} ------------------>"
89-
echo "Begin to check $1"
90-
sh $LINKIS_HOME/sbin/linkis-daemon.sh status $1
91-
if [ $? -ne 0 ]; then
92-
ALL_SERVER_NAME=linkis-$1
90+
function checkServer(){
91+
local service_name=$1
92+
local alias_num=$2
93+
sh $LINKIS_HOME/sbin/linkis-daemon.sh status $service_name > /dev/null 2>&1
94+
local status=$?
95+
if [ $status -ne 0 ]; then
96+
printf "${YELLOW}alias->[%d] [%-22s] [${RED}FAILED${NC}]${NC}\n" "$alias_num" "$service_name"
97+
ALL_SERVER_NAME=linkis-$service_name
9398
LOG_PATH=$LINKIS_HOME/logs/$ALL_SERVER_NAME.log
9499
echo "ERROR: your $ALL_SERVER_NAME microservice does not start successful !!! ERROR logs as follows :"
95100
echo "Please check detail log, log path :$LOG_PATH"
96-
else
97-
echo [OK]
101+
else
102+
printf "${YELLOW}alias->[%d] [%-22s] [${GREEN}OK${NC}]${NC}\n" "$alias_num" "$service_name"
103+
sh $LINKIS_HOME/sbin/linkis-daemon.sh status $service_name
98104
echo ""
99105
echo ""
100106
fi
101107
}
102108

103109
status_all(){
104-
checkServer cg-engineconnmanager
105-
checkServer cg-entrance
106-
checkServer cg-linkismanager
107-
checkServer mg-gateway
108-
checkServer mg-eureka
109-
checkServer ps-publicservice
110+
checkServer mg-eureka 1
111+
checkServer mg-gateway 2
112+
checkServer ps-publicservice 3
113+
checkServer cg-linkismanager 4
114+
checkServer cg-entrance 5
115+
checkServer cg-engineconnmanager 6
110116
}
111117

112118
stop(){
@@ -140,121 +146,121 @@ restart_all(){
140146
case "$1" in
141147
"start")
142148
case "$2" in
143-
"$ENGINE_MANAGER" | 1)
144-
start $ENGINE_MANAGER
145-
;;
146-
"$ENTRANCE" | 2)
147-
start $ENTRANCE
148-
;;
149-
"$LINKISMANAGER" | 3)
150-
start $LINKISMANAGER
151-
;;
152-
"$EUREKA" | 4)
149+
"$EUREKA" | 1)
153150
start $EUREKA
154-
;;
155-
"$GATEWAY" | 5)
151+
;;
152+
"$GATEWAY" | 2)
156153
start $GATEWAY
157-
;;
158-
"$PUBLICSERVICE" | 6)
154+
;;
155+
"$PUBLICSERVICE" | 3)
159156
start $PUBLICSERVICE
160-
;;
157+
;;
158+
"$LINKISMANAGER" | 4)
159+
start $LINKISMANAGER
160+
;;
161+
"$ENTRANCE" | 5)
162+
start $ENTRANCE
163+
;;
164+
"$ENGINE_MANAGER" | 6)
165+
start $ENGINE_MANAGER
166+
;;
161167
*)
162168
if [ "$2" = "" ]; then
163169
start_all
164170
else
165-
echo "Please enter the correct service name"
166-
echo "Run help to view the service name"
171+
echo "Please enter the correct service name"
172+
echo "Run help to view the service name"
167173
fi
168174
;;
169175
esac
170176
;;
171177
"stop")
172178
case "$2" in
173-
"$ENGINE_MANAGER" | 1)
174-
stop $ENGINE_MANAGER
175-
;;
176-
"$ENTRANCE" | 2)
177-
stop $ENTRANCE
178-
;;
179-
"$LINKISMANAGER" | 3)
180-
stop $LINKISMANAGER
181-
;;
182-
"$EUREKA" | 4)
179+
"$EUREKA" | 1)
183180
stop $EUREKA
184-
;;
185-
"$GATEWAY" | 5)
181+
;;
182+
"$GATEWAY" | 2)
186183
stop $GATEWAY
187-
;;
188-
"$PUBLICSERVICE" | 6)
184+
;;
185+
"$PUBLICSERVICE" | 3)
189186
stop $PUBLICSERVICE
190-
;;
187+
;;
188+
"$LINKISMANAGER" | 4)
189+
stop $LINKISMANAGER
190+
;;
191+
"$ENTRANCE" | 5)
192+
stop $ENTRANCE
193+
;;
194+
"$ENGINE_MANAGER" | 6)
195+
stop $ENGINE_MANAGER
196+
;;
191197
*)
192198
if [ "$2" = "" ]; then
193199
stop_all
194200
else
195-
echo "Please enter the correct service name"
196-
echo "Run help to view the service name"
201+
echo "Please enter the correct service name"
202+
echo "Run help to view the service name"
197203
fi
198204
;;
199205
esac
200206
;;
201207
"status")
202208
case "$2" in
203-
"$ENGINE_MANAGER" | 1)
204-
status $ENGINE_MANAGER
205-
;;
206-
"$ENTRANCE" | 2)
207-
status $ENTRANCE
208-
;;
209-
"$LINKISMANAGER" | 3)
210-
status $LINKISMANAGER
211-
;;
212-
"$EUREKA" | 4)
209+
"$EUREKA" | 1)
213210
status $EUREKA
214-
;;
215-
"$GATEWAY" | 5)
211+
;;
212+
"$GATEWAY" | 2)
216213
status $GATEWAY
217-
;;
218-
"$PUBLICSERVICE" | 6)
214+
;;
215+
"$PUBLICSERVICE" | 3)
219216
status $PUBLICSERVICE
220-
;;
217+
;;
218+
"$LINKISMANAGER" | 4)
219+
status $LINKISMANAGER
220+
;;
221+
"$ENTRANCE" | 5)
222+
status $ENTRANCE
223+
;;
224+
"$ENGINE_MANAGER" | 6)
225+
status $ENGINE_MANAGER
226+
;;
221227
*)
222228
if [ "$2" = "" ]; then
223229
status_all
224230
else
225-
echo "Please enter the correct service name"
226-
echo "Run help to view the service name"
231+
echo "Please enter the correct service name"
232+
echo "Run help to view the service name"
227233
fi
228234
;;
229235
esac
230236
;;
231237
"restart")
232238
case "$2" in
233-
"$ENGINE_MANAGER" | 1)
234-
restart $ENGINE_MANAGER
235-
;;
236-
"$ENTRANCE" | 2)
237-
restart $ENTRANCE
238-
;;
239-
"$LINKISMANAGER" | 3)
240-
restart $LINKISMANAGER
241-
;;
242-
"$EUREKA" | 4)
239+
"$EUREKA" | 1)
243240
restart $EUREKA
244-
;;
245-
"$GATEWAY" | 5)
241+
;;
242+
"$GATEWAY" | 2)
246243
restart $GATEWAY
247-
;;
248-
"$PUBLICSERVICE" | 6)
244+
;;
245+
"$PUBLICSERVICE" | 3)
249246
restart $PUBLICSERVICE
250-
;;
247+
;;
248+
"$LINKISMANAGER" | 4)
249+
restart $LINKISMANAGER
250+
;;
251+
"$ENTRANCE" | 5)
252+
restart $ENTRANCE
253+
;;
254+
"$ENGINE_MANAGER" | 6)
255+
restart $ENGINE_MANAGER
256+
;;
251257
*)
252258
if [ "$2" = "" ]; then
253259
stop_all
254260
restart_all
255261
else
256-
echo "Please enter the correct service name"
257-
echo "Run help to view the service name"
262+
echo "Please enter the correct service name"
263+
echo "Run help to view the service name"
258264
fi
259265
;;
260266
esac

linkis-dist/package/sbin/linkis-start-all.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,16 @@ echo "start-all shell script executed completely"
107107
echo "Start to check all linkis microservice"
108108

109109
function checkServer() {
110+
local service_name=$1
111+
local alias_num=$2
110112
echo "<-------------------------------->"
111-
echo "Begin to check $SERVER_NAME"
113+
sh $LINKIS_HOME/sbin/linkis-daemon.sh status $SERVER_NAME
114+
local status=$?
115+
if [ $status -ne 0 ]; then
116+
printf "alias->[%d] [%-22s] [FAILED]\n" "$alias_num" "$service_name"
117+
else
118+
printf "alias->[%d] [%-22s] [OK]\n" "$alias_num" "$service_name"
119+
fi
112120
SERVER_CHECK_CMD="sh $LINKIS_HOME/sbin/linkis-daemon.sh status $SERVER_NAME"
113121
if test -z "$SERVER_IP"
114122
then
@@ -136,34 +144,34 @@ sleep 3
136144
if [ "$DISCOVERY" == "EUREKA" ]; then
137145
export SERVER_NAME="mg-eureka"
138146
SERVER_IP=$EUREKA_INSTALL_IP
139-
checkServer
147+
checkServer mg-eureka 1
140148
fi
141149

142150

143151
#linkis-mg-gateway
144152
SERVER_NAME="mg-gateway"
145153
SERVER_IP=$GATEWAY_INSTALL_IP
146-
checkServer
154+
checkServer mg-gateway 2
147155

148156
#linkis-ps-publicservice
149157
SERVER_NAME="ps-publicservice"
150158
SERVER_IP=$PUBLICSERVICE_INSTALL_IP
151-
checkServer
159+
checkServer ps-publicservice 3
152160

153161
#linkis-cg-linkismanager
154162
SERVER_NAME="cg-linkismanager"
155163
SERVER_IP=$MANAGER_INSTALL_IP
156-
checkServer
164+
checkServer cg-linkismanager 4
157165

158166

159167
#linkis-cg-entrance
160168
SERVER_NAME="cg-entrance"
161169
SERVER_IP=$ENTRANCE_INSTALL_IP
162-
checkServer
170+
checkServer cg-entrance 5
163171

164172
#linkis-cg-engineconnmanager(ecm)
165173
SERVER_NAME="cg-engineconnmanager"
166174
SERVER_IP=$ENGINECONNMANAGER_INSTALL_IP
167-
checkServer
175+
checkServer cg-engineconnmanager 6
168176

169177
echo "Apache Linkis started successfully"

linkis-engineconn-plugins/hive/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@
106106
<groupId>org.apache.logging.log4j</groupId>
107107
<artifactId>log4j-slf4j-impl</artifactId>
108108
</exclusion>
109+
<exclusion>
110+
<groupId>org.apache.hbase</groupId>
111+
<artifactId>hbase-shaded-jetty</artifactId>
112+
</exclusion>
113+
<exclusion>
114+
<groupId>org.apache.hbase</groupId>
115+
<artifactId>hbase-protocol-shaded</artifactId>
116+
</exclusion>
109117
</exclusions>
110118
</dependency>
111119

@@ -206,6 +214,14 @@
206214
<groupId>org.apache.velocity</groupId>
207215
<artifactId>velocity</artifactId>
208216
</exclusion>
217+
<exclusion>
218+
<groupId>org.apache.hbase</groupId>
219+
<artifactId>hbase-shaded-jetty</artifactId>
220+
</exclusion>
221+
<exclusion>
222+
<groupId>org.apache.hbase</groupId>
223+
<artifactId>hbase-protocol-shaded</artifactId>
224+
</exclusion>
209225
</exclusions>
210226
</dependency>
211227

linkis-engineconn-plugins/hive/src/main/assembly/distribution.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@
123123
<exclude>org.apache.hadoop:hadoop-common:jar</exclude>
124124
<exclude>org.apache.hadoop:hadoop-hdfs:jar</exclude>
125125
<exclude>org.apache.htrace:htrace-core:jar</exclude>
126+
<exclude>org.apache.hbase:hbase-shaded-jetty:jar</exclude>
127+
<exclude>org.apache.hbase:hbase-shaded-jersey:jar</exclude>
128+
<exclude>org.apache.hbase:hbase-shaded-gson:jar</exclude>
129+
<exclude>org.apache.hbase:hbase-shaded-netty:jar</exclude>
130+
<exclude>org.apache.hbase:hbase-shaded-protobuf:jar</exclude>
131+
<exclude>org.apache.hbase:hbase-shaded-miscellaneous:jar</exclude>
132+
<exclude>org.apache.hbase:hbase-protocol-shaded:jar</exclude>
126133
<exclude>org.apache.logging.log4j:log4j-api:jar</exclude>
127134
<exclude>org.apache.logging.log4j:log4j-core:jar</exclude>
128135
<exclude>org.apache.logging.log4j:log4j-jul:jar</exclude>

linkis-engineconn-plugins/jdbc/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,14 @@
136136
<groupId>org.xerial.snappy</groupId>
137137
<artifactId>snappy-java</artifactId>
138138
</exclusion>
139-
139+
<exclusion>
140+
<groupId>org.apache.hbase</groupId>
141+
<artifactId>hbase-shaded-jetty</artifactId>
142+
</exclusion>
143+
<exclusion>
144+
<groupId>org.apache.hbase</groupId>
145+
<artifactId>hbase-protocol-shaded</artifactId>
146+
</exclusion>
140147
</exclusions>
141148
</dependency>
142149

0 commit comments

Comments
 (0)