aglinxinyuan opened a new pull request, #7464: URL: https://github.com/apache/texera/pull/7464
### What changes were proposed in this PR? Removes the deprecated **project** feature from the backend and drops its four tables, completing the removal agreed in #5172. **8 files deleted, 18 edited (+66 / −1955).** | Area | What went | | --- | --- | | REST | `ProjectResource`, `PublicProjectResource`, `ProjectAccessResource` + their three `jersey.register` lines in `TexeraWebApplication` | | Search | `ProjectSearchQueryBuilder`, `PROJECT_RESOURCE_TYPE`, both project arms of `DashboardResource`, and 4 of the 24 `UnifiedResourceSchema` slots | | Workflow coupling | project association on create/duplicate/list, `DashboardWorkflow.projectIDs`, `WorkflowIDs.pid`, `Record10` → `Record9` | | Config | `gui.tabs.projects_enabled` / `GUI_TABS_PROJECTS_ENABLED` | | Schema | 4 tables, plus `sql/updates/32.sql` and its changelog entry | ``` public_project ──────┐ project_user_access ─┼──> project all four dropped workflow_of_project ─┘ ``` `privilege_enum` stays — it is shared with `workflow_user_access`, `dataset_user_access` and `computing_unit_user_access`. **Two behaviour changes reviewers should look at.** Both are non-project code paths that read the project tables today: | Site | Before | After | | --- | --- | --- | | `WorkflowAccessResource.getPrivilege` | falls back to `PROJECT_USER_ACCESS` when there is no direct grant | only a direct `WORKFLOW_USER_ACCESS` grant counts | | `WorkflowSearchQueryBuilder` private-access condition | `WORKFLOW_USER_ACCESS.UID = uid OR PROJECT_USER_ACCESS.UID IS NOT NULL` | `WORKFLOW_USER_ACCESS.UID = uid` | ``` Before: user ─▸ project share ─▸ workflow (readable, appears in search) After: user ─X─ workflow (inaccessible, absent from search) ``` A workflow reachable *only* through a project share becomes inaccessible to that user. That is the intended consequence of dropping the feature — `notebook-migration-service` already documents exactly these post-removal semantics — but it is called out in `32.sql` so operators can copy those grants into `workflow_user_access` before migrating. **jOOQ.** Generated sources are not committed (`common/dao/.gitignore`); `sbt jooqGenerate` reflects the live database. So the DDL change and the Scala change have to land together, and the migration must be applied before regenerating — otherwise the old classes reappear and stale references still compile. `sql/updates/02.sql` is left untouched: it is already applied, and editing it would break its liquibase checksum. `bin/k8s/files/texera_ddl.sql` is a symlink to `sql/texera_ddl.sql`, so the helm chart is covered automatically. ### Any related issues, documentation, discussions? Closes #7461 Removal agreed in #5172; the frontend half is #7460. The two are independent and can merge in either order. ### How was this PR tested? Existing tests. The `/search API` suite in `WorkflowResourceSpec` seeded projects and asserted counts that included them, so those eight tests were rewritten workflow-only with adjusted counts; `UnifiedResourceSchemaSpec`'s pinned projection arity went 24 → 20. ```bash sbt "WorkflowExecutionService/Test/compile" "ConfigService/Test/compile" "DAO/Test/compile" "NotebookMigrationService/Test/compile" sbt scalafmtCheckAll "scalafixAll --check" sbt "WorkflowExecutionService/testOnly *WorkflowResourceSpec *UnifiedResourceSchemaSpec *WorkflowSearchQueryBuilderSpec *HubResourceSpec *DashboardResourceSpec *WorkflowAccessResourceSpec" "ConfigService/testOnly *ConfigResourceSpec *DefaultsConfigSpec" "DAO/test" ``` | Check | Result | | --- | --- | | compile (amber, config-service, dao, notebook-migration) | clean | | `scalafmtCheckAll` + `scalafixAll --check` | clean | | specs | 9 suites, **197 tests passed**, 0 failed | The spec run is the meaningful check on the schema change: `MockTexeraDB` bootstraps embedded Postgres from the **edited** `texera_ddl.sql`, so those 197 tests all ran against a database with no project tables. Any surviving query against a dropped table would have failed there. `MockTexeraDB`'s hard-coded fulltext-index block was updated in lockstep — it referenced `ON project` and would otherwise take out every DAO-backed suite in the repo. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 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]
