azure-maven-plugins icon indicating copy to clipboard operation
azure-maven-plugins copied to clipboard

Redeployment failed when functions runtime is updated

Open purijatin opened this issue 3 years ago • 2 comments

Plugin name and version

azure-functions-maven-plugin

Plugin configuration in your pom.xml

  1. Deploy the Azure function against runtime-3
  2. Redeploy the azure function against runtime-4

Maven showed that the deployment has succeeded. But in reality, the azure function wasn't running.

           <plugin>
                <groupId>com.microsoft.azure</groupId>
                <artifactId>azure-functions-maven-plugin</artifactId>
                <version>${azure.functions.maven.plugin.version}</version>
                <configuration>
                    <appName>${functionAppName}</appName>
                    <resourceGroup>${resourceGroup}</resourceGroup>
                    <appServicePlanName>${appServicePlan}</appServicePlanName>
                    <region>${region}</region>
                    <deploymentType>RUN_FROM_BLOB</deploymentType>
                    <runtime>
                        <!-- runtime os, could be windows, linux or docker-->
                        <os>linux</os>
                        <javaVersion>11</javaVersion>
                    </runtime>
                    <appSettings>
                        <property>
                            <name>FUNCTIONS_EXTENSION_VERSION</name>
                            <value>~3</value>
                        </property>
                    </appSettings>
                </configuration>
                <executions>
                    <execution>
                        <id>package-functions</id>
                        <goals>
                            <goal>package</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Expected behavior

Doing a re-deploy using maven plugin when the pom.xml is updated from ~3 to ~4 should be a success

Actual behavior

the maven plugin doesn't give an error. And the app doesn't function either. Required redeployment

Steps to reproduce the problem

  1. Deploy with ~3 as FUNCTIONS_EXTENSION_VERSION value via mvn azure-functions:deploy
  2. Redeploy via ~4

purijatin avatar Jun 21 '22 12:06 purijatin

@purijatin Thanks for your report, I'll investigate this issue soon

Flanker32 avatar Jun 22 '22 02:06 Flanker32

@purijatin I tried with a simple HTTP Trigger project and it seems works well . Could you please check the host.json and check whether you are using bundle v2 or higher, which is required by runtime ~4. Please refer this doc for more details about ~4 migration

Flanker32 avatar Jun 28 '22 01:06 Flanker32