Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Bicep Azure Spring Cloud Bicep error: Java 17 not supported for type Jar #312

Open
jimbethancourt opened this issue May 3, 2022 · 4 comments
Assignees
Labels
t/bug Something isn't working 🔎 Triage

Comments

@jimbethancourt
Copy link

jimbethancourt commented May 3, 2022

Describe the bug
When attempting to execute an Azure Spring Cloud Bicep template, the following error message is generated and information about the deployment is not written to the console:

{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n  \"status\": \"Failed\",\r\n  \"error\": {\r\n    \"code\": \"ResourceDeploymentFailure\",\r\n    \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n    \"details\": [\r\n      {\r\n        \"code\": \"DeploymentFailed\",\r\n        \"message\": \"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.\",\r\n        \"details\": [\r\n          {\r\n            \"code\": \"BadRequest\",\r\n            \"message\": \"{\\r\\n  \\\"error\\\": {\\r\\n    \\\"code\\\": \\\"BadArgument\\\",\\r\\n    \\\"message\\\": \\\"Invalid arguments: properties.source.runtimeVersion with value Java_17 is not supported for type Jar\\\",\\r\\n    \\\"target\\\": null,\\r\\n    \\\"details\\\": [\\r\\n      {\\r\\n        \\\"code\\\": \\\"BadArgument\\\",\\r\\n        \\\"message\\\": \\\"properties.source.runtimeVersion with value Java_17 is not supported for type Jar\\\",\\r\\n        \\\"target\\\": \\\"properties.source.runtimeVersion\\\",\\r\\n        \\\"details\\\": null\\r\\n      }\\r\\n    ]\\r\\n  }\\r\\n}\"\r\n          }\r\n        ]\r\n      }\r\n    ]\r\n  }\r\n}"}]}}

Also seeing the message in the output immediately after the command is issued:

C:\Code\myproj\bicep\modules\spring-cloud\spring-cloud.bicep(65,23) : Warning BCP036: The property "runtimeVersion" expected a value of type "'Java_11' | 'Java_8' | 'NetCore_31' | null" but the provided value is of type "'Java_17 '". If this is an inaccuracy in the documentation, please report it to the Bicep Team. [https://aka.ms/bicep-type-issues]
C:\Code\myproj\bicep\modules\application-insights\app-insights.bicep(29,21) : Warning BCP036: The property "Application_Type" expected a value of type "'other' | 'web'" but the provided value is of type "'java'". If this is an inaccuracy in the documentation, please report it to the Bicep Team. [https://aka.ms/bicep-type-issues]

I'm not sure if this is an issue with NubesGen, Bicep, or Azure Spring Cloud. I've previously created an Azure Spring Cloud instance with Java 17 by hand, but this is my first time to create it with Bicep.

An Azure Spring Cloud instance is created along with an application, but the application is in an invalid state.

To Reproduce
Steps to reproduce the behavior:
On nubesgen.com:

  1. Specify Bicep template
  2. Select Application Type: Spring Boot Application
  3. Select App size: Basic
  4. Select Database: Azure SQL Database / Serverless
  5. Check Application Insights
  6. Download the Bicep templates
  7. run the command
az deployment sub create --name 'demo{environment}' --location eastus --template-file main.bicep

Expected behavior
Information about the deployment should be generated

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 'nubesgen-version': '0.11.4'

Additional context
if Java_17 is changed to Java_11 in spring-cloud.bicep the deployment information is successfully generated

@jimbethancourt jimbethancourt added t/bug Something isn't working 🔎 Triage labels May 3, 2022
@jimbethancourt
Copy link
Author

Noticed my local Bicep installation needs to be upgraded. Will upgrade and follow up.

@jimbethancourt
Copy link
Author

Issue still happens after upgrading bicep locally.

@cmaneu
Copy link
Member

cmaneu commented May 5, 2022

Hi @jimbethancourt,
Thanks for reporting that issue.
I'll have a look at it.

@cmaneu cmaneu self-assigned this May 5, 2022
@cmaneu
Copy link
Member

cmaneu commented May 5, 2022

There is a discrepancy between the bicep documentation and how the portal create things.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working 🔎 Triage
Projects
None yet
Development

No branches or pull requests

2 participants