From e18e5a6e9dcb6693bc63397919f2b1ce1f057b50 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 19 Jul 2023 19:01:06 +0200 Subject: [PATCH 1/5] Proposal to introduce new GraalVM buildpacks --- text/java/0000-graalvm-jdk.md | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 text/java/0000-graalvm-jdk.md diff --git a/text/java/0000-graalvm-jdk.md b/text/java/0000-graalvm-jdk.md new file mode 100644 index 00000000..9cec5043 --- /dev/null +++ b/text/java/0000-graalvm-jdk.md @@ -0,0 +1,36 @@ +# Introduce new buildpacks for the latest GraalVM release + +## Summary + +Retire the [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) in favor of a new `graalvm-community` buildpack and add a new `graalvm-oracle` buildpack to support the new [Oracle GraalVM](https://www.oracle.com/java/graalvm/) distribution. + +## Motivation + +There are multiple motivations for this RFC: + +1. The [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) only supports GraalVM Community Edition. Since this is only one of many GraalVM distributions (Community Edition, Oracle GraalVM, Liberica NIK, Mandrel, ...), it makes sense to adjust the name and the README of the buildpack, so that it is clear to users which distribution the buildpack includes (Community Edition). +2. The latest GraalVM release has dropped the GraalVM version in favor of the Java version, which may simplify the implementation and maintenance of the buildpack. +3. Due to the [alignment with OpenJDK](https://www.graalvm.org/2022/openjdk-announcement/), GraalVM is becoming more and more a standard JDK with Native Image support. The GraalVM Updater will be [deprecated in the GraalVM for JDK 21 release](https://github.com/oracle/graal/issues/6855) and removed in the future. +4. Oracle has [introduced Oracle GraalVM](https://medium.com/graalvm/a-new-graalvm-release-and-new-free-license-4aab483692f5), a new and free GraalVM distribution that provides advanced features including G1 GC, SBOM, as well as performance and size optimizations. A new buildpack for Oracle GraalVM will, for example, allow Spring users to build more efficient and secure microservices. + + +## Detailed Explanation + +This RFC proposes to address the items listed under Motivation as follows: + +1. Introduce a new `graalvm-community` and clarify that it includes GraalVM Community Edition in the README. The `graalvm` buildpack is kept for backward compatibility but is no longer maintained. +2. The new `graalvm-community` build will only support GraalVM for JDK 17 and later, following the new versioning scheme. Older GraalVM releases are still available via the deprecated `graalvm` buildpack. +3. Investigate whether the `graalvm-community` buildpack can further be simplified and aligned with the [Java buildpacks](0016-alternate-jvms-in-java-buildpack.md). +4. Add a new `graalvm-oracle` buildpack that supports Oracle GraalVM and works just like the `graalvm-community` buildpack. + +## Rationale and Alternatives + +Alternatively, the existing `graalvm` buildpack could be reworked and extended with support for Oracle GraalVM. For this, we would need to offer an environment variable such as `$BP_DISTRIBUTION` for users to select a specific GraalVM distribution. However, that would be somewhat inconsistent with the `bellsoft-liberica` buildpack, which also includes a GraalVM distribution. Having separate buildpacks for different GraalVM distributions is also more consistent with the [Java buildpacks](0016-alternate-jvms-in-java-buildpack.md). + +## Implementation + +First, we plan to fork the [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) to create a new `graalvm-community` buildpack and update its README. This way, we don't break existing users of the `graalvm` buildpack and allow them to upgrade to either the `graalvm-community` buildpack or the new `graalvm-oracle` buildpack. + +Second, we create a new `graalvm-oracle` buildpack that pulls Oracle GraalVM instead of GraalVM Community Edition using the [Script Friendly URLs](https://www.oracle.com/java/technologies/jdk-script-friendly-urls/). The goal is to share as much code as possible between the two buildpacks to keep maintenance costs to a minimum. For this, we may need to create an "abstract" buildpack on which both `graalvm-community` and `graalvm-oracle` can be based. + +Finally, we add a deprecation notice to the README of the `graalvm` buildpack and archive the repository. From 7f9900aa924613d30390ae112d2dbab005e426de Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Fri, 27 Oct 2023 20:11:25 +0200 Subject: [PATCH 2/5] Update text/java/0000-graalvm-jdk.md Co-authored-by: Daniel Mikusa --- text/java/0000-graalvm-jdk.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/text/java/0000-graalvm-jdk.md b/text/java/0000-graalvm-jdk.md index 9cec5043..7c80c60b 100644 --- a/text/java/0000-graalvm-jdk.md +++ b/text/java/0000-graalvm-jdk.md @@ -2,7 +2,9 @@ ## Summary -Retire the [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) in favor of a new `graalvm-community` buildpack and add a new `graalvm-oracle` buildpack to support the new [Oracle GraalVM](https://www.oracle.com/java/graalvm/) distribution. +The existing [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) will be clarified to indicate that it is the GraalVM Community buildpack. We cannot change the id, but we will update the README and metadata to clarify this point. + +In addition, to support the new [Oracle GraalVM](https://www.oracle.com/java/graalvm/) distribution we will modify the [Oracle Buildpack](https://github.com/paketo-buildpacks/oracle) to include support for Oracle's GraalVM. ## Motivation From c11f6de9b678b9bd212dc4f2e4558988ec43fa59 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Fri, 27 Oct 2023 20:11:54 +0200 Subject: [PATCH 3/5] Update text/java/0000-graalvm-jdk.md Co-authored-by: Daniel Mikusa --- text/java/0000-graalvm-jdk.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/text/java/0000-graalvm-jdk.md b/text/java/0000-graalvm-jdk.md index 7c80c60b..9c4a2826 100644 --- a/text/java/0000-graalvm-jdk.md +++ b/text/java/0000-graalvm-jdk.md @@ -20,10 +20,10 @@ There are multiple motivations for this RFC: This RFC proposes to address the items listed under Motivation as follows: -1. Introduce a new `graalvm-community` and clarify that it includes GraalVM Community Edition in the README. The `graalvm` buildpack is kept for backward compatibility but is no longer maintained. -2. The new `graalvm-community` build will only support GraalVM for JDK 17 and later, following the new versioning scheme. Older GraalVM releases are still available via the deprecated `graalvm` buildpack. -3. Investigate whether the `graalvm-community` buildpack can further be simplified and aligned with the [Java buildpacks](0016-alternate-jvms-in-java-buildpack.md). -4. Add a new `graalvm-oracle` buildpack that supports Oracle GraalVM and works just like the `graalvm-community` buildpack. +1. Update the README & buildpack metadata for the existing GraalVM buildpack to indicate it is specifically for the GraalVM Community release. +2. Update the [Oracle Buildpack](https://github.com/paketo-buildpacks/oracle) to support Oracle GraalVM. This will work just like what we have with the present Bellsoft Liberica buildpack, where the buildpack can provide a JVM and Native image tools. + +For more details, please see the [proof of concept](https://github.com/paketo-buildpacks/rfcs/pull/294). ## Rationale and Alternatives From 420c715b4afac2efd9a6bed1479a34304dbdd25c Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Fri, 27 Oct 2023 20:12:11 +0200 Subject: [PATCH 4/5] Update text/java/0000-graalvm-jdk.md Co-authored-by: Daniel Mikusa --- text/java/0000-graalvm-jdk.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/text/java/0000-graalvm-jdk.md b/text/java/0000-graalvm-jdk.md index 9c4a2826..8e0f9b84 100644 --- a/text/java/0000-graalvm-jdk.md +++ b/text/java/0000-graalvm-jdk.md @@ -31,8 +31,4 @@ Alternatively, the existing `graalvm` buildpack could be reworked and extended w ## Implementation -First, we plan to fork the [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) to create a new `graalvm-community` buildpack and update its README. This way, we don't break existing users of the `graalvm` buildpack and allow them to upgrade to either the `graalvm-community` buildpack or the new `graalvm-oracle` buildpack. - -Second, we create a new `graalvm-oracle` buildpack that pulls Oracle GraalVM instead of GraalVM Community Edition using the [Script Friendly URLs](https://www.oracle.com/java/technologies/jdk-script-friendly-urls/). The goal is to share as much code as possible between the two buildpacks to keep maintenance costs to a minimum. For this, we may need to create an "abstract" buildpack on which both `graalvm-community` and `graalvm-oracle` can be based. - -Finally, we add a deprecation notice to the README of the `graalvm` buildpack and archive the repository. +See the Details section. The implementation plan as well as a proof of concept PR are documented there. From fcd5f4d9bf86271094c56c743d05c208961ea505 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Fri, 27 Oct 2023 20:19:49 +0200 Subject: [PATCH 5/5] Revise GraalVM RFC. --- text/java/0000-graalvm-jdk.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/text/java/0000-graalvm-jdk.md b/text/java/0000-graalvm-jdk.md index 8e0f9b84..1a1fe563 100644 --- a/text/java/0000-graalvm-jdk.md +++ b/text/java/0000-graalvm-jdk.md @@ -1,27 +1,27 @@ -# Introduce new buildpacks for the latest GraalVM release +# Add support for Oracle GraalVM and update GraalVM CE buildpack ## Summary -The existing [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) will be clarified to indicate that it is the GraalVM Community buildpack. We cannot change the id, but we will update the README and metadata to clarify this point. +We will modify the [Oracle Buildpack](https://github.com/paketo-buildpacks/oracle) to include support for the new [Oracle GraalVM](https://www.oracle.com/java/graalvm/) distribution. -In addition, to support the new [Oracle GraalVM](https://www.oracle.com/java/graalvm/) distribution we will modify the [Oracle Buildpack](https://github.com/paketo-buildpacks/oracle) to include support for Oracle's GraalVM. +In addition, the existing [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) will be clarified to indicate that it is the GraalVM Community buildpack. We cannot change its ID, but we will update the README and metadata to clarify this point. ## Motivation There are multiple motivations for this RFC: -1. The [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) only supports GraalVM Community Edition. Since this is only one of many GraalVM distributions (Community Edition, Oracle GraalVM, Liberica NIK, Mandrel, ...), it makes sense to adjust the name and the README of the buildpack, so that it is clear to users which distribution the buildpack includes (Community Edition). -2. The latest GraalVM release has dropped the GraalVM version in favor of the Java version, which may simplify the implementation and maintenance of the buildpack. -3. Due to the [alignment with OpenJDK](https://www.graalvm.org/2022/openjdk-announcement/), GraalVM is becoming more and more a standard JDK with Native Image support. The GraalVM Updater will be [deprecated in the GraalVM for JDK 21 release](https://github.com/oracle/graal/issues/6855) and removed in the future. -4. Oracle has [introduced Oracle GraalVM](https://medium.com/graalvm/a-new-graalvm-release-and-new-free-license-4aab483692f5), a new and free GraalVM distribution that provides advanced features including G1 GC, SBOM, as well as performance and size optimizations. A new buildpack for Oracle GraalVM will, for example, allow Spring users to build more efficient and secure microservices. +1. Oracle has [introduced Oracle GraalVM](https://medium.com/graalvm/a-new-graalvm-release-and-new-free-license-4aab483692f5), a new and free GraalVM distribution that provides advanced features including G1 GC, SBOM, as well as performance and size optimizations. A new buildpack for Oracle GraalVM will, for example, allow Spring users to build more efficient and secure microservices. +2. The [`graalvm` buildpack](https://github.com/paketo-buildpacks/graalvm) only supports GraalVM Community Edition. Since this is only one of many GraalVM distributions (Community Edition, Oracle GraalVM, Liberica NIK, Mandrel, ...), it makes sense to adjust the name and the README of the buildpack, so that it is clear to users which distribution the buildpack includes (Community Edition). +3. The latest GraalVM release has dropped the GraalVM version in favor of the Java version, which may simplify the implementation and maintenance of the buildpack. +4. Due to the [alignment with OpenJDK](https://www.graalvm.org/2022/openjdk-announcement/), GraalVM is becoming more and more a standard JDK with Native Image support. The GraalVM Updater will be [deprecated in the GraalVM for JDK 21 release](https://github.com/oracle/graal/issues/6855) and removed in the future. ## Detailed Explanation This RFC proposes to address the items listed under Motivation as follows: -1. Update the README & buildpack metadata for the existing GraalVM buildpack to indicate it is specifically for the GraalVM Community release. -2. Update the [Oracle Buildpack](https://github.com/paketo-buildpacks/oracle) to support Oracle GraalVM. This will work just like what we have with the present Bellsoft Liberica buildpack, where the buildpack can provide a JVM and Native image tools. +1. Update the [Oracle Buildpack](https://github.com/paketo-buildpacks/oracle) to support Oracle GraalVM. This will work just like what we have with the present Bellsoft Liberica buildpack, where the buildpack can provide a JVM and Native image tools. +2. Update the README & buildpack metadata for the existing GraalVM buildpack to indicate it is specifically for the GraalVM Community release. For more details, please see the [proof of concept](https://github.com/paketo-buildpacks/rfcs/pull/294).