azure-sdk-for-go: Version v40.0.0 doesn't build

Hello,

I’m using the subscriptions and graphrbac packages. It appears that version v40.0.0 broke something such that these no longer build properly. I tried every version of the subscriptions package in case some were deprecated, but all failed with the same error. This looks like a problem with go-autorest, perhaps the packages depend on different versions?

# github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/operations.go:98:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/operations.go:98:15: client.Send undefined (type OperationsClient has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go:103:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go:103:15: client.Send undefined (type Client has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go:171:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go:171:15: client.Send undefined (type Client has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go:282:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/subscriptions.go:282:15: client.Send undefined (type Client has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/tenants.go:98:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/tenants.go:98:15: client.Send undefined (type TenantsClient has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-06-01/subscriptions/tenants.go:98:2: too many errors
# github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:114:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:114:15: client.Send undefined (type ApplicationsClient has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:194:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:194:15: client.Send undefined (type ApplicationsClient has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:268:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:268:15: client.Send undefined (type ApplicationsClient has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:341:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:341:15: client.Send undefined (type ApplicationsClient has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:415:2: not enough arguments to return
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:415:15: client.Send undefined (type ApplicationsClient has no field or method Send)
../vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go:415:2: too many errors

I downgraded my repo back to v30.0.0 and this works fine. It’s only a problem with v40.0.0

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 18 (9 by maintainers)

Most upvoted comments

In case anyone is looking for a quick fix - go get -u github.com/Azure/go-autorest/autorest worked for me.

I see. I was following the example here https://github.com/gruntwork-io/terratest/blob/master/test/terraform_azure_example_test.go when I got the error mentioned at the top of this issue.

Will look into autorest then.

Hmm there’s no version of go-autorest mentioned. You will need it at some point for authentication (maybe you haven’t got that far yet). If you use at minimum autorest/v0.9.6 then it will work.