Add workload delete to the compute portal plugin - #359
Merged
Merged
Conversation
The workload detail header gets a Delete button that opens a type-DELETE confirmation, matching the portal's other delete dialogs. Deleting the Workload removes what the compute controllers made for it, but not the ALB (HTTPProxy and the NetworkService behind it) or the Network. The dialog lists those as opt-in checkboxes. Anything shared with another workload, or that the user can't delete, is disabled with a reason. The workload is deleted first, so a refused delete touches nothing else. The Delete button is hidden when a delete SelfSubjectAccessReview on workloads fails, following cloud-portal's RBAC conventions. Confirming goes straight back to the workload list, where the workload's card and table row show a Deleting badge until it's gone. The plugin also invalidates cloud-portal's http-proxies, network-services and compute-workloads caches so the ALB pages refetch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mattdjenkinson
requested review from
0xmc,
kevwilliams,
savme and
scotwells
September 24, 2026 11:32
savme
previously approved these changes
Sep 25, 2026
mattdjenkinson
enabled auto-merge
September 25, 2026 11:21
mattdjenkinson
added a commit
to datum-cloud/cloud-portal
that referenced
this pull request
Sep 25, 2026
Related to #1566. Pairs with datum-cloud/compute#359, which adds the delete. The compute plugin can now delete a workload and keep its ALB. That ALB still has a NetworkService backend that selects the workload by name, so the overview carried on saying "Serving traffic normally" and linked to a workload page that 404s. The Backend pool card had no edit button for compute backends, so there was no way to fix it from the portal. `useResolvedComputeWorkload` now reads the workload as well, through the compute SDK in a new `resources/compute-workloads` module. It sets `workloadMissing` on a 404 or when the workload is already terminating. A 403 or any other error leaves the page alone, because we can't tell whether the workload exists. When the workload is missing: - The health strip headline becomes "No backend available", with "Workload `<name>` was deleted. Redeploy it to reconnect." The "View workload" chip is replaced by a "Set origin" link to the Configuration tab. - The endpoints and origins cards call the backend "Compute workload not found" and drop the link. - The Backend pool card shows a "Set origin" button. It opens the existing origin dialog, and saving replaces the NetworkService backend (the update adapter already lets an explicit endpoint win over it). The link waits for the lookup, so a dead "View workload" doesn't flash in first. Redeploying a workload with the same name reconnects the ALB on its own, which is why the copy mentions that before anything else. <img width="1624" height="1061" alt="Screenshot 2026-09-24 at 12 16 38" src="https://github.com/user-attachments/assets/20934b07-2da1-4652-a737-52d31da8d434" />
# Conflicts: # ui/consumer/src/components/workload-page-chrome.tsx # ui/consumer/src/pages/workload-detail.tsx
ecv
approved these changes
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes datum-cloud/cloud-portal#1566. Pairs with datum-cloud/cloud-portal#1585.
You can now delete a workload from its detail page. There's a Delete button next to the health badge in the header. It opens a confirmation where you type
DELETE, the same as other deletes in the portal.What gets deleted
Deleting the Workload already removes everything the compute controllers created for it: deployments, instances, interface claims and bindings. It doesn't remove the ALB (the HTTPProxy plus the NetworkService behind it) or the Network, because nothing owns those. The dialog lists them as checkboxes, unchecked by default.
The workload is deleted first, so a refused delete leaves everything else alone. Next come the ticked ALBs and their NetworkServices; a service that an ALB you're keeping still uses is left in place. Networks go last. If an ALB or Network fails to delete, a warning toast names it.
Permissions
The Delete button is hidden when a
deleteSelfSubjectAccessReview onworkloadsfails, following cloud-portal's RBAC conventions (delete is hidden, not disabled). The host's RBAC hooks aren't available to plugins, so the plugin sends four SSARs per page through the control-plane proxy.After confirming
The page goes straight back to the workload list and the deletes finish in the background. The workload's card and table row show a Deleting badge with a spinner until it's gone. The plugin also invalidates cloud-portal's
http-proxies,network-servicesandcompute-workloadsquery caches, so the ALB pages refetch when you open them.compute-workloadsis new in cloud-portal#1585. Those key names are copied from the host, and there's a comment inapi.tspointing at them.Screen.Recording.2026-09-24.at.12.25.55.mov