Repository navigation
feat(gui): add full computing unit tab - #4331
Conversation
|
@gracecluvohio Let's use "Compute" instead of "Computing Units" on the navigation bar. |
|
@kunwp1 Please review it. |
|
@gracecluvohio Since this is part 3 of the computing unit tab, can it be reviewed independently, or should I wait for the first two PRs to be merged? |
You should probably wait for the first two PRs to be merged. Each PR adds commits on top of the others, so there will be less files to review (and less conflicts) if earlier PRs are reviewed and merged before later ones. |
|
Thanks! Then I will wait until the two PRs are merged. |
|
@kunwp1 The PR is ready for review now, please take a look when you have time. Thank you! |
There was a problem hiding this comment.
Pull request overview
This PR completes the Dashboard “Computing Unit” tab feature set by adding UI flows for listing computing units, creating new units (Kubernetes/local), terminating units, and viewing unit details/metrics. It’s part 3/3 of the broader computing unit dashboard work (related to #3691) and closes #3690.
Changes:
- Implemented computing unit create + terminate flows in the dashboard computing unit section (including resource selection controls).
- Added a new computing-unit list-item component to render per-unit status/metrics and open a details modal.
- Introduced shared frontend utilities for computing-unit metadata rendering and resource parsing/conversion.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.ts | Adds computing unit data loading + create/terminate logic and form state for the create modal. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.html | Renders computing unit list and the “Create Computing Unit” modal UI. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.scss | Styles for create modal controls (CPU/memory/GPU/JVM/shm). |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit.component.spec.ts | Updates unit test providers/mocking for the expanded component dependencies. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.ts | New component implementing per-unit rename, metrics calculations, and details modal open. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.html | New template for list-item card, metrics popover, and delete action. |
| frontend/src/app/dashboard/component/user/user-computing-unit/user-computing-unit-list-item/user-computing-unit-list-item.component.scss | Styling for the new list-item component layout and metrics. |
| frontend/src/app/dashboard/component/dashboard.component.html | Renames the sidebar label from “Computing Units” to “Compute”. |
| frontend/src/app/common/util/computing-unit.util.ts | Adds shared helpers for metadata table rendering and resource parsing/conversion. |
| frontend/src/app/app.module.ts | Registers the new list-item component in the app module declarations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
As I work on this, I notice a lot of shared services (such as However, as they are used by both the workflow computing unit component (in the I'll work on this later in a separate PR though, so that there aren't too many files in this PR. |
|
@kunwp1 Please do the merge when it's ready. |
<!-- Thanks for sending a pull request (PR)! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) 2. Ensure you have added or run the appropriate tests for your PR 3. If the PR is work in progress, mark it a draft on GitHub. 4. Please write your PR title to summarize what this PR proposes, we are following Conventional Commits style for PR titles as well. 5. Be sure to keep the PR description updated to reflect all changes. --> ### What changes were proposed in this PR? <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes. Here are some tips for you: 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. 3. If it is a refactoring, clarify what has been changed. 3. It would be helpful to include a before-and-after comparison using screenshots or GIFs. 4. Please consider writing useful notes for better and faster reviews. --> This PR adds the rest of the features to create a new computing unit tab, including creating and deleting computing units and viewing computing unit details. It is part 3 of 3 of PR apache#3691. #### Demonstration: Creating a new computing unit: https://github.com/user-attachments/assets/33676e94-996b-47d4-b8df-3f3ec6156846 Deleting a computing unit: https://github.com/user-attachments/assets/36539b51-7531-4c7d-95c4-4a25d50c1ae9 Viewing computing unit details: https://github.com/user-attachments/assets/0d837ffd-1258-4f77-8b0b-8ec99ad3e5d3 ### Any related issues, documentation, discussions? <!-- Please use this section to link other resources if not mentioned already. 1. If this PR fixes an issue, please include `Fixes apache#1234`, `Resolves apache#1234` or `Closes apache#1234`. If it is only related, simply mention the issue number. 2. If there is design documentation, please add the link. 3. If there is a discussion in the mailing list, please add the link. --> Closes apache#3690 ### How was this PR tested? <!-- If tests were added, say they were added here. Or simply mention that if the PR is tested with existing test cases. Make sure to include/update test cases that check the changes thoroughly including negative and positive cases if possible. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. --> Tested locally ### Was this PR authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this PR, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> No --------- Signed-off-by: Grace Chia <[email protected]> Co-authored-by: Chen Li <[email protected]> Co-authored-by: Kunwoo (Chris) <[email protected]>
<!-- Thanks for sending a pull request (PR)! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) 2. Ensure you have added or run the appropriate tests for your PR 3. If the PR is work in progress, mark it a draft on GitHub. 4. Please write your PR title to summarize what this PR proposes, we are following Conventional Commits style for PR titles as well. 5. Be sure to keep the PR description updated to reflect all changes. --> ### What changes were proposed in this PR? <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes. Here are some tips for you: 1. If you propose a new API, clarify the use case for a new API. 2. If you fix a bug, you can clarify why it is a bug. 3. If it is a refactoring, clarify what has been changed. 3. It would be helpful to include a before-and-after comparison using screenshots or GIFs. 4. Please consider writing useful notes for better and faster reviews. --> This PR adds the rest of the features to create a new computing unit tab, including creating and deleting computing units and viewing computing unit details. It is part 3 of 3 of PR apache#3691. #### Demonstration: Creating a new computing unit: https://github.com/user-attachments/assets/33676e94-996b-47d4-b8df-3f3ec6156846 Deleting a computing unit: https://github.com/user-attachments/assets/36539b51-7531-4c7d-95c4-4a25d50c1ae9 Viewing computing unit details: https://github.com/user-attachments/assets/0d837ffd-1258-4f77-8b0b-8ec99ad3e5d3 ### Any related issues, documentation, discussions? <!-- Please use this section to link other resources if not mentioned already. 1. If this PR fixes an issue, please include `Fixes apache#1234`, `Resolves apache#1234` or `Closes apache#1234`. If it is only related, simply mention the issue number. 2. If there is design documentation, please add the link. 3. If there is a discussion in the mailing list, please add the link. --> Closes apache#3690 ### How was this PR tested? <!-- If tests were added, say they were added here. Or simply mention that if the PR is tested with existing test cases. Make sure to include/update test cases that check the changes thoroughly including negative and positive cases if possible. If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future. If tests were not added, please describe why they were not added and/or why it was difficult to add. --> Tested locally ### Was this PR authored or co-authored using generative AI tooling? <!-- If generative AI tooling has been used in the process of authoring this PR, please include the phrase: 'Generated-by: ' followed by the name of the tool and its version. If no, write 'No'. Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details. --> No --------- Signed-off-by: Grace Chia <[email protected]> Co-authored-by: Chen Li <[email protected]> Co-authored-by: Kunwoo (Chris) <[email protected]>
…e#8827) ### What changes were proposed in this PR? Removes two leftovers from `ComputingUnitCreateModalComponent`. **−2 lines.** There is no behaviour change. - `<ng-template #addComputeUnitModalTitle>`. The modal's title comes from `[nzTitle]="getCreateModalTitle()"`. Nothing else reads the template: there is no `@ViewChild`, no outlet, and neither of the two hosts that open the modal passes it. `nz-modal` only picks up its title/content/footer directives, never a plain `#ref` template. - The `selectedShmSize` field. The create payload builds `shmSize` from `shmSizeValue` / `shmSizeUnit`, which stay. ### History | | | | --- | --- | | **Introduced by** | apache#3315 (2025-03-13), "Add computing unit manager frontend": the title template. apache#3451 (2025-05-28), "Enable adjusting shared memory for the computing unit": `selectedShmSize` | | **Usage removed by** | apache#3400 (2025-05-26) switched the title to `getCreateModalTitle()`. apache#4331 (2026-04-09), "add full computing unit tab", dropped the field's last write and read. apache#6082 later moved both, still unread, into this shared component | The title template has been unused for sixteen months, and the field for six. ### Any related issues, documentation, discussions? Closes apache#8826 ### How was this PR tested? No new tests; no spec referenced either item. From `frontend/`: - `npx ng test --watch=false --include='**/computing-unit-create-modal.component.spec.ts' --include='**/user-computing-unit.component.spec.ts' --include='**/computing-unit-selection.component.spec.ts'`: 3 files, 248 tests, all pass. The other two specs cover the modal's two hosts. - `yarn format:ci`: clean. - `npx ng build`: success. To re-check: ``` git grep -n "addComputeUnitModalTitle\|selectedShmSize" -- frontend # no hits ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
### What changes were proposed in this PR? Remove redundant code from the frontend, the licensing scripts, two Scala sources and the agent service (**+26/−41 lines**). There is no behavior change. - **Dataset and model detail pages:** each `route.params` emission was switched to `this.route.data`, and the empty `.subscribe()` threw away what that emitted. The pages now `tap` the params, so the same fetches run in the same order without the extra subscription. The dataset page's `THROTTLE_TIME_MS` also becomes file-local: `workspace.component.ts` and the hub spec import the copy in `hub-workflow-detail.component.ts`, never this one. - **Version uploader:** the abort handler's 404 branch called `done()` and returned, which is what the handler already does for every error it does not retry. Its three constants become file-local: nothing imported `FINISHED_TASK_HIDE_DELAY_MS`, and only the spec imported the other two. The spec now states the retry policy it expects. - **Computing-unit actions:** `confirmAndTerminate` reads `unit.computingUnit.uri` and `unit.computingUnit.name` before `unit?.computingUnit.type`, so the `?.` goes. - **Loop blocks:** `LOOP_END_OP_TYPE` becomes file-local. Only its spec imported it, and the spec now checks the backend's `"LoopEnd"` name directly. - **Agent interaction:** two imports from `agent.service` become one. - **Licensing scripts:** `audit_jar_licenses.py` stored each group's notice hash in a field that nothing reads, and the NOTICE test helper `make_jar` had an `extra` parameter that no caller passes. - **`PveResource`:** drops `import javax.ws.rs.DELETE` and `import javax.ws.rs.PathParam`, which `import javax.ws.rs._` already covers. - **`SQLSourceOpExec` and `AsterixDBSourceOpExec`:** five fallback arms list `BOOLEAN`, `STRING` and `ANY` before a trailing `_`, as in `case AttributeType.BOOLEAN | AttributeType.STRING | AttributeType.ANY | _`. The `_` matches those types as well, so each becomes `case _`. - **`agent-service/.dockerignore`:** Docker reads the ignore file at the root of the build context. CI's image matrix (`build-and-push-images.yml`) and `bin/build-images.sh` both use the repository root as the context, and the agent Dockerfile copies `agent-service/...` paths from there, so the root `.dockerignore` applies and this file is never read. | Event | PR / Commit | | --- | --- | | Introduced by | Dataset and model detail: apache#2413 (2024-02-26), apache#3269 (2025-02-19), apache#8072 (2026-08-28); version uploader: apache#4136 (2026-01-05), moved by apache#8078 (2026-08-31); computing-unit actions: apache#4331 (2026-04-09); loop blocks: apache#8640 (2026-10-24); agent interaction: apache#6009 (2026-11-13); licensing scripts: apache#4387 (2026-04-29), apache#5417 (2026-06-10); `PveResource`: apache#5035 (2026-05-13); `SQLSourceOpExec`: apache#1013 (2021-02-11); `AsterixDBSourceOpExec`: apache#1044 (2021-02-25); `agent-service/.dockerignore`: apache#4495 (2026-04-28) | | Usage removed by | `agent-service/.dockerignore`: apache#4544 (2026-05-01) added the agent image's Dockerfile with paths from the repository root, so no build has read the file. Everything else: unused or redundant since introduction. | As of 2026-11-25: - The SQL sources' fallback arms have listed redundant types for over 5 years. - The dataset page's discarded subscription is almost 3 years old. - The version uploader's 404 branch has been redundant for over 10 months. - `agent-service/.dockerignore` has gone unread for almost 7 months. - The duplicate agent import is 12 days old. ### Any related issues, documentation, discussions? Closes apache#9691. ### How was this PR tested? Ran on this branch and on `main` at `afc2b3db7a` (Windows 11; Node 24 with Yarn 4.14.1; Python 3.12 with pytest 9.0.3 and CI's pinned `ruff` 0.14.7; JDK 17): ```bash cd frontend npx ng test --watch=false --include='**/dataset-detail.component.spec.ts' --include='**/model-detail.component.spec.ts' --include='**/version-uploader.component.spec.ts' --include='**/computing-unit-actions.service.spec.ts' --include='**/loop-block.util.spec.ts' --include='**/agent-interaction.component.spec.ts' npx tsc --noEmit -p src/tsconfig.app.json npx tsc --noEmit -p src/tsconfig.spec.json yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src) yarn eslint $(git diff --name-only --relative origin/main -- src) cd .. pytest bin/licensing ruff check bin/licensing/audit_jar_licenses.py bin/licensing/test_generate_notice_binary.py python bin/licensing/audit_jar_licenses.py <directory of 60 jars> sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.source.sql.*" "WorkflowExecutionService/testOnly org.apache.texera.web.resource.pythonvirtualenvironment.*" WorkflowOperator/scalafmtCheckAll WorkflowExecutionService/scalafmtCheckAll "WorkflowOperator/scalafixAll --check" "WorkflowExecutionService/scalafixAll --check" ``` - **Frontend:** the six specs run 379 tests, all passing on both sides. Both typechecks, prettier-eslint and ESLint pass. - **Python:** the licensing tests run 53 tests and 5 subtests, all passing on both sides, and Ruff passes. `audit_jar_licenses.py` prints the same report on both sides for 60 jars from the local Coursier cache. - **Scala:** - The 11 `source.sql` suites run 204 tests, all passing on both sides. - The two PVE resource suites run 75 tests on both sides: 74 pass and 1 is canceled. The canceled test needs a file that is not executable, which this Windows filesystem cannot represent. - scalafmt and scalafix pass on both modules. - **`agent-service/.dockerignore`:** no image was built. The build context comes from `context="."` for every `bin/dockerfiles/*.dockerfile` in `build-and-push-images.yml`, and from the `..` that `bin/build-images.sh` passes from `bin/`. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
…9706) ### What changes were proposed in this PR? Remove code that nothing uses, or that repeats what the code next to it already does, from the workflow version service, the versions list, the workspace menu, the dashboard list item, the computing-unit picker and the image build workflow (**+42/−165 lines**). There is no behavior change. - **Version history:** `WorkflowVersionService.displayWorkflowVersions` and its only caller, `MenuComponent.onClickGetAllVersions`, which no template has bound since apache#2500 removed the button's click handler. Their two spec cases go with them. - **Version differences:** `getWorkflowsDifference` loops over a configurable list of element types that has held only `operators` since apache#1503 added it, with an ID-field map that names a type the loop never visits. It now compares operators directly. - The bracket highlighting for links of deleted operators, written twice, becomes one helper. - The versions list's two expand loops, identical but for the value they set, become one. - The unused `Element` and `WorkflowContentKeys` aliases go, and the URL constant that only the spec imported becomes file-local. - **List item:** `ListItemComponent` only ever sets `editingDescription` to false, and its template has had no `#descriptionInput` since apache#4212 replaced the inline editor. The flag, its class binding and style, and the view query go. `CardItemComponent` keeps its own, live copy. - **Computing-unit picker:** three pieces go. - An unused `ShareAccessComponent` import; its dialog left this component in apache#4331. - A doubled `userPackages` assignment. - A `skippedMessages` list that nothing fills, with the block that would print it. - **Image builds:** the AMD64 and ARM64 jobs build inside Docker, so their JDK, sbt launcher and coursier cache setup and their `JAVA_OPTS`/`JVM_OPTS` go. The JOOQ job, which does run sbt, keeps its setup. | Event | PR / Commit | | --- | --- | | Introduced by | Version history: apache#1343 (2021-09-28); version differences: apache#1503 (2022-06-07), the second bracket block apache#5285 (2026-06-05), the versions list apache#1444 (2022-02-15); list item: apache#2819 (2024-09-07); picker: apache#3508 (2025-07-07) and apache#4902 (2026-05-12); image builds: apache#4055 (2025-11-21) | | Usage removed by | Version history: apache#2500 (2024-03-24) removed the button that called it. List item: apache#4212 (2026-02-18) replaced the inline description editor. Picker import: apache#4331 (2026-04-09) moved the share dialog out. Everything else: unused since introduction. | As of 2026-11-25: - The element-type list has held a single type for over 4 years. - The version-history handler has had no caller for over two and a half years. - The image jobs have set up a JDK they never use for a year. - The list item's edit state has been unreachable for 9 months, and the picker's import has been unused for over 7 months. - The skipped-message list has stayed empty for the 6 months since it was added. ### Any related issues, documentation, discussions? Closes apache#9705. ### How was this PR tested? Ran on this branch and on `main` at `fd0e2d5338` (Windows 11; Node 24 with Yarn 4.14.1): ```bash cd frontend npx ng test --watch=false --include='**/workflow-version.service.spec.ts' --include='**/menu.component.spec.ts' --include='**/versions-list.component.spec.ts' --include='**/list-item.component.spec.ts' --include='**/computing-unit-selection.component.spec.ts' npx tsc --noEmit -p src/tsconfig.app.json npx tsc --noEmit -p src/tsconfig.spec.json npx ngc -p src/tsconfig.app.json --noEmit yarn prettier-eslint --list-different $(git diff --name-only --relative origin/main -- src) yarn eslint $(git diff --name-only --relative origin/main -- src | grep -E '\.(ts|html)$') ``` - **Frontend:** the five specs run 478 tests on this branch and 480 on `main`, all passing. The two extra on `main` are the deleted methods' own cases; every other test keeps its name and outcome. Both typechecks, the AOT compile, prettier-eslint and ESLint pass. - **Workflow:** `build-and-push-images.yml` parses, both image jobs keep their Docker steps, and only the JOOQ job sets up a JDK. The image jobs themselves run only after merge. To re-check, both commands return no hits on this branch: ```bash git grep -nwE "displayWorkflowVersions|onClickGetAllVersions|skippedMessages|ELEMENT_TYPES_IN_WORKFLOW_DIFF_CALC|ID_FILED_FOR_ELEMENTS_CONFIG" -- frontend/src git grep -nw editingDescription -- frontend/src/app/dashboard/component/user/list-item/list-item.component.ts frontend/src/app/dashboard/component/user/list-item/list-item.component.html ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
What changes were proposed in this PR?
This PR adds the rest of the features to create a new computing unit tab, including creating and deleting computing units and viewing computing unit details. It is part 3 of 3 of PR #3691.
Demonstration:
Creating a new computing unit:
Screen.Recording.2026-03-29.at.2.50.27.PM.mov
Deleting a computing unit:
Screen.Recording.2026-04-05.at.11.15.21.PM.mov
Viewing computing unit details:
Screen.Recording.2026-04-05.at.11.13.42.PM.mov
Any related issues, documentation, discussions?
Closes #3690
How was this PR tested?
Tested locally
Was this PR authored or co-authored using generative AI tooling?
No