Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Refine buildpack integration #399

Closed
sdeleuze opened this issue Dec 4, 2020 · 3 comments
Closed

Refine buildpack integration #399

sdeleuze opened this issue Dec 4, 2020 · 3 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented Dec 4, 2020

After a discussion with @nebhale and @ekcasey about buildpacks, GraalVM, and Spring Native, we decided to improve build reproducibility with following upcoming changes:

  • Buildpacks will provide access to the latest minor of the 2 latest majors, for example next year 20.3.0 + 21.0.0 then 20.3.0 + 21.1.0 etc and a way to define the GraalVM version (20.3.0 or 21.0.0` for example).
  • Setting spring-native dependency will be mandatory (too confusing for users and build reproducibility otherwise)
  • It will be possible to set GraalVM version via an image environnement variable (same place where we set currently BP_BOOT_NATIVE_IMAGE?)

Emily, Ben, please correct or complete if needed.

@sdeleuze sdeleuze added this to the 0.9.0 milestone Dec 4, 2020
@sdeleuze sdeleuze self-assigned this Dec 4, 2020
@sdeleuze sdeleuze changed the title Provide GraalVM versions supported as metadata Refine buildpack integration Dec 17, 2020
@sdeleuze
Copy link
Contributor Author

sdeleuze commented Jan 8, 2021

@ekcasey Our buildpack support is broken since the spring-graalvm-native to spring-native rename, likely because the new dependency is not recognized and the spring-graalvm-native-0.8.3-RC1 one is included by default. Could you please fix in priority paketo-buildpacks/native-image#41 that I have just created in order to allow us to use builback support again with spring-native:0.9.0-SNAPSHOT?

@sdeleuze sdeleuze added the type: enhancement A general enhancement label Jan 8, 2021
@sdeleuze
Copy link
Contributor Author

sdeleuze commented Jan 21, 2021

Summary of our latest discussion with @ekcasey. Short term, the native image buildpack will be upgraded to GraalVM 21.0.0 and will fix the Spring Boot 2.4.2 classpath index issue reported in #446.

Currently https://paketo.io/docs/buildpacks/language-family-buildpacks/java-native-image/ supports only Spring apps (via spring-graalvm-native or spring-native dependency detection). It would make sense to support Spring and non Spring apps (which has no specific dependency or class/resource to be used as a trigger by design).

To fulfill that goal, it would make sense to make the native buildpack more generic and remove the Spring specific parts:

  • BP_BOOT_NATIVE_IMAGE could be renamed to BP_NATIVE_IMAGE and used as the only trigger (could make sense to keep BP_BOOT_NATIVE_IMAGE some time in parallel if possible for backward compatibility)
  • No more buildpack error message when no Spring native dependency is present (on purpose, we could eventually refine later when Spring native support will be more stable)
  • That would be a good fit with our upcoming move (pre 0.9.0) that will remove totally spring-native dependency and "just" use resources and classes generated by spring-native-maven-plugin or spring-native-gradle-plugin (see related Introduce the build time transformation infrastructure #346)
  • Last needed feature, allow to specify the GraalVM version explicitly, likely via a BP_GRAALVM_VERSION environment variable.

@sdeleuze sdeleuze added type: task A general task and removed type: enhancement A general enhancement labels Jan 28, 2021
@sdeleuze
Copy link
Contributor Author

I close this issue since the remaining tasks need to happen on https://github.com/paketo-buildpacks/spring-boot-native-image side.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: task A general task
Development

No branches or pull requests

1 participant