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

[java] Bumping Java deps #12528

Merged
merged 6 commits into from
Aug 11, 2023
Merged

[java] Bumping Java deps #12528

merged 6 commits into from
Aug 11, 2023

Conversation

diemol
Copy link
Member

@diemol diemol commented Aug 10, 2023

  • Adding @SuppressWarnings({"rawtypes", "RedundantSuppression"}) to remove warning from AutoService using raw types and generics.
  • Setting System.setProperty("otel.logs.exporter", "none"); to keep the open telemetry behaviour as before.

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Also, fixes SeleniumHQ/docker-selenium#1883

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

- Adding `@SuppressWarnings({"rawtypes", "RedundantSuppression"})` to remove warning from AutoService using raw types and generics.
- Setting `System.setProperty("otel.logs.exporter", "none");` to keep the open telemetry behaviour as before.
@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (1477f3a) 57.26% compared to head (127e9f1) 57.26%.

❗ Current head 127e9f1 differs from pull request most recent head cef3fe7. Consider uploading reports for the commit cef3fe7 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #12528   +/-   ##
=======================================
  Coverage   57.26%   57.26%           
=======================================
  Files          86       86           
  Lines        5335     5335           
  Branches      198      198           
=======================================
  Hits         3055     3055           
  Misses       2082     2082           
  Partials      198      198           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joerg1985
Copy link
Member

joerg1985 commented Aug 10, 2023

@diemol will merging this not automatically set the minimum java version to 11?

graphql-java now requires Java 11 as a minimum version

@titusfortner
Copy link
Member

I thought we just changed all of the CI execution to Java 17 for bazel reasons?

@diemol
Copy link
Member Author

diemol commented Aug 10, 2023

I thought we just changed all of the CI execution to Java 17 for bazel reasons?

@titusfortner when? I was not aware of that.

@diemol
Copy link
Member Author

diemol commented Aug 10, 2023

@diemol will merging this not automatically set the minimum java version to 11?

graphql-java now requires Java 11 as a minimum version

Thanks for pointing it out, @joerg1985. I did not read the release notes. The strange part is that it seems things build with Java 8 as a target.

@titusfortner
Copy link
Member

415786b which broke .NET tests because it was still using 11 and I'm working on fixing that in a branch on that now (b4771bb)

@diemol
Copy link
Member Author

diemol commented Aug 10, 2023

I don't understand why tests using mockito fail, they pass for me locally.

@joerg1985
Copy link
Member

I don't understand why tests using mockito fail, they pass for me locally.

Bazel is again swallowing the cause of the exception thrown, i think this is something that should be fixed.

The logged 'IllegalStateException' is raised here and this should have a cause set:
https://github.com/mockito/mockito/blob/ece6107a22f0e4ea89dca7a9cfd7791f6a362a26/src/main/java/org/mockito/internal/configuration/plugins/PluginLoader.java#L90

@joerg1985
Copy link
Member

joerg1985 commented Aug 10, 2023

@diemol Looks like the mockito-inline is not needed any more, removing it from maven_deps.bzl and .../remote/BUILD.bazel does not fix the issue, but will make different tests fail with another root cause.

I added this to the try/catch block in CommandLineTest.spyProcess

    } catch (IllegalStateException e) {
      throw new RuntimeException(e.getCause().getCause().getCause().toString());
    }

No i get this output:

java.lang.RuntimeException: org.mockito.exceptions.base.MockitoInitializationException: 
Could not initialize inline Byte Buddy mock maker.

It appears as if your JDK does not supply a working agent attachment mechanism.
Java               : 17
JVM vendor name    : Azul Systems, Inc.
JVM vendor version : 17+35-LTS
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 17+35-LTS
JVM info           : mixed mode, sharing
OS name            : Linux
OS version         : 6.4.7-200.fc38.x86_64

	at org.openqa.selenium.os.CommandLineTest.spyProcess(CommandLineTest.java:161)
	at org.openqa.selenium.os.CommandLineTest.<init>(CommandLineTest.java:49)

And this seems to be this issue mockito/mockito#2436

@diemol
Copy link
Member Author

diemol commented Aug 10, 2023

Thanks for debugging, @joerg1985. I will revert the version bump and watch the issue.

It is just strange that it passes for me locally.

@joerg1985
Copy link
Member

It is just strange that it passes for me locally.

Are you at jdk 17 or jdk 11 locally?

@diemol diemol merged commit 641bc29 into trunk Aug 11, 2023
50 of 51 checks passed
@diemol diemol deleted the bump-java-deps branch August 11, 2023 07:32
@diemol
Copy link
Member Author

diemol commented Aug 11, 2023

It is just strange that it passes for me locally.

Are you at jdk 17 or jdk 11 locally?

JDK 11 locally, but Bazel is using JDK 17 to run everything. However, if I run it on macOS it does not fail. On a Linux machine, it fails.

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.

[🐛 Bug]: opentelemetry-exporter-otlp not found on classpath
4 participants