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

Use an inventory file for OpenJDK distribution files #665

Merged
merged 8 commits into from
May 21, 2024
Merged

Conversation

Malax
Copy link
Member

@Malax Malax commented May 16, 2024

Inventory File

This PR uses https://github.com/malax/inventory for handling inventory files in a generic manner. That crate still needs some polish, but is usable in the current state. I'd like to get this PR merged before we finalize https://github.com/malax/inventory. The code in that crate is based on the work @runesoerensen did for the Go buildpack, so it's already in production regardless of this PR.

Inventory File Contents (41% of lines added in this PR)

The contents of the inventory file uses a new S3 bucket instead of the existing one. We plan to migrate all JVM buildpacks (CNB and classic) to this bucket eventually.

OpenJDK version parsing (27% of lines added in this PR)

OpenJDK version parsing for both "legacy" version strings used by OpenJDK 8 and JEP 322 version strings (used by OpenJDK >= 10). Support for JEP 223 strings is not implemented since all OpenJDK versions that use that versioning format are already EOL.

I tried implementing the parsing using only std, but the complexity of the spec as well as supporting two slightly overlapping specs made me using nom for parsing.

Deliberately Omitted

Fixes #499

@Malax Malax force-pushed the malax/inventory branch from e796019 to 9d49725 Compare May 21, 2024 09:53
@Malax Malax marked this pull request as ready for review May 21, 2024 09:56
@Malax Malax requested a review from a team as a code owner May 21, 2024 09:56
Cargo.toml Outdated Show resolved Hide resolved
buildpacks/jvm/CHANGELOG.md Outdated Show resolved Hide resolved
buildpacks/jvm/openjdk_inventory.toml Outdated Show resolved Hide resolved
buildpacks/jvm/src/errors.rs Show resolved Hide resolved
buildpacks/jvm/src/errors.rs Show resolved Hide resolved
buildpacks/jvm/src/openjdk_artifact.rs Show resolved Hide resolved
buildpacks/jvm/src/openjdk_version.rs Outdated Show resolved Hide resolved
buildpacks/jvm/CHANGELOG.md Show resolved Hide resolved
@Malax Malax force-pushed the malax/inventory branch from d0211dd to b4abf17 Compare May 21, 2024 12:18
@Malax Malax enabled auto-merge (squash) May 21, 2024 12:21
@Malax Malax merged commit 1a7bedd into main May 21, 2024
9 checks passed
@Malax Malax deleted the malax/inventory branch May 21, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use one URL for all Azul OpenJDK installations regardless of stack
2 participants