Skip to content

[FIX][COMMON][MODULE][EUREKA] Restore master build - #5510

Merged
Alexkun merged 6 commits into
apache:masterfrom
Alexkun:fix-compile
Nov 27, 2026
Merged

Alexkun merged 6 commits into
apache:masterfrom
Alexkun:fix-compile

Conversation

@Alexkun

@Alexkun Alexkun commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Master fails to compile in linkis-module — the nightly "Publish Snapshot" workflow can never
reach the deploy stage (it currently dies at compile, blocking the INFRA-28709
verification). Four Scala compilation errors, two independent defects left
behind by the July/August security hardening series, plus long-standing
spotless-check violations:

  • commit bb26ad3 (2026-07-16) references error-code constant
    CRYPT_KEY_INSECURE in ServerConfiguration.scala:80-81, but no such entry
    exists in LinkisModuleErrorCodeSummary (repo-wide search finds only the
    reference, no definition)
  • commit 41c025d (2026-08-12) uses CommonVars at SecurityFilter.scala:158,164
    without adding the import

Evidence: run https://github.com/apache/linkis/actions/runs/45771756417 and
build-backend (spark-3) on PR #5499 fail with exactly these errors.

Related issues/PRs

Close #5509
Related: INFRA-28709 (Apache Infra ticket, snapshot publish credentials)

Brief change log

  • Add the missing CRYPT_KEY_INSECURE(11036, ...) entry to
    LinkisModuleErrorCodeSummary;
  • Add the missing CommonVars import in SecurityFilter.scala;
  • Apply formatter fixes (google-java-format / scalafmt) across TicketCipher,
    ServerConfiguration, SSOUtils, SecurityFilterTest and
    EurekaSecurityConfig so spotless-check passes again.

Checklist

  • I have read the Contributing Guidelines on pull requests.
  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the Linkis mailing list first)
  • If this is a code change: I have written unit tests to fully verify the new behavior.

…ECURE error code, fix missing import, apply style fixes

Add CRYPT_KEY_INSECURE(11036) to LinkisModuleErrorCodeSummary; referenced by ServerConfiguration.scala since bb26ad3 but never defined
Import CommonVars in SecurityFilter.scala (used since 41c025d without it)
Apply google-java-format / scalafmt fixes across TicketCipher, ServerConfiguration, SSOUtils, SecurityFilterTest and EurekaSecurityConfig so spotless-check passes again
Fixes apache#5509
…stance entries

The 'instance' rows of the datasource-type-key INSERT statements carried
17 values against a 16-column list (one extra NULL), breaking the mysql
script load in CI with ERROR 1136 (first failure reported at line 670).
Remove the extra NULL from all 13 affected rows; a full-file audit now
reports zero column-count mismatches.
linkis-dist hardcoded org.apache.hadoop:hadoop-hdfs-client for the
default Hadoop 2.7.2 profile, but that artifact does not exist on
Maven Central (404), failing the build at linkis-dist with
'Could not resolve dependencies'.

The root pom already provides the hadoop-hdfs-client.artifact
property for this exact purpose (hadoop-hdfs for 2.7.x, switched to
hadoop-hdfs-client by the hadoop-3.3 profiles) and linkis-common uses
it; linkis-dist now follows the same convention.

Verified on Maven Central: hadoop-hdfs:2.7.2 (200),
hadoop-hdfs-client:3.3.4 (200).
'join -t : -o 1.1 2.1' passes 2.1 as a separate argument, so join treats
it as FILE1, known-dependencies.txt as FILE2, and fails with 'unexpected
argument .../current_dependencies.txt found' — the check has been failing
with this script error on every PR. Quote the -o field list so the
format is a single argument and the check can actually run.
…ndencies.txt

With the join invocation fixed, the third-party dependencies check now
actually compares the runtime dependency list against the known list and
reports 48 artifacts introduced on master that were not registered yet
(spring-boot 2.7.18 stack, spring-security 5.7.11, micrometer 1.9.17,
reactor-netty 1.0.39, netty-incubator-quic, libthrift 0.23.0, janino 3.1.10,
httpclient5/httpcore5 5.x, jaxb-runtime 2.3.9, jackson-module-scala 2.15.0,
thymeleaf 3.1.5, tomcat-embed-el 9.0.83, commons-compress 1.26.0).

Regenerated per tool/dependencies/regenerate_konwn_dependencies_txt.sh
(union of the previous list and the current runtime dependency tree, 1165
-> 1213 entries, additions only). All added artifacts are permissively
licensed (Apache-2.0 / BSD-3-Clause / EDL-1.0).
…ndencies.txt

With the join invocation fixed, the third-party dependencies check now
actually compares the runtime dependency list against the known list and
reports 48 artifacts introduced on master that were not registered yet
(spring-boot 2.7.18 stack, spring-security 5.7.11, micrometer 1.9.17,
reactor-netty 1.0.39, netty-incubator-quic, libthrift 0.23.0, janino 3.1.10,
httpclient5/httpcore5 5.x, jaxb-runtime 2.3.9, jackson-module-scala 2.15.0,
thymeleaf 3.1.5, tomcat-embed-el 9.0.83, commons-compress 1.26.0).

Regenerated per tool/dependencies/regenerate_konwn_dependencies_txt.sh
(union of the previous list and the current runtime dependency tree,
1165 -> 1213 entries, additions only). All added artifacts are permissively
licensed (Apache-2.0 / BSD-3-Clause / EDL-1.0).

@Davidhua1996 Davidhua1996 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Alexkun
Alexkun merged commit 2ad5141 into apache:master Nov 27, 2026
10 checks passed
@Alexkun
Alexkun deleted the fix-compile branch November 27, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Master build broken since July: undefined error-code constant and missing import fail linkis-module compilation

2 participants