Skip to content

Fix support for deeply nested oneOfs; group nested oneOf options on help pages #785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

lgarber-akamai
Copy link
Contributor

@lgarber-akamai lgarber-akamai commented Jun 9, 2025

📝 Description

This pull request resolves a regression that occurred in v5.58.0 alongside the Linode Interfaces release, where the arguments used to specify nested config interface arguments (e.g. --interfaces.purpose) disappeared. This was partially the result of an issue with the spec and partially an issue with how the CLI parses nested oneOfs.

NOTE: This PR will be marked as do-not-merge until the corresponding change has been released in the OpenAPI spec.

NOTE: Because the CLI does not currently support rendering options on nested fields on help pages, the help page ouput is a bit difficult to parse. We should resolve this in a follow-up ticket.

✔️ How to Test

The following test steps assume you have pulled down this PR locally and run the following:

# Installing the CLI using a patched spec since the change hasn't yet been released
make install SPEC=https://gist.githubusercontent.com/lgarber-akamai/90ca1fb91b901e4f9b0de0550c13d83f/raw/2133d538be913c8c900fd49d7fb393f7e30eb9ec/openapi.json

Integration Testing

make test-int

Unit Testing

make test-unit

Manual Testing

  1. Run the following command to create a VPC and subnet:
linode-cli vpcs create --json \
  --label test-vpc \
  --region us-mia \
  --subnets.label my-subnet \
  --subnets.ipv4 '10.0.0.0/24'
  1. Run the following command to create an instance with a complex VPC and public interface configuration. Be sure to replace MY_SUBNET_ID with the ID of the subnet created above:
linode-cli linodes create \
  --type g6-nanode-1 --region us-mia \
  --image linode/ubuntu24.04 \
  --root_pass 'myp4ssw0rd!!!1!!11!!!11!!!!' \
  --interfaces.purpose vpc \
  --interfaces.primary true \
  --interfaces.subnet_id MY_SUBNET_ID \
  --interfaces.ipv4.nat_1_1 any \
  --interfaces.ipv4.vpc '10.0.0.5' \
  --interfaces.ip_ranges '["10.0.0.6/32"]' \
  --interfaces.purpose public
  1. Ensure the instance with the given interface configuration was created successfully.

@lgarber-akamai lgarber-akamai added bugfix for any bug fixes in the changelog. new-feature for new features in the changelog. labels Jun 9, 2025
@lgarber-akamai lgarber-akamai force-pushed the fix/deeply-nested-oneOfs branch from be0421d to 25d4024 Compare June 13, 2025 15:41
@lgarber-akamai lgarber-akamai changed the title fix: Add support for deeply nested oneOfs; group nested oneOf options on help pages Add support for deeply nested oneOfs; group nested oneOf options on help pages Jun 13, 2025
@lgarber-akamai lgarber-akamai added do-not-merge PRs that should not be merged until the commented issue is resolved and removed new-feature for new features in the changelog. labels Jun 13, 2025
@lgarber-akamai lgarber-akamai changed the title Add support for deeply nested oneOfs; group nested oneOf options on help pages Fix support for deeply nested oneOfs; group nested oneOf options on help pages Jun 13, 2025
@lgarber-akamai lgarber-akamai marked this pull request as ready for review June 13, 2025 16:04
@lgarber-akamai lgarber-akamai requested a review from a team as a code owner June 13, 2025 16:04
@lgarber-akamai lgarber-akamai requested review from ykim-akamai and yec-akamai and removed request for a team June 13, 2025 16:04
@lgarber-akamai lgarber-akamai force-pushed the fix/deeply-nested-oneOfs branch from 12d8ce6 to 23cab4e Compare June 13, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix for any bug fixes in the changelog. do-not-merge PRs that should not be merged until the commented issue is resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant