Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/build-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

}
Original file line number Diff line number Diff line change
@@ -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

Expand Down
14 changes: 14 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,20 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
</exclusion>
<!--
Exclude Logback so it does not clash with log4j-slf4j-impl declared by
linkis-common. Without this, Spring Boot fails to load its application
context during tests ("LoggerFactory is not a Logback LoggerContext but
Logback is on the classpath").
-->
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down
Loading