Skip to content

Instance create: fix for disk size updating on image tab switch - #3394

Merged
david-crespo merged 1 commit into
mainfrom
boot-disk-size
Sep 30, 2026
Merged

david-crespo merged 1 commit into
mainfrom
boot-disk-size

Conversation

@david-crespo

Copy link
Copy Markdown
Collaborator

Noticed while working on #3391. When you switch from project images to silo images (or vice versa), the disk size value is now updated to fit the disk from the tab you're landing on. Before it was checked against the image from the previous tab.

@vercel

vercel Bot commented Sep 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Sep 30, 2026 10:04pm UTC

Request Review


// back on the project tab, image-3 is still selected and 2 GiB is too small
await page.getByRole('tab', { name: 'Project images' }).click()
await expect(diskSizeInput).toHaveValue('10')

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the fix, this fails because the disk size stays on 2.

@david-crespo
david-crespo merged commit 4f1ba37 into main Sep 30, 2026
7 checks passed
@david-crespo
david-crespo deleted the boot-disk-size branch September 30, 2026 22:47
david-crespo added a commit that referenced this pull request Oct 1, 2026
Like #3394, pulled out of my work on #3391.

Without this, if you submit the disk create form with a size too small
for the selected source, and then switch to a smaller source that fits,
the "Must be as large as selected…" error stays up until you edit the
size again. Adding `deps="size"` to both source pickers revalidates the
size whenever the source changes. `deps` is confusingly named because it
makes it sounds like source depends on size, but the
[docs](https://react-hook-form.com/docs/useform/register) for deps say:

> When this field's own validation runs (e.g. via its registered
onChange/onBlur), the fields listed in deps will also be re-validated.

This branch was successfully deployed

1 active deployment
Preview — 04e2e8c0 Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant