Open blacelle opened 2 years ago
Thanks for reporting, but we failed to reproduce it. We'll look through the code to see if we can find any clues.
Hi, @blacelle, we couldn't reproduce this issue locally, but we found some clues from the code and fixed it.
It will list all services in the subscription and search one by name
if resource group is not provided. (So, it should be slower if resource group name is not provided.)
but the implementation of listing all service in the subscription
has a bug: it will return the old list (which is empty in default) if there is already another thread listing (loading resources from Azure).
We fixed the problem. Can you try it on endgame-202204.deprecation
branch? The updated version should be 1.10.0
if resource group is not provided
How can I specify the resourceGroup in the maven plugin configuration?
@blacelle my bad, specifying resourceGroup
is not supported yet. I'll add this in future.
I still have the same issue:
Caused by: com.microsoft.azure.toolkit.lib.common.exception.AzureToolkitRuntimeException: Azure Spring Apps(dev-kubernetes) is not found in subscription(f736e4be-d67b-44ea-b2cf-4fd5d2992662).
at com.microsoft.azure.toolkit.lib.springcloud.task.DeploySpringCloudAppTask.lambda$initTasks$0 (DeploySpringCloudAppTask.java:52)
at java.util.Optional.orElseThrow (Optional.java:403)
at com.microsoft.azure.toolkit.lib.springcloud.task.DeploySpringCloudAppTask.initTasks (DeploySpringCloudAppTask.java:51)
at com.microsoft.azure.toolkit.lib.springcloud.task.DeploySpringCloudAppTask.<init> (DeploySpringCloudAppTask.java:40)
at com.microsoft.azure.maven.springcloud.DeployMojo.doExecute (DeployMojo.java:77)
@blacelle can you try the following steps to confirm if the expected service can be listed?
<configuration>...</configuration>
node (including its offspring nodes) from
<plugin>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-spring-cloud-maven-plugin</artifactId>
<version>1.10.0</version>
<!-- https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Spring-Cloud -->
<configuration> <!--remove this node-->
...
</configuration>
<plugin>
mvn azure-spring-cloud:config
, Azure Spring Cloud service
as shown in the screenshot below, please check if the expected spring cloud service is in the list?
It gives:
[ERROR] Failed to execute goal com.microsoft.azure:azure-spring-cloud-maven-plugin:1.9.0:config (default-cli) on project gateway: Error creating extended parser class: Could not determine whether class 'org.jtwig.parser.parboiled.base.BooleanParser$$parboiled' has already been loaded: Unable to make protected final java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module @20f6f88c
mvn -version
Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
Maven home: /usr/local/Cellar/maven/3.8.3/libexec
Java version: 17.0.2, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
Default locale: en_FR, platform encoding: UTF-8
OS name: "mac os x", version: "12.2.1", arch: "x86_64", family: "mac"
Plugin name and version
com.microsoft.azure:azure-spring-cloud-maven-plugin:1.9.0
Plugin configuration in your
pom.xml
Expected behavior
Proper deployement of the app to Azure Spring Cloud
Actual behavior
The plugin fails wioth:
Steps to reproduce the problem
Unknown.
I checked multiple times in Azure Portal: we do have an 'Azure Spring Cloud' in given subscription. As we do not configure a resourceGroup in the plugin, I hope it is properly guessed, as it is not printed in the logs.