mengw15 opened a new pull request, #9219: URL: https://github.com/apache/texera/pull/9219
### What changes were proposed in this PR? Moves four helpers that result-service (#8995) needs out of amber, into common modules both can depend on. The code moves verbatim and amber's callers import it from the new places, so behaviour is unchanged. | Helper | From (amber) | To | |---|---|---| | Workflow access checks: `hasReadAccess`, `hasWriteAccess`, `getPrivilege`, `isOwner`, `accessibleWids`, `hasGrantedAccess`, `isPublic` | `WorkflowAccessResource`'s companion | `common/auth`: `WorkflowAccess`, next to `ComputingUnitAccess` | | Result URI lookups: `getResultUrisByExecutionId`, `getResultUriByLogicalPortId` | `WorkflowExecutionsResource`'s companion | `common/workflow-core`: `ExecutionResultUris` | | `WarehouseReadGuard` and `WarehouseUnavailableException` | `web/service` | `common/workflow-core`, next to `VFSURIFactory` | | `convertTuplesToJson` and its binary-preview helpers | `ExecutionResultService` | `common/workflow-core`: `TupleUtils`, next to `tuple2json` | `isOwner` and `accessibleWids` were not in the issue's list; they move too so the access checks stay in one place. No `build.sbt` change: `common/auth` already depends on `common/dao`, and `common/workflow-core` on `common/dao` and `common/config`. ### Any related issues, documentation, discussions? Closes #9047. Part of #5363; prerequisite for #8995. ### How was this PR tested? - Every moved function is byte-identical to its original; `WarehouseReadGuard` differs only in its package line. - Tests of the moved functions moved with them: 5 into a new `WorkflowAccessSpec`, 3 into a new `ExecutionResultUrisSpec`, 14 into `TupleUtilsSpec`, and `WarehouseReadGuardSpec` whole. - Coverage is measured per module, so `WorkflowAccessSpec` adds two cases for `hasReadAccess`, `isPublic` and `isOwner`, which only amber's resource tests reached before. - `Auth/test` and the moved `WorkflowCore` specs pass; amber's `org.apache.texera.web.*` specs fail on the same 8 local-environment cases as main, and no others. - `scalafmtCheck` and `scalafix --check` pass for the three modules. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-5-5) -- 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]
