azure-service-operator icon indicating copy to clipboard operation
azure-service-operator copied to clipboard

Feature: Support for renaming of properties between versions

Open theunrepentantgeek opened this issue 4 years ago • 3 comments

Define the required YAML format for capturing renaming vs end-of-life for properties and integrate that into the generation process for the conversion routines.

Prerequisites: Azure/k8s-infra#353 & Azure/k8s-infra#354

theunrepentantgeek avatar Dec 14 '20 22:12 theunrepentantgeek

@theunrepentantgeek will take a look at this

matthchr avatar Jun 27 '22 23:06 matthchr

From the Versioning spec:

External Metadata for common changes We’ll capture common changes between versions in metadata (likely a YAML file) that we bundle with the code generator, allowing it to handle a wider range of scenarios.

If a property is renamed in a particular API version, conversion from the prior API version to that point of change will instead match based on the new name of the property on the storage type.

There are more than 40 cases of properties being renamed across versions of the ARM API.

theunrepentantgeek avatar Jun 28 '22 00:06 theunrepentantgeek

Based on the current state of the generator, the solution should contain the following:

When a property exists in one version of a resource, but not in the immediately following version (as defined by our storage conversion graph), check our configuration for that property.

  • If a new name is configured for that property, use that for any conversions.
  • If the property is configured as not-existing in the next version, default to the current behaviour (using the property bag)
  • If no configuration is found, create an error (aborting the generator); use the TypoAdvisor to suggest the closest available match in the next version (as most property renames are pretty simple).

theunrepentantgeek avatar Jun 28 '22 00:06 theunrepentantgeek

We'd like to be able to deal with this with config but haven't gotten around to it yet.

matthchr avatar Nov 07 '22 23:11 matthchr

This is something we still need to be able to deal with. It hasn't come up yet but it may at any time.

matthchr avatar May 01 '23 22:05 matthchr

Still something we want.

theunrepentantgeek avatar Aug 07 '23 23:08 theunrepentantgeek

This is still something we're interested in

matthchr avatar Nov 27 '23 23:11 matthchr