Skip to content
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

platform/api/azure: Switch gallery API version to 2022-08-03 #520

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

jepio
Copy link
Member

@jepio jepio commented Apr 5, 2024

Followup for: #517
I tested that PR with an externally created gallery, and didn't test the gallery creation itself, so I missed this detail.

Surprisingly API version 2022-08-01 does not exist for the galleries resource provider. The SDK uses 2022-01-01 even when we import 2022-08-01. Since we use an ARM template for gallery creation, we have to manually select the correct api version, otherwise gallery creation fails.

The error I get is:

2024-04-05T12:27:49Z ore/azure: Couldn't create gallery image: Code="DeploymentFailed" Message="At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details." Details=[{"code":"BadRequest","message":"{\r\n "error": {\r\n "code": "NoRegisteredProviderFound",\r\n "message": "No registered resource provider found for location 'eastus' and API version '2022-08-01' for type 'galleries'. The supported api-versions are '2018-06-01, 2019-03-01, 2019-07-01, 2019-12-01, 2020-09-30, 2021-03-01, 2021-07-01, 2021-10-01, 2022-01-03, 2022-03-03, 2022-08-03, 2023-07-03'. The supported locations are 'westcentralus, southcentralus, eastus2, southeastasia, westeurope, westus, eastus, canadacentral, northeurope, northcentralus, brazilsouth, ukwest, westindia, eastasia, australiaeast, japaneast, koreasouth, westus2, canadaeast, uksouth, centralindia, southindia, australiasoutheast, japanwest, koreacentral, francecentral, centralus, australiacentral, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, norwayeast, jioindiawest, westus3, swedencentral, qatarcentral, polandcentral, italynorth, israelcentral, eastus2euap, centraluseuap'."\r\n }\r\n}"}]

Surprisingly API version 2022-08-01 does not exist for the galleries
resource provider. The SDK uses 2022-01-01 even when we import
2022-08-01. Since we use an ARM template for gallery creation, we have
to manually select the correct api version, otherwise gallery creation
fails.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
@jepio jepio requested a review from krnowak April 5, 2024 12:46
@krnowak
Copy link
Member

krnowak commented Apr 5, 2024

Maybe it will be useful to eventually port the template to code to avoid issues like that.

@jepio
Copy link
Member Author

jepio commented Apr 8, 2024

Maybe it will be useful to eventually port the template to code to avoid issues like that.

True. Originally it was done this way because the Azure Go SDK didn't support passing "architecture" yet, and the ARM template allowed us to bypass the SDK.

@jepio jepio merged commit 6d3d3e3 into flatcar-master Apr 8, 2024
3 checks passed
@jepio jepio deleted the fix-azure-gallery branch April 8, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants