Skip to content

Conversation

@david-crespo
Copy link
Collaborator

Doing it properly this time.

oxidecomputer/oxide.ts#300

@vercel
Copy link

vercel bot commented Aug 15, 2025

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

Project Deployment Preview Updated (UTC)
console Ready Ready Preview Aug 15, 2025 11:19pm

// out not to match the real API, which ignores primary: false.
// https://github.com/oxidecomputer/omicron/blob/61ad056c/nexus/db-queries/src/db/datastore/network_interface.rs?plain=1#L804-L808

if (typeof body.primary === 'boolean' && body.primary && !nic.primary) {
Copy link
Collaborator Author

@david-crespo david-crespo Aug 15, 2025

Choose a reason for hiding this comment

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

These tests were failing:

e2ec instance-networking -g 'NIC table' && e2ec instance-networking -g 'Transit IPs'

https://zod.dev/v4/changelog?id=defaults-applied-within-optional-fields

The above change means that primary: SafeBoolean.default(false) is putting primary: false on the body, where in v3 it was just left out. That was tripping the "I refuse to unset the primary" logic below. The default comes from here in omicron and has been there for three years.

},
{
id: '7fc6ca11-452e-d3e4-9e1c-752ff615abea',
id: '75832119-7d9b-4e91-a7c6-76b996b69aaa',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Turns out this was an invalid UUID, correctly rejected by Zod because of the d in d3e4, which is supposed to be a 4 for UUID v4. Solved this on the last attempt, see #2828 (comment).

@david-crespo david-crespo marked this pull request as ready for review August 15, 2025 23:16
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.

2 participants