Handle nullable arrays#283
Merged
Merged
Conversation
sudomateo
approved these changes
Apr 17, 2025
Collaborator
There was a problem hiding this comment.
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
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
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.
I think this should fix #282
I'm a little concerned about any repercussions with
VpcFirewallRuleFilterWDYT @sudomateo ?