Skip to content

chore: clean up sbt clean compile warnings#5201

Open
kunwp1 wants to merge 1 commit into
apache:mainfrom
kunwp1:chore/fix-sbt-warnings
Open

chore: clean up sbt clean compile warnings#5201
kunwp1 wants to merge 1 commit into
apache:mainfrom
kunwp1:chore/fix-sbt-warnings

Conversation

@kunwp1
Copy link
Copy Markdown
Contributor

@kunwp1 kunwp1 commented May 25, 2026

What changes were proposed in this PR?

Fixes the eight [warn]/deprecation messages emitted by sbt clean compile on JDK 17:

File Warning Fix
common/pybuilder/.../BoundaryValidator.scala outer reference in this type test (×2) Move nested CompileTimeContext / RuntimeContext case classes to the companion object; the path-dependent macro Position becomes a Pos type parameter. Call sites in PythonTemplateBuilder.scala switch from validator.X(...) to BoundaryValidator.X(...).
file-service/.../DatasetFileNodeSerializer.java uses deprecated API Swap scala.collection.JavaConverters.seqAsJavaList for scala.jdk.javaapi.CollectionConverters.asJava.
common/workflow-operator/.../TestOperators.scala MySQLSourceOpDesc deprecated (×2) Delete the unused inMemoryMySQLSourceOpDesc helper and its import (no callers; MySQL source dead since 1.1.0-incubating).
amber/.../ExecutionResultService.scala inferred existential type Add import scala.language.existentials.
amber/.../web/auth/JwtAuth.scala (used in ComputingUnitMaster.scala & TexeraWebApplication.scala) JwtAuth object deprecated (×2) Drop the aspirational @Deprecated on the wrapper. common/auth doesn't depend on Dropwizard, so amber has no replacement to migrate to until that changes. TODO retained on the object with the migration rationale, so the future cleanup is still tracked.

Any related issues, documentation, discussions?

Closes #5200

How was this PR tested?

sbt clean compile on Eclipse Adoptium JDK 17.0.19:

Before:

[warn] BoundaryValidator.scala:78:20: The outer reference in this type test cannot be checked at run time.
[warn] BoundaryValidator.scala:86:20: The outer reference in this type test cannot be checked at run time.
[info] DatasetFileNodeSerializer.java uses or overrides a deprecated API.
[warn] TestOperators.scala:150:6: class MySQLSourceOpDesc in package mysql is deprecated
[warn] TestOperators.scala:151:41: class MySQLSourceOpDesc in package mysql is deprecated
[warn] ExecutionResultService.scala:441:13: inferred existential type ... should be enabled by making the implicit value scala.language.existentials visible.
[warn] ComputingUnitMaster.scala:166:5: object JwtAuth in package auth is deprecated
[warn] TexeraWebApplication.scala:137:5: object JwtAuth in package auth is deprecated

After: zero [warn] lines from sbt clean compile; build still succeeds.

➜  texera git:(main) ✗ sbt clean compile
[info] welcome to sbt 1.12.9 (Eclipse Adoptium Java 17.0.19)
[info] loading settings for project texera-build-build-build from metals.sbt...
[info] loading project definition from /Users/kunwoopark/workspace/fork/texera/project/project/project
[info] loading settings for project texera-build-build from metals.sbt...
[info] loading project definition from /Users/kunwoopark/workspace/fork/texera/project/project
[success] Generated .bloop/texera-build-build.json
[success] Total time: 1 s, completed May 25, 2026, 10:14:37 AM
[info] loading settings for project texera-build from metals.sbt, plugins.sbt...
[info] loading project definition from /Users/kunwoopark/workspace/fork/texera/project
[success] Generated .bloop/texera-build.json
[success] Total time: 0 s, completed May 25, 2026, 10:14:37 AM
[info] loading settings for project TexeraProject from build.sbt...
[info] loading settings for project DAO from build.sbt...
[info] loading settings for project Config from build.sbt...
[info] loading settings for project Auth from build.sbt...
[info] loading settings for project ConfigService from build.sbt...
[info] loading settings for project AccessControlService from build.sbt...
[info] loading settings for project PyBuilder from build.sbt...
[info] loading settings for project WorkflowCore from build.sbt...
[info] loading settings for project ComputingUnitManagingService from build.sbt...
[info] loading settings for project FileService from build.sbt...
[info] loading settings for project WorkflowOperator from build.sbt...
[info] loading settings for project WorkflowCompilingService from build.sbt...
[info] loading settings for project WorkflowExecutionService from build.sbt...
[info] resolving key references (19992 settings) ...
[info] set current project to texera (in build file:/Users/kunwoopark/workspace/fork/texera/)
[info] Executing in batch mode. For better performance use sbt's shell
[success] Total time: 0 s, completed May 25, 2026, 10:14:39 AM
[info] Generating JOOQ classes...
[info] compiling 14 Scala sources to /Users/kunwoopark/workspace/fork/texera/common/config/target/scala-2.13/classes ...
[info] compiling 4 Scala sources and 1 Java source to /Users/kunwoopark/workspace/fork/texera/common/pybuilder/target/scala-2.13/classes ...
[info] JOOQ code generation completed successfully
[info] compiling 2 Scala sources and 164 Java sources to /Users/kunwoopark/workspace/fork/texera/common/dao/target/scala-2.13/classes ...
[info] Compiling 4 protobuf files to /Users/kunwoopark/workspace/fork/texera/common/workflow-core/target/scala-2.13/src_managed/main
[info] compiling 8 Scala sources to /Users/kunwoopark/workspace/fork/texera/common/auth/target/scala-2.13/classes ...
[info] compiling 65 Scala sources and 7 Java sources to /Users/kunwoopark/workspace/fork/texera/common/workflow-core/target/scala-2.13/classes ...
[info] compiling 5 Scala sources to /Users/kunwoopark/workspace/fork/texera/access-control-service/target/scala-2.13/classes ...
[info] compiling 4 Scala sources to /Users/kunwoopark/workspace/fork/texera/config-service/target/scala-2.13/classes ...
[info] Compiling 10 protobuf files to /Users/kunwoopark/workspace/fork/texera/amber/target/scala-2.13/src_managed/main,/Users/kunwoopark/workspace/fork/texera/amber/target/scala-2.13/src_managed/main/fs2-grpc
[info] compiling 7 Scala sources and 1 Java source to /Users/kunwoopark/workspace/fork/texera/file-service/target/scala-2.13/classes ...
[info] compiling 258 Scala sources and 50 Java sources to /Users/kunwoopark/workspace/fork/texera/common/workflow-operator/target/scala-2.13/classes ...
[info] compiling 9 Scala sources to /Users/kunwoopark/workspace/fork/texera/computing-unit-managing-service/target/scala-2.13/classes ...
[info] compiling 8 Scala sources to /Users/kunwoopark/workspace/fork/texera/workflow-compiling-service/target/scala-2.13/classes ...
[info] compiling 334 Scala sources and 1 Java source to /Users/kunwoopark/workspace/fork/texera/amber/target/scala-2.13/classes ...
[success] Total time: 29 s, completed May 25, 2026, 10:15:09 AM

No behavior changes — these are warning cleanups only, so existing test suites cover correctness. No new tests added.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.7)

@github-actions github-actions Bot added engine common platform Non-amber Scala service paths labels May 25, 2026
@kunwp1 kunwp1 requested a review from bobbai00 May 25, 2026 17:24
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 25, 2026

Codecov Report

❌ Patch coverage is 7.69231% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.19%. Comparing base (c435aa7) to head (dab49c1).

Files with missing lines Patch % Lines
...che/texera/amber/pybuilder/BoundaryValidator.scala 0.00% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5201      +/-   ##
============================================
+ Coverage     47.15%   47.19%   +0.04%     
- Complexity     2348     2349       +1     
============================================
  Files          1042     1042              
  Lines         39989    39981       -8     
  Branches       4260     4262       +2     
============================================
+ Hits          18855    18868      +13     
+ Misses        20012    19987      -25     
- Partials       1122     1126       +4     
Flag Coverage Δ *Carryforward flag
access-control-service 39.53% <ø> (ø)
agent-service 33.76% <ø> (ø) Carriedforward from c435aa7
amber 50.34% <0.00%> (-0.03%) ⬇️
computing-unit-managing-service 0.00% <ø> (ø)
config-service 0.00% <ø> (ø)
file-service 37.73% <100.00%> (+5.54%) ⬆️
frontend 37.81% <ø> (ø) Carriedforward from c435aa7
python 90.50% <ø> (ø) Carriedforward from c435aa7
workflow-compiling-service 56.81% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kunwp1 kunwp1 force-pushed the chore/fix-sbt-warnings branch from 325ace2 to 43ae460 Compare May 25, 2026 17:27
Fixes the eight Scala/Java compiler warnings on JDK 17: lift the nested
BoundaryValidator case classes to its companion object, switch the
DatasetFileNodeSerializer to scala.jdk.javaapi.CollectionConverters,
delete the unused inMemoryMySQLSourceOpDesc test helper, add the
scala.language.existentials import in ExecutionResultService, and drop
the aspirational @deprecated marker on the JwtAuth wrapper (no
replacement exists in common/auth yet; TODO retained).

Closes apache#5200
@kunwp1 kunwp1 force-pushed the chore/fix-sbt-warnings branch from 43ae460 to dab49c1 Compare May 25, 2026 17:41
@Yicong-Huang
Copy link
Copy Markdown
Contributor

Could you please also add some tests? just to verify those changes have no behavior changes.

// TODO: move this logic to Auth
@Deprecated
// TODO: move this logic to common/auth once it depends on Dropwizard, so amber
// services can drop the toastshaman dropwizard-auth-jwt filter.
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.

Removing the deprecated is a behavior change. Let's keep the deprecation. It is fine to keep that in warning. The way to remove this warning is to actually remove this code

aggOp
}

def inMemoryMySQLSourceOpDesc(
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.

MySQL exec implementation was disabled due to license issue. We can remove this (used for test) for now. @bobbai00 whats our plan to add mysql back?

gen.writeStartArray();
List<DatasetFileNode> children = value.getChildren();
for (DatasetFileNode child : JavaConverters.seqAsJavaList(children)) {
for (DatasetFileNode child : CollectionConverters.asJava(children)) {
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.

Can we turn this one into an error? So that it can prevent the wrong pattern being introduced again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common engine platform Non-amber Scala service paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up sbt clean compile warnings

3 participants