Repository navigation
Open the create load balancer dialog with a workload chosen - #1800
Merged
Merged
Conversation
The compute plugin's "Add to a load balancer" links to /project/:id/alb?action=create&workload=<name>. The ALB page now waits for its create-permission check before reading the link: the check reads false until it answers, so the parameter was being dropped before the dialog could open. With `workload`, the dialog opens on Datum compute with that workload's service chosen, its port too when it has only one, and the display name set to the workload's name. The service list is refetched first, since the plugin may have just made the service. A workload with no service says so instead of leaving the picker silently empty. The choice goes through each select's own form control, a tick after render, because the port select remounts when the workload changes and a value set in that same commit never reaches the form.
4 of 5 tasks
🧪 Test Summary
Need another run? Use Re-run failed jobs: one shard costs a few minutes, the whole workflow about 26. |
scotwells
approved these changes
Nov 6, 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.
The compute plugin's workload Overview now has an "Add to a load balancer" button (datum-cloud/compute#627). It links to
/project/:id/alb?action=create&workload=<name>. This makes that link open the new load balancer dialog with the workload already chosen.The dialog now opens from the link
The ALB page read
?action=createon its first render, before its create-permission check had answered. While the check loads,useResourcePermissionsreportscanCreateas false. The page deleted the parameter without opening anything, so the dialog usually didn't open from a link at all. The page now waits for the check to finish before reading or clearing the parameter.It opens with the workload chosen
With
&workload=<name>, the dialog:Why the selection is set the way it is
Form.useFieldcontrol on the same field never reaches the select, because Conform keeps a separate value per control.Test plan
serviceForWorkloadunit tests (vitest), andapp/features/edgetests passworkload-service-fields.cy.tsx) covers four cases: the workload and its only port are chosen; a workload with several ports gets only the workload; an outdated cached list is refetched; a workload with no service gets the notecpu-mem-waveopens the dialog with it chosen