The GitHub Actions job "Required Checks" on texera.git/gh-readonly-queue/main/pr-7760-25b208388100c49280eb6511f50c330db7b711aa has succeeded. Run started by GitHub user aicam (triggered by aicam).
Head commit for run: 4842e93f2d274399eb9baa9594d3f231b00ec519 / Tanishq Gandhi <[email protected]> refactor(file-service): share the dataset access and naming rules (#7760) ### What changes were proposed in this PR? Datasets and models need the same three rules: who owns a resource, who it is shared with, and whether a name is already taken. Today those rules live inside the dataset code, so adding models means copying them. This PR moves them into one shared implementation and points datasets at it. Since jOOQ generates an unrelated class per table, there is no common parent to inherit from — instead a small descriptor says which columns to look at, and the shared code works off that. The same duplication sat one layer down: `DatasetFileDocument` and `ModelFileDocument` each existed only to supply a presign-download URL, since the read logic was already shared in `LakeFSFileDocument`. That class now takes the resource type and works out its own endpoint, so both subclasses are deleted and one document class serves every resource type. `DatasetFileDocument`'s only other method deleted files from the pre-LakeFS local git store, which nothing reaches any more. No behaviour change for datasets, apart from one fix: `GET /access/dataset/owner/{did}` and `GET /access/dataset/list/{did}` had no authorization, so any signed-in user could read any dataset's owner email and full share list. Both now require read access. Anyone who could already see the dataset is unaffected. ### Any related issues, documentation, discussions? Prepares the shared layer for #6498 (umbrella #6494). ### How was this PR tested? The existing dataset suites are the regression evidence, since this changes how the dataset code is wired without changing what it does: - `sbt "FileService/test"` — 236/236, including `DatasetResourceSpec` (118) - `sbt "WorkflowCore/test"` — 773/773 - `scalafmtCheckAll` and `scalafixAll --check` clean `DatasetAccessResourceSpec` gains tests for the two guards. One existing expectation changed: a nonexistent id returned an empty string and now returns 403. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5) --------- Co-authored-by: Claude Opus 5 <[email protected]> Report URL: https://github.com/apache/texera/actions/runs/32423066153 With regards, GitHub Actions via GitBox
