Azure-sdk-for-go: in v24 SDK actiongroups 2018-03-01 API is incorrectly using unsupported 2018-09-01 API

Created on 29 Dec 2018  路  5Comments  路  Source: Azure/azure-sdk-for-go

Bug Report

  • import path of package in question, e.g. .../services/compute/mgmt/2018-06-01/compute
    github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights

  • SDK version e.g. master, latest, 18.1.0
    v24.0.0

  • output of go version
    go version go1.11.2 darwin/amd64

  • What happened?
    After upgrading from v21 of the SDK to v24 calls to the actiongroups API are now failing with a NoRegisteredProviderFound error message:
[16:40:43] kt@snowbook:~/hashi/..3../terraform-providers/terraform-provider-azurerm鈻竏ep/sdk-24$ testazure TestAccAzureRMMonitorActionGroup_basic
==> Fixing source code with gofmt...
gofmt -s -w ./azurerm
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -test.run=TestAccAzureRMMonitorActionGroup_basic -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN   TestAccAzureRMMonitorActionGroup_basic
=== PAUSE TestAccAzureRMMonitorActionGroup_basic
=== CONT  TestAccAzureRMMonitorActionGroup_basic
--- FAIL: TestAccAzureRMMonitorActionGroup_basic (69.08s)
    testing.go:538: Step 0 error: Error applying: 1 error(s) occurred:

        * azurerm_monitor_action_group.test: 1 error(s) occurred:

        * azurerm_monitor_action_group.test: Error creating or updating action group "acctestActionGroup-7732576599503615295" (resource group "acctestRG-7732576599503615295"): insights.ActionGroupsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="NoRegisteredProviderFound" Message="No registered resource provider found for location 'global' and API version '2018-09-01' for type 'actiongroups'. The supported api-versions are '2017-03-01-preview, 2017-04-01, 2018-03-01'. The supported locations are 'global'."
FAIL
FAIL    github.com/terraform-providers/terraform-provider-azurerm/azurerm   71.362s
make: *** [testacc] Error 1

yet we are not using the 2018-09-01 API.

  • What did you expect or want to happen?
    a successful API call

  • How can we reproduce it?
    run the action group acc tests from this PR

Most helpful comment

Can confirm the 2018-03-01 api works now 馃檪 Thank you!!

All 5 comments

Hi @katbyte it seems that the service owner updated the sdk packages to refer the new API version for that specific package. We're reaching to see why was that

@vladbarosan FYI I've opened a meta issue on the Swagger repo since this feels like API definitions should only call API versions <= their publish date?

@tombuildsstuff AFAIK there is no hard rule for that. I checked the ARM resource registrations and the main issue seems to be that the ActionGroup resource has not been enabled for the 2018-09-01 api version. Will update when this is resolved

@katbyte @tombuildsstuff according to the service provider this should now be fixed. Can either of you verify it's working?

Can confirm the 2018-03-01 api works now 馃檪 Thank you!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tirke picture Tirke  路  3Comments

StrongMonkey picture StrongMonkey  路  4Comments

salameer picture salameer  路  5Comments

drosseau picture drosseau  路  4Comments

BrendanThompson picture BrendanThompson  路  3Comments