microsoft / azure-gradle-plugins

Azure Plugins for Gradle
MIT License
45 stars 28 forks source link

Unable to Update Deployment with azureFunctionsDeploy Due to "BlobAlreadyExists" Error #178

Closed varenyavv closed 5 months ago

varenyavv commented 6 months ago

Description: After successfully deploying the initial version of my Java-based Azure Function app, I encountered difficulties updating its deployment with azureFunctionsDeploy. Each attempt resulted in a "BlobAlreadyExists" error. I am using the latest available version of this plugin (v1.15.0).

Details: Despite ensuring that I increase the version of the JAR file generated with every gradle build, it appears that the azureFunctionsPackage task consistently creates the file with the same name. Consequently, when I execute azureFunctionsDeploy for subsequent deployments, I repeatedly encounter the following error:

com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException:` Status code 409... BlobAlreadyExists ...

Workaround: To mitigate this issue, I have resorted to manually deleting the blob from the java-functions-run-from-packages container before executing azureFunctionsDeploy. However, I have been unable to locate any setting within the plugin configuration that allows overwriting existing blobs.

Request for Guidance: Could you please provide guidance on whether I am overlooking any configuration setting or best practice that would enable the plugin to overwrite existing blobs during deployment?

varenyavv commented 6 months ago

@Flanker32 @andxu - Can you please take a look into it once?

varenyavv commented 6 months ago

Reverting to v1.11.0 resolved the issue though. But please let me know if it's a bug in the upgraded version or if there's some other way to allow blob overwrite.

Flanker32 commented 6 months ago

@varenyavv Thanks a lot for your report and sorry for the late response. We will investigate this issue soon, and update here once we get any updates

Flanker32 commented 5 months ago

@varenyavv Azure functions gradle plugin v1.16.0 has been released, which fixes this issue, could you please upgrade to the latest version and try again? Thanks again for your help!

Raniz85 commented 5 months ago

Updating to 1.16.0 resolved this issue for me