The GitHub Actions job "Benchmarks" on texera.git/main has succeeded. Run started by GitHub user github-merge-queue[bot] (triggered by github-merge-queue[bot]).
Head commit for run: e4c442029d3a3fd87f1021ca902d4e522721fb74 / Tanishq Gandhi <[email protected]> fix(workflow, hub): treat a workflow's owner as WRITE wherever access is read (#9190) ### What changes were proposed in this PR? Workflows took the owner's privilege from their `workflow_user_access` row alone. If that row was missing or downgraded, the owner lost access to their own workflow, or it was hidden from them. This makes workflows match datasets, models and computing units (#8890): the owner is always WRITE. - **Access checks**: `WorkflowAccessResource.getPrivilege` reads the caller's own owner row and access row in one query (so a workflow with several owners still yields one row) and returns WRITE for the owner (via `OwnerAccess.privilege`). `hasReadAccess`, `hasWriteAccess`, `hasGrantedAccess` and sharing all go through it. - **Search and the workflow list**: these include owned workflows, not only ones with an access row, and report the owner as WRITE. For #8576's pinned copies, the owner counts as granted, so they always see their own live name and description, never the pinned ones. - **Owned-or-granted ids**: the new `WorkflowAccessResource.accessibleWids(uid)` is the single source for the ID and owner filters, the quota page and the admin executions page. Each of these used to read the access table alone. - **Hub**: `baseWorkflowSelect(uid)` joins only the viewer's access row, the same as the dataset/model hub fix in #8890. A workflow shared with several users now gives one card with the viewer's own level, instead of duplicates or someone else's level. ### Any related issues, documentation, discussions? Closes #9150. Follow-up to #8890. ### How was this PR tested? New tests: - `WorkflowAccessResourceSpec`: the owner is WRITE with no access row, and with a READ row. A workflow with several owner rows doesn't fail the check. `accessibleWids` lists owned and granted workflows once each. - `WorkflowResourceSpec`: after the owner's access row is deleted, they still see the workflow as WRITE in the list, search, the ID and owner filters, and when opening it. - `HubResourceSpec`: a workflow shared with two other users gives one entry with the viewer's own level (NONE for an ungranted or anonymous viewer). The owner without an access row gets WRITE. - `UserQuotaResourceSpec`, `AdminUserResourceSpec`, `AdminExecutionResourceSpec`: an owner without an access row still gets their workflow listed or marked accessible. - `WorkflowSearchQueryBuilderSpec`: the owner is WRITE whatever their access row says, and sees their live name rather than the pinned one. An anonymous viewer of a workflow with no owner row is not mistaken for the owner. Three existing tests assumed the old behaviour and were updated. One asserted NONE for an owner without an access row, which is the bug this PR fixes. The other two read the privilege as the owner, so they now read it as a non-owner. With the main-code changes reverted, the 6 new owner and hub tests fail. The affected amber specs pass (373), and `scalafmtCheckAll` and `scalafixAll --check` are clean. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) Report URL: https://github.com/apache/texera/actions/runs/40643699141 With regards, GitHub Actions via GitBox
