Skip to content

tools/version-bumper: support for detecting older/unused API Versions of Resource Manager APIs #3679

@tombuildsstuff

Description

@tombuildsstuff

At this point in time the version-bumper tool automatically detects new (Stable) API Versions of Resource Manager APIs as they become available - meaning that a PR is sent to propose adding support for this new API Version (example).

Similarly, when a new API Version is added to Pandora and makes its way through hashicorp/go-azure-sdk - there’s automation which updates hashicorp/terraform-provider-azurerm to use this new API Version, assuming the payloads are compatible (and thus the provider compiles).

As such whilst we’re currently adding new API versions - we’re needing to go through and manually clean up the older ones.


Rather than doing this by hand, we could update the Version Bumper so that it detects which API Versions are currently used in both:

  • hashicorp/terraform-provider-azurerm
  • hashicorp/packer-plugin-azure
  • tombuildsstuff/azurerm-dalek

And if these aren’t used (and are older than what’s currently vendored) - we could remove these from the list of supported API versions.

This would mean that Pandora would be able to both detect new API Versions as they become available - and remove older API Versions as they’re no longer needed - removing this overhead.


Whilst this is a fairly low priority feature request, some APIs release more frequently than others - meaning that we end up keeping older versions around. That’s less of an issue for smaller services, but more of an issue for the larger ones - particularly RecoveryServices (for which we currently import 10 different versions), Network (for which we currently import 4 different versions) and Compute (for which we currently import 7 different versions).

In some cases (e.g. Compute) not all functionality is available in all API versions, but that requires context/manual investigation to ascertain/know which API Versions are fine to remove - as such whilst this is a low priority feature request, there’s benefit to having this automated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions