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

Run CI with Java 17 and 21 #5874

Merged
merged 3 commits into from
Apr 15, 2024
Merged

Run CI with Java 17 and 21 #5874

merged 3 commits into from
Apr 15, 2024

Conversation

andreaTP
Copy link
Member

@andreaTP andreaTP commented Apr 9, 2024

Description

Supersedes closes #3612

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@andreaTP andreaTP marked this pull request as ready for review April 11, 2024 09:15
@andreaTP
Copy link
Member Author

ready for review 🎉 cc. @manusa

@@ -302,6 +302,7 @@ void bigNumbersSupported(@TempDir Path tempDir) throws Exception {
// When
final Path toUploadWithModifiedDate = Files.copy(toUpload, tempDir.resolve("upload-sample.txt"));
assertTrue(toUploadWithModifiedDate.toFile().setLastModified(9999999999999L)); // Would trigger IllegalArgumentException: last modification time '9999999999' is too big ( > 8589934591 ).
assertTrue(toUploadWithModifiedDate.toFile().setLastModified(123456L)); // To have a stable, within ranges, value to compare with
Copy link
Member

Choose a reason for hiding this comment

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

This is basically rendering the test useless

This test ensures that the changes in 7a49cce

behave as expected.

It should fail in case the line

tar.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX);

is removed.

We need to find some other way to verify this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Open to suggestions, the test breaks on Java 21 but I don't have much context here ...

Copy link
Member

@manusa manusa Apr 11, 2024

Choose a reason for hiding this comment

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

Do you have any more context about how does the test break in 21?
In any case, it's better to disable this test for Java 21 only (@DisabledOnJre(JAVA_21))

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, going to disable the test instead, this is the outcome on Java 21:

java.lang.AssertionError: 
Expecting
  org.apache.commons.compress.archivers.tar.TarArchiveEntry@df31e1be
to have a property or a field named "lastModifiedTime" with value
  2286-11-20T17:46:39.999Z
but value was:
  2262-04-11T23:47:16.8547758Z

Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this is actually something misbehaving in that JDK

Copy link
Collaborator

Choose a reason for hiding this comment

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

This test has been failing for me locally as well for a while now.

@@ -1095,7 +1095,7 @@
<version>${maven.invoker.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.jboss.jandex</groupId>
<groupId>io.smallrye</groupId>
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this might cause issues with Quarkus. We need to verify that the Jandex versions are compatible.

Copy link
Member Author

Choose a reason for hiding this comment

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

org.jboss.jandex doesn't work with Java 21, and this is the solution I found in the wild, do we have any kind of nightly/snapshot tests we can use to verify the compatibility? Maybe @metacosm ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure, maybe use jandex directly instead of the plugin? I think that would require adding empty beans.xml files, though…

Copy link
Member

Choose a reason for hiding this comment

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

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@manusa manusa modified the milestones: 6.x, 6.13.0 Apr 12, 2024 — with automated-tasks
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa merged commit 3c889e7 into fabric8io:main Apr 15, 2024
20 checks passed
@manusa manusa modified the milestones: 6.13.0, 6.12.1 Apr 16, 2024
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.

4 participants