Azure / Azure/azure-cli

az functionapp deployment source config-zip - does not deploy .zip as expected

Open
#32,128 7 comments 3 reactions 4 assignees Claimed by @kamperiadis View on GitHub
act-observability-squad Auto-Assign bug customer-reported Functions Possible-Solution Service Attention Similar-Issue
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

We've been using az functionapp deployment source config-zip to deploy our Azure functions to linux successfully for a year.

On the weekend when the Azure Function was deployed it was no longer finding any of our routes.

When I investigated further it was because the .zip file parameter (--src) was no longer using the contents of the specified .zip file. Instead it seemed to be writing the .zip filename string as txt in the .zip file and then that was the uploaded code. (So ya, no routes).

e.g. az functionapp deployment source config-zip --src ./someapp.zip

Instead of using the contents of the someapp.zip file it uploads a file named someapp.zip with ./someapp.zip echoed in its contents.

This was in production, so not a very ideal behavior to have all our function routes disappear.

The only way I could fix it was to hardcode a previous az cli version and run that through the github actions pipeline.

### Related command

az functionapp deployment source config-zip --src ./nolongerworks.zip

### Errors

No errors, it acts like everything is fine, but your Azure Function is dead in the water with no routes, paths etc.

### Issue script & Debug output

--debug

### Expected behavior

It should deploy as expected.

### Environment Summary

2.77.0 - latest version that would be deployed in github actions.

### Additional context

Should likely be fixed quickly before it impacts other customers too.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.