azure-sdk-for-go: Http 400 Preflight validation check error `the operation failed or was cancelled` needs detailed message
Bug Report
- import path of package in question: preflight validate
- SDK version:
armresources,latest,1.2.0 - output of
go version:go1.22.1 windows/amd64
I’m testing preflight validation function with an unsupported location (e.g australiacentral) for todo-nodejs-mongo-aks. The error message is the operation failed or was cancelled. The error message should provide a detailed message on why it is failing.
I debugged and this is the error message that got skipped: The template deployment '****' is not valid according to the validation procedure. The tracking id is '****'. See inner errors for details. Preflight validation check for resource(s) for container service *** in resource group ****** failed. Message: Virtual Machine size: '' is not supported for subscription ***** in location 'australiacentral'. Please refer to aka.ms/aks/vm-size-selector to find supported VM sizes in location 'australiacentral'. This message is necessary for users to debug and should be provided in error message.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 19 (10 by maintainers)
I can add some debugging notes here since I was fortunate enough to be present with @hemarina at the time, but I do believe this is a bug in the Swagger spec that is used to generate
deployment_clients.go.Here’s the execution flow we observed:
httpResp, nilinstead ofnil, err.In summary, the bug observed by the user is:
deployments/validate, the errorthe operation failed or was cancelledis returned instead of the expectedazcore.ResponseError.We are also happy to provide a minimal repro setup, but it boils down to calling deploymentsClient.BeginValidate with parameters that will result in an ARM 400 response.