You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, sam build does not show this warning message when building using Gradle, but somehow this message appears in the new Gradle version.
failed to return a version string using the '-v' option. The workflow is unable to check that the version of the JVM used is compatible with AWS Lambda.
Steps to reproduce:
Update the project gradle version to >= v8.9 (8.9 or 8.10).
Run sam build on existing SAM application project.
Observed result:
Got above error message while the build process is successfully executed.
Expected result:
Don't show above error message since the JVM version should be available from gradlew -v command.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
After testing with older Gradle version (below v8.8), found out the gradle output for JVM has different label.
Gradle < v8.9 is using JVM label,
while Gradle >= v8.9 is using Launcher JVM or Daemon JVM label.
Gradle < v8.9
Use gradle v8.8 as example, current sam-cli integration test is using v8.4.
❯ ./gradlew --version
------------------------------------------------------------
Gradle 8.8
------------------------------------------------------------
Build time: 2024-05-31 21:46:56 UTC
Revision: 4bd1b3d3fc3f31db5a26eecb416a165b8cc36082
Kotlin: 1.9.22
Groovy: 3.0.21
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 21.0.4 (Amazon.com Inc. 21.0.4+7-LTS)
OS: Mac OS X 14.6.1 aarch64
Gradle >= v8.9
Use gradle v8.9 as example.
❯ ./gradlew -v
------------------------------------------------------------
Gradle 8.9
------------------------------------------------------------
Build time: 2024-07-11 14:37:41 UTC
Revision: d536ef36a19186ccc596d8817123e5445f30fef8
Kotlin: 1.9.23
Groovy: 3.0.21
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
Launcher JVM: 21.0.4 (Amazon.com Inc. 21.0.4+7-LTS)
Daemon JVM: /Users/jeffry.angtoni/.sdkman/candidates/java/21.0.4-amzn (no JDK specified, using current Java home)
OS: Mac OS X 14.6.1 aarch64
OS: MacOS 14.6.1
sam --version: 1.123.0
AWS region: ap-southeast-1
# Paste the output of `sam --info` here
❯ sam --info --debug
{
"version": "1.123.0",
"system": {
"python": "3.12.5",
"os": "macOS-14.6.1-arm64-arm-64bit"
},
"additional_dependencies": {
"docker_engine": "26.1.3",
"aws_cdk": "Not available",
"terraform": "1.7.5"
},
"available_beta_feature_env_vars": [
"SAM_CLI_BETA_FEATURES",
"SAM_CLI_BETA_BUILD_PERFORMANCE",
"SAM_CLI_BETA_TERRAFORM_SUPPORT",
"SAM_CLI_BETA_RUST_CARGO_LAMBDA"
]
}
Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered:
jeffryang24
changed the title
Bug: sam build can't check the JVM version on gradle v8.10
Bug: sam build can't check the JVM version on gradle >= v8.9
Sep 5, 2024
Hi @jeffryang24, thanks for reporting the issue. I see you have opened the same issue on lambda-builders repo and a PR to fix it. Closing this issue and I will review the other issue and PR you opened.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Description:
Previously,
sam build
does not show this warning message when building using Gradle, but somehow this message appears in the new Gradle version.Steps to reproduce:
sam build
on existing SAM application project.Observed result:
Got above error message while the build process is successfully executed.
Expected result:
Don't show above error message since the JVM version should be available from
gradlew -v
command.Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
After testing with older Gradle version (below v8.8), found out the gradle output for JVM has different label.
JVM
label,Launcher JVM
orDaemon JVM
label.Gradle < v8.9
Use gradle v8.8 as example, current sam-cli integration test is using v8.4.
Gradle >= v8.9
Use gradle v8.9 as example.
sam --version
: 1.123.0Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: