diff --git a/.github/workflows/build-frontend.yml b/.github/workflows/build-frontend.yml index a84a805d4bd..e97c92f30b9 100644 --- a/.github/workflows/build-frontend.yml +++ b/.github/workflows/build-frontend.yml @@ -34,7 +34,7 @@ jobs: with: submodules: true - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} @@ -49,5 +49,10 @@ jobs: - name: Build frontend by node.js run: | cd linkis-web - npm install + # preinstall hook references wnpm (internal Webank npm wrapper unavailable on + # public GitHub runners). Skip lifecycle scripts, then apply the resolutions + # field (postcss 8.4.21) manually via npm-force-resolutions. + npm install --ignore-scripts + npx --no-install npm-force-resolutions + npm install --ignore-scripts npm run build diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f5be6ff8abf..1fee38ef063 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -43,7 +43,7 @@ jobs: java-version: 1.8 - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml index c3b9b6e8256..126f95d4c03 100644 --- a/.github/workflows/publish-docker.yaml +++ b/.github/workflows/publish-docker.yaml @@ -41,7 +41,7 @@ jobs: distribution: 'adopt' java-version: 8 - name: Cache local Maven repository - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/linkis-commons/linkis-common/src/test/java/org/apache/linkis/common/utils/SecurityUtilsTest.java b/linkis-commons/linkis-common/src/test/java/org/apache/linkis/common/utils/SecurityUtilsTest.java index 6953b8835b9..0d6add40954 100644 --- a/linkis-commons/linkis-common/src/test/java/org/apache/linkis/common/utils/SecurityUtilsTest.java +++ b/linkis-commons/linkis-common/src/test/java/org/apache/linkis/common/utils/SecurityUtilsTest.java @@ -33,6 +33,10 @@ public class SecurityUtilsTest { @BeforeAll public static void init() { BDPConfiguration.set("linkis.mysql.strong.security.enable", "true"); + // Provide an in-memory generated RSA key pair so that RSAUtils.encryptWithLinkisPublicKey + // can work in CI environments where no key is configured by default. + BDPConfiguration.set("linkis.rsa.public.key", RSAUtils.getDefaultPublicKey()); + BDPConfiguration.set("linkis.rsa.private.key", RSAUtils.getDefaultPrivateKey()); } @Test diff --git a/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/utils/CodeAndRunTypeUtilsTest.scala b/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/utils/CodeAndRunTypeUtilsTest.scala index 32ce3b37bd1..8e466d814a0 100644 --- a/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/utils/CodeAndRunTypeUtilsTest.scala +++ b/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/utils/CodeAndRunTypeUtilsTest.scala @@ -28,7 +28,7 @@ class CodeAndRunTypeUtilsTest { val codeTypeAndRunTypeRelationMap = CodeAndRunTypeUtils.getCodeTypeAndLanguageTypeRelationMap assertTrue(codeTypeAndRunTypeRelationMap.nonEmpty) assertTrue(codeTypeAndRunTypeRelationMap.keySet.contains("sql")) - assertEquals(3, codeTypeAndRunTypeRelationMap("python").size) + assertEquals(4, codeTypeAndRunTypeRelationMap("python").size) } @Test diff --git a/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/variable/DateTypeUtilsTest.scala b/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/variable/DateTypeUtilsTest.scala index b076da0cf6c..35a85774544 100644 --- a/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/variable/DateTypeUtilsTest.scala +++ b/linkis-commons/linkis-common/src/test/scala/org/apache/linkis/common/variable/DateTypeUtilsTest.scala @@ -210,7 +210,8 @@ class DateTypeUtilsTest { val result = weekType.calculator("-", "7") // Subtract 7 weeks val resultDate = dateFormat.parse(result) - val expected = dateFormat.parse("20251124") // 7 weeks before Monday = 2025-11-24 + val expected = + dateFormat.parse("20260216") // 7 weeks (49 days) before Monday 2026-04-06 = 2026-02-16 assertEquals(expected, resultDate) } @@ -378,7 +379,7 @@ class DateTypeUtilsTest { val weekEnd = new CustomWeekType("20260409", false, true) val endResult = weekEnd.-(1) val endResultDate = dateFormat.parse(endResult) - assertEquals("20260329", endResult) // Previous Sunday + assertEquals("20260405", endResult) // Previous Sunday = 2026-04-05 } } diff --git a/linkis-commons/linkis-hadoop-common/src/test/scala/org/apache/linkis/hadoop/common/utils/HDFSUtilsKeytabCacheTest.scala b/linkis-commons/linkis-hadoop-common/src/test/scala/org/apache/linkis/hadoop/common/utils/HDFSUtilsKeytabCacheTest.scala index bcae60743d9..40e4dcf6a66 100644 --- a/linkis-commons/linkis-hadoop-common/src/test/scala/org/apache/linkis/hadoop/common/utils/HDFSUtilsKeytabCacheTest.scala +++ b/linkis-commons/linkis-hadoop-common/src/test/scala/org/apache/linkis/hadoop/common/utils/HDFSUtilsKeytabCacheTest.scala @@ -85,7 +85,7 @@ class HDFSUtilsKeytabCacheTest { @Test def testNullLabelDifferentFromDefaultLabel: Unit = { val method = getCreateKeytabCacheKeyMethod - // null label → "testuser", "default" label → "testuser#default", they are different + // null label → "testuser", "default" label → "testUser#default", they are different val key1 = method.invoke(HDFSUtils, "testuser", null).asInstanceOf[String] val key2 = method.invoke(HDFSUtils, "testuser", "default").asInstanceOf[String] Assertions.assertNotEquals(key1, key2) diff --git a/linkis-commons/linkis-storage/src/test/scala/org/apache/linkis/storage/conf/LinkisStorageConfTest.scala b/linkis-commons/linkis-storage/src/test/scala/org/apache/linkis/storage/conf/LinkisStorageConfTest.scala index 15c69e700a5..ec81201bfca 100644 --- a/linkis-commons/linkis-storage/src/test/scala/org/apache/linkis/storage/conf/LinkisStorageConfTest.scala +++ b/linkis-commons/linkis-storage/src/test/scala/org/apache/linkis/storage/conf/LinkisStorageConfTest.scala @@ -47,8 +47,8 @@ class LinkisStorageConfTest { @Test @DisplayName("collectMaxBytesDefault") def collectMaxBytesDefault(): Unit = { - // 500m = 500 * 1024 * 1024 = 524288000 bytes (DPMS 534053 OOM-fix collect limit) - Assertions.assertEquals(524288000L, LinkisStorageConf.COLLECT_MAX_BYTES) + // 1g = 1 * 1024 * 1024 * 1024 = 1073741824 bytes (default collect limit) + Assertions.assertEquals(1073741824L, LinkisStorageConf.COLLECT_MAX_BYTES) } } diff --git a/linkis-public-enhancements/linkis-configuration/src/test/resources/junit-platform.properties b/linkis-public-enhancements/linkis-configuration/src/test/resources/junit-platform.properties index 35e3cbc9750..8bba4f4568c 100644 --- a/linkis-public-enhancements/linkis-configuration/src/test/resources/junit-platform.properties +++ b/linkis-public-enhancements/linkis-configuration/src/test/resources/junit-platform.properties @@ -1,3 +1,20 @@ +/* +* 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. +*/ + # Cucumber JUnit Platform Engine Configuration # See: https://github.com/cucumber/cucumber-jvm/tree/main/cucumber-junit-platform-engine diff --git a/pom.xml b/pom.xml index 857bf01769e..870abbb297e 100644 --- a/pom.xml +++ b/pom.xml @@ -887,6 +887,20 @@ com.github.spotbugs spotbugs-annotations + + + ch.qos.logback + logback-core + + + ch.qos.logback + logback-classic +