hashicorp/go-azure-sdk

`automation/runbooks`: Polling does not support `text/plain` content-type

wuxu92 opened this issue · 2 comments

wuxu92 commented

I got below error message when upgrade Automation to a new-base-layer sdk 2022-08-01

        Error: publishing the updated Runbook (Subscription: "85b3dbca-5974-4067-9669-67a141095a76"
        Resource Group Name: "acctestRG-auto-230712153741092695"
        Automation Account Name: "acctest-230712153741092695"
        Runbook Name: "Get-AzureVMTutorial"): polling after Publish: internal-error: polling support for the Content-Type "text/plain; charset=utf-8" was not implemented: <nil>

the Polling request reponse as below:

GET https://management.azure.com/subscriptions/85b3dbca-5974-4067-9669-67a141095a76/resourceGroups/acctestRG-auto-230712153741092695/providers/Microsoft.Automation/automationAccounts/acctest-230712153741092695/runbooks/Get-AzureVMTutorial/operationResults/a1fbe767-b0ab-4080-9fc1-b1dfcb0daf9a?api-version=2022-08-08 HTTP/2.0

HTTP/2.0 200 
cache-control: no-cache
pragma: no-cache
content-type: text/plain; charset=utf-8
expires: -1
x-ms-request-id: a3fa6a46-0912-4570-8f2c-d5f01cd686b3
x-ms-ratelimit-remaining-subscription-reads: 11997
server: Microsoft-HTTPAPI/2.0
x-ms-correlation-request-id: e34e9de4-dc7e-363c-a90b-28d553ab1f84
x-ms-routing-request-id: EASTASIA:20230712T073836Z:f8393181-0bc1-472f-a6e1-6c3200f4f14a
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
date: Wed, 12 Jul 2023 07:38:35 GMT
content-length: 0

@wuxu92 Without a structured response having a provisioningState or equivalent, how can we check that the operation has completed?

wuxu92 commented

@manicminer I'm not familar with this but the old sdk with autorest won't raise such error message (I am not sure if autorest sdk treate this API as a LRO I may have a look later)