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

Gradle plugin does not generate function.zip if builds from cache #41683

Closed
mgazim opened this issue Jul 4, 2024 · 4 comments
Closed

Gradle plugin does not generate function.zip if builds from cache #41683

mgazim opened this issue Jul 4, 2024 · 4 comments

Comments

@mgazim
Copy link

mgazim commented Jul 4, 2024

Describe the bug

When building native image for AWS Lambda with Gradle plugin and Gradle cache is used there's no function.zip generated in build directory, however *-runner image seems to be retrieved from cache.
When building with --no-build-cache flag (or in case of any changes in Lambda source code) native image is being packed into function.zip as expected.

Gradle command used:

./gradlew clean build -Dquarkus.native.enabled=true -Dquarkus.package.jar.enabled=false -Dquarkus.native.container-build=true

Note: not only function.zip is not being added into build output but other "helper" artifacts as well (that are present when no Gradle cache is used):

  • bootstrap-example.sh
  • manage.sh
  • sam.jvm.yaml
  • sam.native.yaml

Expected behavior

Native image is being packed into function.zip even if Gradle build cache is used.

Actual behavior

Native image is present in build artifacts, however function.zip is not being generated.

How to Reproduce?

  1. Setup Quarkus Gradle plugin for building Quarkus based AWS Lambda
  2. Run gradle clean build -Dquarkus.native.enabled=true -Dquarkus.package.jar.enabled=false -Dquarkus.native.container-build=true to build a native image (first run will definitely generate function.zip as no artifacts present in Gradle cache)
  3. Run the same command again
  4. Check build directory of the lambda

Output of uname -a or ver

Darwin MacBook-Air-.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64

Output of java -version

openjdk 21.0.3 2024-04-16 LTS OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode)

Quarkus version or git rev

3.12.0

Build tool (ie. output of mvnw --version or gradlew --version)

------------------------------------------------------------ Gradle 8.5 ------------------------------------------------------------ Build time: 2023-11-29 14:08:57 UTC Revision: 28aca86a7180baa17117e0e5ba01d8ea9feca598 Kotlin: 1.9.20 Groovy: 3.0.17 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 21.0.3 (Eclipse Adoptium 21.0.3+9-LTS) OS: Mac OS X 14.2 aarch64

Additional information

quarkus gradle plugin version - 3.12.0.CR1

@mgazim mgazim added the kind/bug Something isn't working label Jul 4, 2024
Copy link

quarkus-bot bot commented Jul 4, 2024

/cc @geoand (kotlin), @glefloch, @gwenneg (cache), @quarkusio/devtools

@mschorsch
Copy link
Contributor

mschorsch commented Jul 4, 2024

Maybe related #36808

@mgazim
Copy link
Author

mgazim commented Jul 9, 2024

Thanks @mschorsch ! It seems to be the same.

@zakkak
Copy link
Contributor

zakkak commented Aug 28, 2024

Closing as duplicate of #36808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants