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

Add java runtime metadata #19

Merged
merged 29 commits into from
Jun 14, 2024
Merged

Add java runtime metadata #19

merged 29 commits into from
Jun 14, 2024

Conversation

Ryex
Copy link
Contributor

@Ryex Ryex commented May 10, 2023

Adds Java runtime metadata to metadata server

data is located at net.minecraft.java/java{major_version}.json

looks like

// net.minecraft.java/java8.json
{
    "formatVersion": 1,
    "name": "Java 8",
    "releaseTime": "2023-04-20T17:44:02+00:00",
    "runtimes": {
        "{os}-{arch}" [
            {
                "checksum": {
                    "hash": "c529f68a6febc042e71835a579f44d55a3717c46",
                    "type": "sha1"
                },
                "downloadType": "manifest",
                "name": "mojang_jre_8u202",
                "recommended": true,
                "releaseTime": "2020-11-17T19:26:25+00:00",
                "url": "https://piston-meta.mojang.com/v1/packages/c529f68a6febc042e71835a579f44d55a3717c46/manifest.json",
                "vendor": "mojang",
                "version": {
                    "major": 8,
                    "minor": 0,
                    "name": "8u202",
                    "security": 202
                }
            },
            {
                "checksum": {
                    "hash": "b6fdfe32085a884c11b31f66aa67ac62811df7112fb6fb08beea61376a86fbb4",
                    "type": "sha256"
                },
                "downloadType": "archive",
                "name": "eclipse_temurin_jre8.0.372+7",
                "recommended": false,
                "releaseTime": "2023-04-20T17:44:02+00:00",
                "url": "https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u372-b07/OpenJDK8U-jre_x64_linux_hotspot_8u372b07.tar.gz",
                "vendor": "eclipse",
                "version": {
                    "build": 7,
                    "major": 8,
                    "minor": 0,
                    "security": 372
                }
            },
            {
                "checksum": {
                    "hash": "beed678283c4fb62250c637f2de771c147cce386cd8a9eaddf857715e5749703",
                    "type": "sha256"
                },
                "downloadType": "archive",
                "name": "azul_zulu_jre8.0.372",
                "recommended": false,
                "releaseTime": "2023-04-18T08:33:34+00:00",
                "url": "https://cdn.azul.com/zulu/bin/zulu8.70.0.23-ca-jre8.0.372-linux_x64.zip",
                "vendor": "azul",
                "version": {
                    "major": 8,
                    "minor": 0,
                    "security": 372
                }
            },
        ],
        // ...
    },
    "uid": "net.minecraft.java",
    "version": "java8"
}

@Ryex Ryex marked this pull request as ready for review May 11, 2023 03:41
@Ryex Ryex changed the title feat: fetch java metadata Add java runtime metadata May 11, 2023
Ryex added 11 commits June 16, 2023 21:15
Signed-off-by: Rachel Powers <[email protected]>
Signed-off-by: Rachel Powers <[email protected]>
Signed-off-by: Rachel Powers <[email protected]>
Signed-off-by: Rachel Powers <[email protected]>
Signed-off-by: Rachel Powers <[email protected]>
Signed-off-by: Rachel Powers <[email protected]>
Signed-off-by: Rachel Powers <[email protected]>
Signed-off-by: Rachel Powers <[email protected]>
@Trial97
Copy link
Member

Trial97 commented Feb 17, 2024

If we want to only support Mojang Java for starters, commenting out

meta/update.sh

Line 50 in abc3209

python updateJava.py || fail_in

and

meta/update.sh

Line 59 in abc3209

upstream_git add java_runtime/adoptium/available_releases.json java_runtime/adoptium/versions/*.json java_runtime/azul/packages.json java_runtime/azul/versions/*.json || fail_in

will make the scripts to not generate adoptium and azul java metadata

@Ryex
Copy link
Contributor Author

Ryex commented May 20, 2024

IBM Semeru which used OpenJ9
"which is known to be quite memory efficient, making it potentially interesting for large modpacks." ~ user who wanted detection support.

it may be interesting to add it to meta.

it uses the same api schema as Adoptium so very little work would be required. just use https://api.adoptopenjdk.net as the base and use the query filter

?jvm_impl=openj9&vendor=ibm

@Trial97
Copy link
Member

Trial97 commented May 21, 2024

Right now I think we will not add more java providers until we do a nightly release with adoptium and azulu(to test this out).
And I think we can wait until IBM releases its own API as mentioned here: adoptium/api.adoptium.net#187 (comment) (or they are released under adoptium).
Either way in case we need to add that I already have prepared the commit for it: adoptium/api.adoptium.net#187 (comment)

Copy link
Member

@ZekeZDev ZekeZDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Scrumplex
Copy link
Member

Could you also add the two new entrypoints to tool.poetry.scripts in pyproject.toml?

@Scrumplex
Copy link
Member

As it is right now, this downloads an endless supply of Azul JREs/JDKs. I doubt people will use most of these, so perhaps we should have some filters in place?

I'd propose only keeping track of the last let's say 10 versions per major version?

@Trial97
Copy link
Member

Trial97 commented Jun 7, 2024

I would prefer to keep them but I'm not against fetching less javas. So if you can just push a change here it would be great.

@TayouVR
Copy link
Member

TayouVR commented Jun 10, 2024

just testing, thought I'd have asked in the past to get perms on this repo, but It may have been the website & bot or smth I asked for in the past (I don't really do any meta work)

@Scrumplex Scrumplex merged commit 395ca19 into PrismLauncher:main Jun 14, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants