Skip to content

[Build] Remove Scala overall regression test and post-migration cleanup - #4471

Merged
wolfboys merged 22 commits into
apache:devfrom
shangeyao:feature/remove-scala-final
Aug 3, 2026
Merged

[Build] Remove Scala overall regression test and post-migration cleanup#4471
wolfboys merged 22 commits into
apache:devfrom
shangeyao:feature/remove-scala-final

Conversation

@shangeyao

Copy link
Copy Markdown
Contributor

Summary

Closes #4470

Regression test results

Check Result
./mvnw spotless:check
./mvnw test -pl streampark-flink-client-core -am ✅ (1 test)
./mvnw clean install -Pfast -DskipTests -pl streampark-console-service -am ✅ (includes Spark modules)

Test plan

  • Spotless / code style
  • Flink client unit tests
  • Backend build (common + flink + spark + console-service)
  • CI Backend-Build / Unit-Test / Code style

Made with Cursor

Flink modules are fully Java after apache#4467; remove the common-scala-bridge
dependency, enumeratum/scalatest test deps, and scala-maven-plugin from
Flink parent, sqlclient, udf, and console-service. Bridge module is
retained for Spark until apache#4453.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add unit tests for AutoCloseUtils, ClientBeanUtils, SubmitRequest, and
ExitSecurityManager. Remove unused FlinkVersion.flinkLibs Scala bridge,
drop unused LoggerSupport from FlinkClient, and minor SubmitRequest tidy.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shangeyao shangeyao changed the title [Build] Remove Scala build toolchain from Flink and Console modules [Build] Remove Scala overall regression test and post-migration cleanup Aug 3, 2026
…tests

Replace printStackTrace and generic RuntimeException wraps with specific
exceptions, null-safe SubmitRequest accessors, FlinkShimsProxy URL helper,
and TrackId validation cleanup. Add ParameterCliTest, TrackIdTest, and
more SqlClient/SubmitRequest coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
shangeyao and others added 14 commits August 3, 2026 09:53
Restore production code from the prior commit and retain focused unit
tests for ParameterCli, TrackId, SqlClient, and SubmitRequest. Complex
deploy-mode and cluster scenarios are deferred to E2E.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore production Sonar improvements (specific exceptions, null-safe
accessors, toUrl helper, lambda cleanup) while keeping unit tests focused
on pure logic; complex deploy scenarios remain deferred to E2E.

Co-authored-by: Cursor <cursoragent@cursor.com>
…figs

Remove @SuppressWarnings and shims-specific sonar-project/.sonarcloud
properties added during Scala-to-Java migration; address deprecations
and unchecked casts directly in shims source instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
Spotless check requires dropping stale Utils imports from TableContext.

Co-authored-by: Cursor <cursoragent@cursor.com>
execute(String) is not part of StreamTableEnvironment in all Flink
versions; keep the method public without @OverRide for compatibility.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix unused parameters, replace generic exceptions, reduce cognitive
complexity, return empty collections, simplify regex matching, and
deduplicate TableExt conversion helpers per SonarCloud dev analysis.

Co-authored-by: Cursor <cursoragent@cursor.com>
Refactor SqlSplitter with QueryExtractor, fix generic type names,
ParameterCli stdout emission, SubmitRequest exceptions, and remaining
Sonar findings from the dev new-code report.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move common TableEnvironment delegates into FlinkTableTrait and
FlinkStreamTableTrait so version-specific TableContext and
StreamTableContext only retain legacy or version-gated APIs.
Refactor FlinkSqlValidator validation flow for lower complexity.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move Schema-based stream-table conversions and version-gated Table API
delegates into FlinkStreamTableTrait and FlinkTableTrait. Reduce
1.15–1.20 context classes to constructors plus version-specific legacy
overrides only where older Flink APIs require them.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use Class.cast in FlinkShimsProxy.getObject and typed FlinkClient
invocations to drop @SuppressWarnings. Fix SqlClient unzip validation,
SubmitRequest exception handling, and FlinkSqlValidator caused-by parsing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace unchecked casts with Class.cast or typed YAML helpers, use
IllegalStateException for operational failures, and document enum constants
to remove @SuppressWarnings suppressions.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Use IllegalStateException with causes for Yarn/K8s deploy and watcher
paths, fix FlinkSql rollback error chaining, and remove unchecked JSON
casts in FlinkApplication via TypeReference.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ties

Use IllegalStateException/IllegalArgumentException with context across common
util classes, refactor StringCastUtils with Class.cast, and align Console
shared infrastructure (Shiro, build task, Throws) for Sonar compliance.

Co-authored-by: Cursor <cursoragent@cursor.com>
shangeyao and others added 5 commits August 3, 2026 11:18


Extract shared Yarn jar upload and K8s Docker build helpers to reduce new-code
duplication below the 3% quality gate, rename pipeline enum constants to
UPPER_CASE, and address SqlSplitter/StringCastUtils Sonar issues.

Co-authored-by: Cursor <cursoragent@cursor.com>
…lication

Hoist Yarn SQL build steps into BuildPipeline, K8s docker/pod-template steps
into AbstractK8sApplicationBuildPipeline, and AppControl factory to bring
new-code duplication below the 3% quality gate threshold.

Co-authored-by: Cursor <cursoragent@cursor.com>
…x Sonar duplication

Consolidate duplicated logic between Flink/Spark entities and build pipeline services so PR apache#4471 can pass the new-code duplication quality gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
… for Sonar

Move shared entity defaults to ApplicationEntitySupport, extract release outcome
and watcher init helpers to bring PR apache#4471 new-code duplication below 3%.

Co-authored-by: Cursor <cursoragent@cursor.com>
… level

Accept Class<?> in cast() so common_2.12 compiles with ConfigOption callers, and keep Flink dependency-merge failures logged at error while Spark stays at warn.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@wolfboys
wolfboys merged commit 7d7d71a into apache:dev Aug 3, 2026
38 checks passed
shangeyao added a commit to shangeyao/streampark that referenced this pull request Aug 3, 2026
Integrate apache#4471 (Remove Scala) while preserving Flink 2.x shims and
no-scala artifact model from PR apache#4419.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Build] Remove Scala overall regression test and post-migration cleanup

2 participants