mengw15 opened a new issue, #9047: URL: https://github.com/apache/texera/issues/9047
### Task Summary Part of #5363. Prerequisite for #8995. result-service (#8995) needs four pieces that live in amber today, and amber keeps using all of them. None depends on anything amber-specific, so they move into common modules that both can depend on, the way `ComputingUnitAccess` already lives in `common/auth`. | Piece | Today | Moves to | Depends on | |---|---|---|---| | Workflow access checks (`hasReadAccess`, `hasWriteAccess`, `getPrivilege`, `hasGrantedAccess`, `isPublic`) | companion object of `WorkflowAccessResource` | `common/auth`, next to `ComputingUnitAccess` | `common/dao` | | Result URI lookups (`getResultUrisByExecutionId`, `getResultUriByLogicalPortId`) | companion object of `WorkflowExecutionsResource` | `common/workflow-core` | `common/dao`, `VFSURIFactory` | | `WarehouseReadGuard` and `WarehouseUnavailableException` | `amber`, `web/service` | `common/workflow-core` | `VFSURIFactory`, `StorageConfig` | | `convertTuplesToJson` and the binary-preview helpers it uses | `ExecutionResultService` | `common/workflow-core` | `Tuple`, `AttributeType`, `JSONUtils` | The REST resources stay in amber; only these functions move, and amber's callers import them from their new locations. Behaviour is unchanged. Tests of the moved functions move with them; tests that exercise them through amber's resources stay where they are. `convertTuplesToJson` needs a single home for a second reason: the CU's pushed visualization snapshots and result-service's pages have to render tuples identically. **Out of scope.** Folding workflow access into `common/resource`'s `ResourceAccess`, which expects the owner on the resource's own row; a workflow's owner is in `workflow_of_user`, so that would be a behaviour change rather than a move. The notebook service's own write-access check also stays as is, since it deliberately ignores public visibility. ### Task Type - [x] Refactor / Cleanup - [ ] DevOps / Deployment / CI - [ ] Testing / QA - [ ] Documentation - [ ] Performance - [ ] Other -- 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]
