1

I trying to create and deploy my small Java Spring application to Azure Spring Apps. With that I using Intellij Idea with Azure Plugin and/or maven azure-spring-apps-maven-plugin.

With Idea I can't setup deployment coz on create/recieve available apps in configuration form I get errors in notifications:

Azure: Failed to list Spring Apps of subscription(***), the HTTP resource that matches the request URI 'https://westeurope-gen2.resourceprovider.azureappplatform.io/subscriptions/***/resourceGroups/playground-resource-group/providers/Microsoft.AppPlatform/Spring/playground-apps' does not support the API version '2022-09-01-preview'.
Call Stack:
● List Spring Apps of subscription(***)
● !interal/common.load_combobox_items.type!

With Maven mvn azure-spring-apps:deploy I get:

[ERROR] Failed to preload Spring Appss, the HTTP resource that matches the request URI 'https://westeurope-gen2.resourceprovider.azureappplatform.io/subscriptions/***/resourceGroups/playground-re
source-group/providers/Microsoft.AppPlatform/Spring/playground-apps' does not support the API version '2022-09-01-preview'.
rx.exceptions.OnErrorNotImplementedException
    at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call (InternalObservableUtils.java:386)
    at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call (InternalObservableUtils.java:383)

parts of pom.xml:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.0.5</version>
    </parent>
...
<dependencyManagement>
<dependencies>
<dependency>
 <groupId>com.azure.spring</groupId>
 <artifactId>spring-cloud-azure-dependencies</artifactId>
 <version>5.0.0</version>
 <type>pom</type>
 <scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
...
<build>
<plugins>
<plugin>
  <groupId>com.microsoft.azure</groupId>
  <artifactId>azure-spring-apps-maven-plugin</artifactId>
  <version>1.15.0</version>
...
</plugin>
</plugins>
</build>

Also noticed, that JSON resources for automation are empty for that API version (it exists for 2022-05 and 2022-11). screenshot from Azure portal

In same time CLI command works:

az spring app deploy --resource-group playground-resource-group --service playground-apps --name playground-app-dev --artifact-path target/playground-1.0.0.jar   

Also tried EastUS location with same result.

So, can I solve that problem on my side or, maybe should I wait for api updates from maven plugin and jetbrains?

Likrant
  • 21
  • 2

2 Answers2

0

[ERROR] Failed to preload Spring Appss, the HTTP resource that matches the request URI 'https://westeurope-gen2.resourceprovider.azureappplatform.io/subscriptions/***/resourceGroups/playground-resource-group/providers/Microsoft.AppPlatform/Spring/gpt-playground-apps' does not support the API version '2022-09-01-preview'.rx.exceptions.OnErrorNotImplementedException at rx.internal.util.InternalObservableUtils$ ErrorNotImplementedAction.call (InternalObservableUtils.java:386) atrx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call (InternalObservableUtils.java:383)

Make sure to check the API version used in your request is supported by Azure spring Apps platform.

I have reproduced your requirement by creating sample spring boot application and deployed to Azure Spring Apps in the EastUS version without any issues. I have used below command to build the artifacts of my application with the Azure spring apps maven dependency:

mvnw com.microsoft.azure:azure-spring-apps-maven-plugin:1.14.0:config -DadvancedOptions

enter image description here

Below is the command to deploy the Artifacts in Azure spring Apps. mvn azure-spring-apps:deploy

enter image description here

Results: enter image description here

enter image description here

Pravallika KV
  • 2,415
  • 2
  • 2
  • 7
  • This reads a lot like 'works on my machine'. The resulting question is: what is the correct way to deploy to a sping-apps environment in westeurope? – Mike Adler Apr 03 '23 at 10:37
  • "Make sure to check the API version used in your request is supported by Azure spring Apps platform." how do I check the API version in my request? confused – Oliver Watkins Jul 05 '23 at 16:24
0

It's a known issue tracked here: https://github.com/microsoft/azure-maven-plugins/issues/2268

chenrujun
  • 126
  • 4