From 9cda08beea58f06c327e66071c3f96a4800b16be Mon Sep 17 00:00:00 2001 From: zml1206 Date: Wed, 1 Nov 2023 12:10:48 +0800 Subject: [PATCH 01/10] [KYUUBI #5529][AUTHZ][FOLLOWUP] Remove useless org.apache.spark.sql.delta.commands.CreateDeltaTableCommand ### _Why are the changes needed?_ To close #5529 . Remove useless `org.apache.spark.sql.delta.commands.CreateDeltaTableCommand`. Because the logical plans for Delta Lake create table and replace table are `org.apache.spark.sql.catalyst.plans.logical.CreateTable`, `org.apache.spark.sql.catalyst.plans.logical.CreateV2Table` and `org.apache.spark.sql.catalyst.plans.logical.ReplaceTable`. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request ### _Was this patch authored or co-authored using generative AI tooling?_ No. Closes #5571 from zml1206/KYUUBI-5529-FOLLOWUP. Closes #5529 0908571ce [zml1206] Remove useless org.apache.spark.sql.delta.commands.CreateDeltaTableCommand Authored-by: zml1206 Signed-off-by: Fu Chen --- .../main/resources/table_command_spec.json | 15 --------- .../spark/authz/gen/DeltaCommands.scala | 33 ------------------- .../authz/gen/JsonSpecFileGenerator.scala | 2 +- 3 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/DeltaCommands.scala diff --git a/extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json b/extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json index 67e027c6e23..81dfa6cbc9a 100644 --- a/extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json +++ b/extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json @@ -1968,19 +1968,4 @@ "opType" : "QUERY", "queryDescs" : [ ], "uriDescs" : [ ] -}, { - "classname" : "org.apache.spark.sql.delta.commands.CreateDeltaTableCommand", - "tableDescs" : [ { - "fieldName" : "table", - "fieldExtractor" : "CatalogTableTableExtractor", - "columnDesc" : null, - "actionTypeDesc" : null, - "tableTypeDesc" : null, - "catalogDesc" : null, - "isInput" : false, - "setCurrentDatabaseIfMissing" : false - } ], - "opType" : "CREATETABLE", - "queryDescs" : [ ], - "uriDescs" : [ ] } ] \ No newline at end of file diff --git a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/DeltaCommands.scala b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/DeltaCommands.scala deleted file mode 100644 index 6435a64f51f..00000000000 --- a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/DeltaCommands.scala +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.apache.kyuubi.plugin.spark.authz.gen - -import org.apache.kyuubi.plugin.spark.authz.OperationType._ -import org.apache.kyuubi.plugin.spark.authz.serde._ - -object DeltaCommands extends CommandSpecs[TableCommandSpec] { - - val CreateDeltaTableCommand = { - val cmd = "org.apache.spark.sql.delta.commands.CreateDeltaTableCommand" - val tableDesc = TableDesc("table", classOf[CatalogTableTableExtractor]) - TableCommandSpec(cmd, Seq(tableDesc), CREATETABLE) - } - - override def specs: Seq[TableCommandSpec] = Seq( - CreateDeltaTableCommand) -} diff --git a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/JsonSpecFileGenerator.scala b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/JsonSpecFileGenerator.scala index 5fb4ace10da..07a8e285241 100644 --- a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/JsonSpecFileGenerator.scala +++ b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/JsonSpecFileGenerator.scala @@ -44,7 +44,7 @@ class JsonSpecFileGenerator extends AnyFunSuite { // scalastyle:on test("check spec json files") { writeCommandSpecJson("database", Seq(DatabaseCommands)) - writeCommandSpecJson("table", Seq(TableCommands, IcebergCommands, HudiCommands, DeltaCommands)) + writeCommandSpecJson("table", Seq(TableCommands, IcebergCommands, HudiCommands)) writeCommandSpecJson("function", Seq(FunctionCommands)) writeCommandSpecJson("scan", Seq(Scans)) } From c81124bc93b6099a852238ba969e5a25a62fe57b Mon Sep 17 00:00:00 2001 From: senmiaoliu Date: Wed, 1 Nov 2023 15:03:33 +0800 Subject: [PATCH 02/10] [KYUUBI #5561] Binary distribution artifact ships database schema scripts ### _Why are the changes needed?_ close #5561 ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request ### _Was this patch authored or co-authored using generative AI tooling?_ NO Closes #5589 from lsm1/branch-kyuubi-5561. Closes #5561 831f06ae5 [senmiaoliu] just copy server resource sql 64b90b144 [senmiaoliu] copy metadata sql to dist Authored-by: senmiaoliu Signed-off-by: Cheng Pan --- build/dist | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/dist b/build/dist index df9498008cb..e34723d94bd 100755 --- a/build/dist +++ b/build/dist @@ -249,6 +249,7 @@ mkdir -p "$DISTDIR/pid" mkdir -p "$DISTDIR/logs" mkdir -p "$DISTDIR/work" mkdir -p "$DISTDIR/jars" +mkdir -p "$DISTDIR/db-schema" mkdir -p "$DISTDIR/beeline-jars" mkdir -p "$DISTDIR/web-ui" mkdir -p "$DISTDIR/externals/engines/flink" @@ -270,6 +271,9 @@ echo "Build flags: $@" >> "$DISTDIR/RELEASE" # Copy kyuubi server jars cp -r "$KYUUBI_HOME"/kyuubi-assembly/target/scala-$SCALA_VERSION/jars/*.jar "$DISTDIR/jars/" +# Copy kyuubi metadata sql +cp -r "$KYUUBI_HOME"/kyuubi-server/src/main/resources/sql/* "$DISTDIR/db-schema/" + # Copy kyuubi beeline jars cp "$KYUUBI_HOME"/kyuubi-hive-beeline/target/*.jar "$DISTDIR/beeline-jars/" From 27d845c895b8a089022965ac440aa86d3b73eb96 Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Wed, 1 Nov 2023 16:23:19 +0800 Subject: [PATCH 03/10] [KYUUBI #5561][FOLLOWUP] Rename folder to db-scripts ### _Why are the changes needed?_ Minor, just rename a folder. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request ### _Was this patch authored or co-authored using generative AI tooling?_ No Closes #5598 from pan3793/db-scripts. Closes #5561 17cdd661a [Cheng Pan] [KYUUBI #5561][FOLLOWUP] Rename folder to db-scripts Authored-by: Cheng Pan Signed-off-by: Cheng Pan --- build/dist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/dist b/build/dist index e34723d94bd..2ea702b61af 100755 --- a/build/dist +++ b/build/dist @@ -249,7 +249,7 @@ mkdir -p "$DISTDIR/pid" mkdir -p "$DISTDIR/logs" mkdir -p "$DISTDIR/work" mkdir -p "$DISTDIR/jars" -mkdir -p "$DISTDIR/db-schema" +mkdir -p "$DISTDIR/db-scripts" mkdir -p "$DISTDIR/beeline-jars" mkdir -p "$DISTDIR/web-ui" mkdir -p "$DISTDIR/externals/engines/flink" @@ -271,8 +271,8 @@ echo "Build flags: $@" >> "$DISTDIR/RELEASE" # Copy kyuubi server jars cp -r "$KYUUBI_HOME"/kyuubi-assembly/target/scala-$SCALA_VERSION/jars/*.jar "$DISTDIR/jars/" -# Copy kyuubi metadata sql -cp -r "$KYUUBI_HOME"/kyuubi-server/src/main/resources/sql/* "$DISTDIR/db-schema/" +# Copy kyuubi database scripts +cp -r "$KYUUBI_HOME"/kyuubi-server/src/main/resources/sql/* "$DISTDIR/db-scripts/" # Copy kyuubi beeline jars cp "$KYUUBI_HOME"/kyuubi-hive-beeline/target/*.jar "$DISTDIR/beeline-jars/" From 0a0088bd7255d0b579924683c273085c6444210f Mon Sep 17 00:00:00 2001 From: wforget <643348094@qq.com> Date: Wed, 1 Nov 2023 21:48:21 +0800 Subject: [PATCH 04/10] [KYUUBI #5570] Fix memory leak when using incremental collect mode in JDBC engine ### _Why are the changes needed?_ Similar to #3885, there is also memory leak in the jdbc engine when using incremental collect mode. Duplicate of #5161 ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request ### _Was this patch authored or co-authored using generative AI tooling?_ No Closes #5570 from wForget/hotfix. Closes #5570 dbeddc9cf [wforget] comment 0c4e499ba [wforget] fix b7c421a37 [wforget] fix 0ef21ce55 [wforget] fix f5f2e8048 [wforget] Fix memory leak when using incremental collect mode in JDBC engine Authored-by: wforget <643348094@qq.com> Signed-off-by: Cheng Pan --- .../jdbc/operation/ExecuteStatement.scala | 37 +++++++++++++++---- .../engine/jdbc/operation/JdbcOperation.scala | 5 ++- .../engine/jdbc/util/ResultSetWrapper.scala | 2 + 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/ExecuteStatement.scala b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/ExecuteStatement.scala index ef49f2b3086..b7caea01434 100644 --- a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/ExecuteStatement.scala +++ b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/ExecuteStatement.scala @@ -18,11 +18,13 @@ package org.apache.kyuubi.engine.jdbc.operation import java.sql.{Connection, Statement, Types} -import org.apache.kyuubi.Logging +import org.apache.kyuubi.{KyuubiSQLException, Logging} import org.apache.kyuubi.engine.jdbc.schema.{Column, Row, Schema} import org.apache.kyuubi.engine.jdbc.session.JdbcSessionImpl import org.apache.kyuubi.engine.jdbc.util.ResultSetWrapper -import org.apache.kyuubi.operation.{ArrayFetchIterator, IterableFetchIterator, OperationState} +import org.apache.kyuubi.operation.{ArrayFetchIterator, FetchOrientation, IterableFetchIterator, OperationState} +import org.apache.kyuubi.operation.FetchOrientation.FetchOrientation +import org.apache.kyuubi.operation.OperationState.OperationState import org.apache.kyuubi.operation.log.OperationLog import org.apache.kyuubi.session.Session @@ -37,6 +39,8 @@ class ExecuteStatement( private val operationLog: OperationLog = OperationLog.createOperationLog(session, getHandle) override def getOperationLog: Option[OperationLog] = Option(operationLog) + @volatile private var jdbcStatement: Statement = _ + override protected def runInternal(): Unit = { addTimeoutMonitor(queryTimeout) if (shouldRunAsync) { @@ -55,7 +59,6 @@ class ExecuteStatement( private def executeStatement(): Unit = { setState(OperationState.RUNNING) - var jdbcStatement: Statement = null try { val connection: Connection = session.asInstanceOf[JdbcSessionImpl].sessionConnection jdbcStatement = dialect.createStatement(connection) @@ -67,9 +70,12 @@ class ExecuteStatement( iter = if (incrementalCollect) { info("Execute in incremental collect mode") - new IterableFetchIterator(resultSetWrapper.toIterable) + new IterableFetchIterator(new Iterable[Row] { + override def iterator: Iterator[Row] = resultSetWrapper + }) } else { warn(s"Execute in full collect mode") + jdbcStatement.closeOnCompletion() new ArrayFetchIterator(resultSetWrapper.toArray()) } } else { @@ -89,10 +95,27 @@ class ExecuteStatement( } catch { onError(true) } finally { - if (jdbcStatement != null) { - jdbcStatement.closeOnCompletion() - } shutdownTimeoutMonitor() } } + + override def validateFetchOrientation(order: FetchOrientation): Unit = { + if (incrementalCollect && order != FetchOrientation.FETCH_NEXT) { + throw KyuubiSQLException(s"The fetch type $order is not supported" + + " of incremental collect mode.") + } + super.validateFetchOrientation(order) + } + + override def cleanup(targetState: OperationState): Unit = withLockRequired { + try { + super.cleanup(targetState) + } finally { + if (jdbcStatement != null && !jdbcStatement.isClosed) { + jdbcStatement.close() + jdbcStatement = null + } + } + } + } diff --git a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperation.scala b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperation.scala index 2ca17375717..788d1ba5536 100644 --- a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperation.scala +++ b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/operation/JdbcOperation.scala @@ -36,10 +36,13 @@ abstract class JdbcOperation(session: Session) extends AbstractOperation(session protected lazy val dialect: JdbcDialect = JdbcDialects.get(conf) + def validateFetchOrientation(order: FetchOrientation): Unit = + validateDefaultFetchOrientation(order) + override def getNextRowSetInternal( order: FetchOrientation, rowSetSize: Int): TFetchResultsResp = { - validateDefaultFetchOrientation(order) + validateFetchOrientation(order) assertState(OperationState.FINISHED) setHasResultSet(true) order match { diff --git a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/util/ResultSetWrapper.scala b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/util/ResultSetWrapper.scala index 8bc7027f19b..0fead73b1a6 100644 --- a/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/util/ResultSetWrapper.scala +++ b/externals/kyuubi-jdbc-engine/src/main/scala/org/apache/kyuubi/engine/jdbc/util/ResultSetWrapper.scala @@ -30,6 +30,7 @@ class ResultSetWrapper(statement: Statement) private lazy val metadata = currentResult.getMetaData override def hasNext: Boolean = { + if (currentResult == null) return false val result = currentResult.next() if (!result) { val hasMoreResults = statement.getMoreResults(Statement.CLOSE_CURRENT_RESULT) @@ -37,6 +38,7 @@ class ResultSetWrapper(statement: Statement) currentResult = statement.getResultSet currentResult.next() } else { + currentResult = null false } } else { From 28fb0a779d48366a20432fc4623166a5b525caae Mon Sep 17 00:00:00 2001 From: Cheng Pan Date: Wed, 1 Nov 2023 21:51:32 +0800 Subject: [PATCH 05/10] [KYUUBI #5566][FOLLOWUP] Check InternalSecurityAccessor is initialized only when `kyuubi.engine.security.enabled` is true ### _Why are the changes needed?_ Internal REST client should work when `kyuubi.engine.security.enabled` is `true`/`false`. The changes in https://github.com/apache/kyuubi/pull/5566 is not sufficient. `KyuubiRestAuthenticationSuite` covers the `true` case `BatchesV1ResourceSuite` and `BatchesV2ResourceSuite` cover the `false` case ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request ### _Was this patch authored or co-authored using generative AI tooling?_ No. Closes #5601 from pan3793/5566-followup. Closes #5566 abb710609 [Cheng Pan] test 3f9e735cc [Cheng Pan] [KYUUBI #5566][FOLLOWUP] Check InternalSecurityAccessor is initialized only when `kyuubi.engine.security.enabled` is true Authored-by: Cheng Pan Signed-off-by: Cheng Pan --- .../kyuubi/server/api/v1/InternalRestClient.scala | 8 +++++--- .../kyuubi/server/api/v1/BatchesResourceSuite.scala | 10 +--------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/InternalRestClient.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/InternalRestClient.scala index a0a4bb21e24..dbabc5882a5 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/InternalRestClient.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/InternalRestClient.scala @@ -38,9 +38,11 @@ class InternalRestClient( socketTimeout: Int, connectTimeout: Int, securityEnabled: Boolean) { - require( - InternalSecurityAccessor.get() != null, - "Internal secure access across Kyuubi instances is not enabled") + if (securityEnabled) { + require( + InternalSecurityAccessor.get() != null, + "Internal secure access across Kyuubi instances is not enabled") + } private val internalBatchRestApi = new BatchRestApi(initKyuubiRestClient()) diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala index 7270f68d6b7..9ad51cfdabd 100644 --- a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala +++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/api/v1/BatchesResourceSuite.scala @@ -45,7 +45,7 @@ import org.apache.kyuubi.operation.OperationState.OperationState import org.apache.kyuubi.server.{KyuubiBatchService, KyuubiRestFrontendService} import org.apache.kyuubi.server.http.authentication.AuthenticationHandler.AUTHORIZATION_HEADER import org.apache.kyuubi.server.metadata.api.{Metadata, MetadataFilter} -import org.apache.kyuubi.service.authentication.{InternalSecurityAccessor, KyuubiAuthenticationFactory} +import org.apache.kyuubi.service.authentication.KyuubiAuthenticationFactory import org.apache.kyuubi.session.{KyuubiBatchSession, KyuubiSessionManager, SessionHandle, SessionType} class BatchesV1ResourceSuite extends BatchesResourceSuiteBase { @@ -83,9 +83,6 @@ abstract class BatchesResourceSuiteBase extends KyuubiFunSuite override protected lazy val conf: KyuubiConf = { val kyuubiConf = KyuubiConf() - .set(KyuubiConf.ENGINE_SECURITY_ENABLED, true) - .set(KyuubiConf.ENGINE_SECURITY_SECRET_PROVIDER, "simple") - .set(KyuubiConf.SIMPLE_SECURITY_SECRET_PROVIDER_PROVIDER_SECRET, "ENGINE____SECRET") .set(KyuubiConf.BATCH_IMPL_VERSION, batchVersion) .set( KyuubiConf.SESSION_LOCAL_DIR_ALLOW_LIST, @@ -94,11 +91,6 @@ abstract class BatchesResourceSuiteBase extends KyuubiFunSuite kyuubiConf } - override def beforeAll(): Unit = { - super.beforeAll() - InternalSecurityAccessor.initialize(conf, true) - } - override def afterEach(): Unit = { val sessionManager = fe.be.sessionManager.asInstanceOf[KyuubiSessionManager] sessionManager.allSessions().foreach { session => From 444ff4649e842e4e5f9da1271d64819b98307d20 Mon Sep 17 00:00:00 2001 From: zwangsheng Date: Wed, 1 Nov 2023 22:38:14 +0800 Subject: [PATCH 06/10] [KYUUBI #5586][UI] Kyuubi Web UI show current version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### _Why are the changes needed?_ As title, let kyuubi web ui header show current version. ### _How was this patch tested?_ - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request npm run dev: ![截屏2023-11-01 10 08 56](https://github.com/apache/kyuubi/assets/52876270/98f8b2c8-1e52-4f5e-abe6-3c548d39f685) ![截屏2023-11-01 10 09 00](https://github.com/apache/kyuubi/assets/52876270/c0c8b4b6-1009-476a-bf20-316804928bd3) ### _Was this patch authored or co-authored using generative AI tooling?_ No Closes #5587 from zwangsheng/KYUUBI#5586. Closes #5586 0664a65db [zwangsheng] fix comments 5d1705c4f [zwangsheng] fix unit test ad6e3424e [zwangsheng] fix unit test 0c9ee1c99 [zwangsheng] fix license 5a4dbb1ca [zwangsheng] fix comments 56ee0dfa3 [zwangsheng] fix comments d4ee121c5 [zwangsheng] remove test changes b6523f02d [zwangsheng] fix unit test b932c4e51 [zwangsheng] remove test changes 36f721e5e [zwangsheng] remove test changes 9c466d38b [zwangsheng] [KYUUBI apache#5586][Improvement][UI] Kyuubi Web UI show current version Authored-by: zwangsheng Signed-off-by: Cheng Pan --- .../web-ui/src/assets/kyuubi-logo.svg | 126 ++++++++++++++++++ .../src/layout/components/aside/index.vue | 32 +++-- .../src/test/unit/views/layout/aside.spec.ts | 7 +- kyuubi-server/web-ui/vite.config.ts | 3 + kyuubi-server/web-ui/vitest.config.ts | 3 + 5 files changed, 159 insertions(+), 12 deletions(-) create mode 100644 kyuubi-server/web-ui/src/assets/kyuubi-logo.svg diff --git a/kyuubi-server/web-ui/src/assets/kyuubi-logo.svg b/kyuubi-server/web-ui/src/assets/kyuubi-logo.svg new file mode 100644 index 00000000000..682bc80e768 --- /dev/null +++ b/kyuubi-server/web-ui/src/assets/kyuubi-logo.svg @@ -0,0 +1,126 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/kyuubi-server/web-ui/src/layout/components/aside/index.vue b/kyuubi-server/web-ui/src/layout/components/aside/index.vue index 52304abff1d..33d7944782e 100644 --- a/kyuubi-server/web-ui/src/layout/components/aside/index.vue +++ b/kyuubi-server/web-ui/src/layout/components/aside/index.vue @@ -18,8 +18,9 @@ @@ -37,6 +38,11 @@ const { isCollapse } = storeToRefs(store) const router = useRoute() const activePath = ref(router.path) + /* eslint-disable */ + // define __APP_VERSION__ in vite.config.ts + // @ts-ignore + const title = `${__APP_VERSION__}` + /* eslint-enable */