Ma77Ball opened a new pull request, #5983:
URL: https://github.com/apache/texera/pull/5983

   ### What changes were proposed in this PR?
   - Added `ServiceBootstrap` in `common/auth` with three shared helpers: 
`configure` (YAML env-var substitution + `DefaultScalaModule` registration), 
`initDatabase` (open the SQL connection pool from `StorageConfig`), and 
`configFilePath` (resolve `$TEXERA_HOME/<service>/src/main/resources/<file>`).
   - Migrated all six Dropwizard services (config, access-control, file, 
computing-unit-managing, workflow-compiling, notebook-migration) onto 
`ServiceBootstrap`, removing the duplicated `initialize()` / `initConnection` / 
`main()` boilerplate.
   - Pointed `WorkflowCompilingService` at the shared 
`RequestLoggingFilter.register` instead of its hand-rolled inline servlet 
filter, and `NotebookMigrationService` at the shared `AuthFeatures.register` 
instead of its own identical `registerAuthFeatures`.
   - Added `jackson-module-scala` as a `provided` dependency of `common/auth` 
for `ServiceBootstrap`'s `DefaultScalaModule`.
   ### Any related issues, documentation, discussions?
   Closes: #5982
   ### How was this PR tested?
   - New `ServiceBootstrapSpec`: run `sbt -J-Dnet.bytebuddy.experimental=true 
"Auth/testOnly *ServiceBootstrapSpec"`, expect it to verify `configure` wraps 
the config source provider and registers the Scala module, and that 
`configFilePath` returns an absolute path ending in the conventional 
`<service>/src/main/resources/<file>` suffix.
   - Existing service specs still pass: `sbt "ConfigService/testOnly *RunSpec" 
"AccessControlService/testOnly *RunSpec" "WorkflowCompilingService/testOnly 
*RunSpec" "ComputingUnitManagingService/testOnly *RunSpec" 
"NotebookMigrationService/testOnly *RunSpec"` plus `AuthFeaturesSpec`, 
confirming each service still registers the same resources and auth stack.
   - Compiles clean: `sbt "Auth/compile" "ConfigService/compile" 
"AccessControlService/compile" "FileService/compile" 
"ComputingUnitManagingService/compile" "WorkflowCompilingService/compile" 
"NotebookMigrationService/compile"`.
   - Note: this dev machine runs JDK 25, which Mockito/ByteBuddy and JaCoCo/ASM 
do not yet support, so mock-based specs were run with 
`-J-Dnet.bytebuddy.experimental=true` and `FileServiceRunSpec` could not be 
instrumented locally; all of these run normally on CI's JDK 21.
   ### Was this PR authored or co-authored using generative AI tooling?
   Co-authored with Claude Opus 4.8 in compliance with ASF
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to