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

No errors shown when deployment fails

Open purijatin opened this issue 3 years ago • 4 comments

Plugin name and version

azure-functions-maven-plugin:1.15.0

Plugin configuration in your pom.xml

            <plugin>
                <groupId>com.microsoft.azure</groupId>
                <artifactId>azure-functions-maven-plugin</artifactId>
                <version>${azure.functions.maven.plugin.version}</version>
                <configuration>
                    <appName>${functionAppName}</appName>
                    <resourceGroup>XXXX</resourceGroup>
                    <appServicePlanName>java-functions-app-service-plan</appServicePlanName>
                    <region>centralus</region>
                    <pricingTier>P2V2</pricingTier>
                    <runtime>
                        <os>docker</os>
                        <image>yyyy.azurecr.io/dockertemp:v0.0.1</image>
                        <serverId>SERVER_ID</serverId>
                        <registryUrl>aiopsworkloadsimages.azurecr.io</registryUrl>
                    </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

There are following issues with this plugin:

  1. Let's say if the docker image I am trying to deploy does not exist, the command still succeeds.. Neither does it show on the azure portal if deployment failed. In such a scenario, there is no way to know the cause of it
  2. If no SERVER_ID value can be found in settings.xml, it doesn't throw an error. It shows build success. Again no way to know the cause on what went wrong
  3. If the credentials are invalid of the ACR repo. No way to know on what went wrong

The expected behavior would be: If something is wrong and the deployment failed, it atleast needs to tell back that it failed. Either on portal, or the output of te maven command.

Steps to reproduce the problem

Pick up any sample docker java project. and let the docker image be invalid.

purijatin avatar Feb 11 '22 07:02 purijatin

@purijatin Thanks for your report and really sorry for the late response. Currently for docker function app, maven plugin will only update the configuration of target function app (docker image repository, password...), and return after the properties updated, we will sync with the host team to find an API to get the deployment status. For the second issue, I'll investigate it and fix it soon.

Flanker32 avatar Feb 18 '22 06:02 Flanker32

Thanks @Flanker32 for the response. Appreciate the help.

purijatin avatar Feb 18 '22 11:02 purijatin

@purijatin For the second issue, we do have logic to validate whether serverId exists in your settings.xml and throw exception if not exists, please refer here. And it seems works well in my cases, could you please share your configuration with this issue?

image

Flanker32 avatar Feb 22 '22 09:02 Flanker32

Hi @flanker32.

I verified it. You are right. Not sure why I faced that issue then. I had to spend a couple of hours then to understand the cause back then. I am unable to replicate now on (2) as of now. You can ignore (2).

Regards

purijatin avatar Feb 22 '22 11:02 purijatin