azure-maven-plugins
azure-maven-plugins copied to clipboard
No errors shown when deployment fails
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:
- 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
- If no
SERVER_ID
value can be found insettings.xml
, it doesn't throw an error. It shows build success. Again no way to know the cause on what went wrong - 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 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.
Thanks @Flanker32 for the response. Appreciate the help.
@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?
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