Skip to content

Handle nullable arrays#283

Merged
karencfv merged 2 commits into
oxidecomputer:mainfrom
karencfv:fix-nullable-arrays
Apr 21, 2025
Merged

Handle nullable arrays#283
karencfv merged 2 commits into
oxidecomputer:mainfrom
karencfv:fix-nullable-arrays

Conversation

@karencfv

Copy link
Copy Markdown
Contributor

I think this should fix #282

I'm a little concerned about any repercussions with VpcFirewallRuleFilter WDYT @sudomateo ?

@karencfv karencfv requested a review from sudomateo April 17, 2025 05:54

@sudomateo sudomateo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm a little concerned about any repercussions with VpcFirewallRuleFilter WDYT @sudomateo ?

I'm okay with the changes for VpcFirewallRuleFilter since the upstream API has all those arrays as nullable: https://github.com/oxidecomputer/omicron/blob/610011e3bc5f9c5ba054d5cd24fcc63e7ffc8e20/openapi/nexus.json#L24235-L24267

We should definitely follow up in omicron and see whether the remaining nullable array fields should be changed to non-nullable. Either way though I'm cool with merging this. Thank you for working on it!

@karencfv karencfv merged commit 719d3ae into oxidecomputer:main Apr 21, 2025
@karencfv karencfv deleted the fix-nullable-arrays branch April 21, 2025 20:50
karencfv added a commit to oxidecomputer/omicron that referenced this pull request May 18, 2025
…8175)

In our attempt to make the Go SDK generator less hacky
oxidecomputer/oxide.go#283, we had the
unexpected side effect of breaking our `VpcFirewallRuleUpdateParams`
struct
https://github.com/oxidecomputer/oxide.go/pull/283/files#diff-841a2b1b5f072b633551cac9c34c9732a722b415e297a1530b92d5988962062eR6810-R6811
due to Go's fun way of handling empty values. Using this API no longer
allows us to delete the entirety of the firewall rules.

This commit sets an empty array as the default for `rules` following the
pattern that other APIs use.

https://github.com/oxidecomputer/omicron/blob/main/nexus/types/src/external_api/params.rs#L1163-L1177

cc @sudomateo
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.

400 status code when creating an instance with null anti_affinity_groups

2 participants