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

Handle new format of used_classes_* reports in GraalVM for JDK 24 #41935

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented Jul 16, 2024

Starting with GraalVM for JDK 24 the format of the report has changed
prefixing each line with the class loader name and a colon, e.g.:

GraalVM for JDK 22 (and 23 which is not released yet):

org.postgresql.jdbc.PgSQLXML

GraalVM for JDK 24:

com.oracle.svm.hosted.NativeImageClassLoader:org.postgresql.jdbc.PgSQLXML

See oracle/graal@1d769c7#diff-01f83a129b979abfb9acd79deb25f1db51df940f9d4ca968c301cd9718bf627bR347

Closes #41917

Starting with GraalVM for JDK 24 the format of the report has changed
prefixing each line with the class loader name and a colon, e.g.:

GraalVM for JDK 22 (and 23 which is not released yet):
```
org.postgresql.jdbc.PgSQLXML
```

GraalVM for JDK 24:
```
com.oracle.svm.hosted.NativeImageClassLoader:org.postgresql.jdbc.PgSQLXML
```

Closes quarkusio#41917
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 16, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit e849b75.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17 Windows

📦 integration-tests/spring-web

io.quarkus.it.spring.web.openapi.OpenApiWithConfigPMT.testOpenAPI - History

  • Read timed out - java.net.SocketTimeoutException
java.net.SocketTimeoutException: Read timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:288)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:314)
	at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:355)
	at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:808)
	at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
	at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:161)
	at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:82)

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Ah nice to have it handled before we switch to it!

I added a small question.

Comment on lines +40 to +43
// Starting with GraalVM for JDK 24 the format of the report has changed prefixing each line with
// the class loader name and a colon. We need to strip that part.
String[] line = scanner.nextLine().split(":");
set.add(line[line.length - 1]);
Copy link
Member

Choose a reason for hiding this comment

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

Given the comment, I would rather use indexOf() and substring()? Or you are absolutely sure there won't be any other colon?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the time being it's at most one colon, something like [<classloader>:]<classname>, that's why I went for the simplest approach. If more colons show up in the future it will still work as long as the classname still appears last in the sequence (and the classname can't contain a colon). If something gets added after the classname then the test will break and we will notice.

I don't think it's worth "validating" the file's format, at least not for the time being.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Let's merge then, thanks for the confirmation!

@gsmet gsmet merged commit 728feba into quarkusio:main Jul 17, 2024
51 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.14 - main milestone Jul 17, 2024
@zakkak zakkak deleted the 2024-07-16-fix-41917 branch July 17, 2024 11:46
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.

PostgresQL IT tests failing with Mandrel 24.2 (for JDK 24)
2 participants