GitHub Actions - Azure Function Apps zip deployment - ERROR: 'str' object has no attribute 'value'

Published Nov 03 2021 02:36 PM 3,394 Views
Occasional Contributor

Panic stations! My GitHub Action workflows are breaking!

 

A recent release has been causing a lot of frustration so this is a quick post to hopefully broadcast a temporary workaround.

 

The error is with Azure Function App zip deployment.

 

 

 

az functionapp deployment source config-zip

 

 

 

 

The workaround is to downgrade the cli version to 2.28.0. This slows down the pipeline considerably, but works. You can see the impact to my workflow below:

JeffreyChilberto_0-1635974669325.png

The yaml will remove the current version and install 2.28.0 and is shown below.

 

 

 

 

      - name: Install az 2.28.0
        shell: powershell
        run: |
          (Get-WmiObject Win32_Product -Filter "Caption='Microsoft Azure CLI'").Uninstall()
          Install-Binary -Url "https://azcliprod.blob.core.windows.net/msi/azure-cli-2.28.0.msi" -Name "azure-cli.msi" -ArgumentList ("/qn", "/norestart")

 

 

 

 

 

The real credit for this workaround goes to the GitHub community. Hard to say who suggested the workaround first.

Issues · Azure/azure-cli (github.com)
Unable to zip deploy a function app in the Azure Cloud Shell (version 2.29.0) · Issue #19954 · Azure...

This post will hopefully save someone out there frustration until the fix is available. 

 

Cheers!

 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2923718%22%20slang%3D%22en-US%22%3EGitHub%20Actions%20-%20Azure%20Function%20Apps%20zip%20deployment%20-%20ERROR%3A%20'str'%20object%20has%20no%20attribute%20'value'%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2923718%22%20slang%3D%22en-US%22%3E%3CP%3EPanic%20stations!%20My%20GitHub%20Action%20workflows%20are%20breaking!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20recent%20release%20has%20been%20causing%20a%20lot%20of%20frustration%20so%20this%20is%20a%20quick%20post%20to%20hopefully%20broadcast%20a%20temporary%20workaround.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20error%20is%20with%20Azure%20Function%20App%20zip%20deployment.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3Eaz%20functionapp%20deployment%20source%20config-zip%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20workaround%20is%20to%20downgrade%20the%20cli%20version%20to%202.28.0.%20This%20slows%20down%20the%20pipeline%20considerably%2C%20but%20works.%20You%20can%20see%20the%20impact%20to%20my%20workflow%20below%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JeffreyChilberto_0-1635974669325.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F324060i83EB072ADFCF35C9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22JeffreyChilberto_0-1635974669325.png%22%20alt%3D%22JeffreyChilberto_0-1635974669325.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20yaml%20will%20remove%20the%20current%20version%20and%20install%202.28.0%20and%20is%20shown%20below.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-yaml%22%3E%3CCODE%3E%20%20%20%20%20%20-%20name%3A%20Install%20az%202.28.0%0A%20%20%20%20%20%20%20%20shell%3A%20powershell%0A%20%20%20%20%20%20%20%20run%3A%20%7C%0A%20%20%20%20%20%20%20%20%20%20(Get-WmiObject%20Win32_Product%20-Filter%20%22Caption%3D'Microsoft%20Azure%20CLI'%22).Uninstall()%0A%20%20%20%20%20%20%20%20%20%20Install-Binary%20-Url%20%22https%3A%2F%2Fazcliprod.blob.core.windows.net%2Fmsi%2Fazure-cli-2.28.0.msi%22%20-Name%20%22azure-cli.msi%22%20-ArgumentList%20(%22%2Fqn%22%2C%20%22%2Fnorestart%22)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20real%20credit%20for%20this%20workaround%20goes%20to%20the%20GitHub%20community.%20Hard%20to%20say%20who%20suggested%20the%20workaround%20first.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fissues%3Fpage%3D2%26amp%3Bq%3Dis%253Aissue%2Bis%253Aopen%2BERROR%253A%2B%2527str%2527%2Bobject%2Bhas%2Bno%2Battribute%2B%2527value%2527%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EIssues%20%C2%B7%20Azure%2Fazure-cli%20(github.com)%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazure-cli%2Fissues%2F19954%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EUnable%20to%20zip%20deploy%20a%20function%20app%20in%20the%20Azure%20Cloud%20Shell%20(version%202.29.0)%20%C2%B7%20Issue%20%2319954%20%C2%B7%20Azure%2Fazure-cli%20(github.com)%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3EThis%20post%20will%20hopefully%20save%20someone%20out%20there%20frustration%20until%20the%20fix%20is%20available.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECheers!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2923718%22%20slang%3D%22en-US%22%3E%3CP%3EA%20recent%20change%20has%20caused%20a%20lot%20of%20frustration%20with%20Azure%20Function%20App%20zip%20deployment%3A%20az%20functionapp%20deployment%20source%20config-zip.%20This%20article%20provides%20a%20temporary%20workaround%20until%20a%20fix%20is%20available.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2923718%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EApp%20Service%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFunctions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EServerless%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETips%20and%20tricks%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Nov 03 2021 02:36 PM
Updated by: