Skip to content

fix(api): preserve automatic networking on legacy instance updates #3592

Description

@chet

Instance updates from clients that still send the deprecated InstanceNetworkConfig.auto field should keep working when Core already has the instance's auto_config. Today the allocation path translates that legacy field but the update path does not, so Core can mistake an omitted replacement field for a request to change immutable network configuration.

What this involves

  • Teach update_instance_config to preserve the stored auto_config only for a legacy auto=true request that omits auto_config, before the RPC request is converted into InstanceConfig.
  • Use the instance's existing configuration as the source of truth instead of looking the VPC back up through its HostInband network segment; Flat segments are allowed to be unbound.
  • Keep explicit requests and the existing immutability checks authoritative -- don't overwrite a supplied auto_config, enable automatic networking on a non-auto instance, or accept explicit interfaces alongside legacy automatic networking.
  • Add regression coverage for the compatible update and rejection cases, including an instance whose Flat segment has no VPC binding.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

No fields configured for Bug.

Projects

Status
Verify

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions