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

Remove --illegal-access option in test base plugin #71908

Closed

Conversation

pugnascotia
Copy link
Contributor

The --illegal-access JVM option is deprecated and will be removed in
a future release. The default going forwards is deny.

The `--illegal-access` option is deprecated and will be removed in
a future release. The default going forwards is `deny`.
@pugnascotia pugnascotia added >non-issue :Delivery/Build Build or test infrastructure v8.0.0 labels Apr 20, 2021
@elasticmachine elasticmachine added the Team:Delivery Meta label for Delivery team label Apr 20, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@mark-vieira
Copy link
Contributor

I'm not sure what this exactly buys us other than less noise. If this option is eventually going away, and then the default will become deny that poses a problem. We'll then just be silently ignoring a bomb that's going to go off at some indeterminate time.

I think we should be more deliberate here. What's the intention of warning on illegal access? Do we have a procedure for handling these instances? Do we even have any, and the warning is just due to the use of a deprecated CLI option?

I suspect switching to deny is not going to be an option. There are likely loads of illegal access happening in libraries we depend on that won't be updated until the JDK forces their hands. We should at least determine if any of our code is doing this kind of thing and have some system in place for ensuring we don't accidentally introduce a regression here (forbidden apis?).

@mark-vieira
Copy link
Contributor

Looks like the default has changed to deny in Java 16 as running our build with Java 16 now results in failures like this unless you add --illegal-access=allow (or warn) to the Gradle JVM args.

https://gradle-enterprise.elastic.co/s/7io6roxp2k676

rjernst added a commit to rjernst/elasticsearch that referenced this pull request Apr 30, 2021
Since Java 16, the default value for illegal-access is deny. This means
the latest release of Elasticsearch, and all current integration tests,
run with deny (since we don't explicitly set it in jvm options). Yet
tests run with illegal-access=warn, for legacy reasons. elastic#71908
proposed to remove the setting from test jvms, but concerns were raised
there about whether this would cause some test failures.

This commit explicitly sets tests to deny. This has the added benefit
that any failures will be caught even when running tests with older
jvms.
rjernst added a commit that referenced this pull request Jun 2, 2021
Since Java 16, the default value for illegal-access is deny. This means
the latest release of Elasticsearch, and all current integration tests,
run with deny (since we don't explicitly set it in jvm options). Yet
tests run with illegal-access=warn, for legacy reasons. #71908
proposed to remove the setting from test jvms, but concerns were raised
there about whether this would cause some test failures.

This commit explicitly sets tests to deny. This has the added benefit
that any failures will be caught even when running tests with older
jvms.
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Jun 2, 2021
Since Java 16, the default value for illegal-access is deny. This means
the latest release of Elasticsearch, and all current integration tests,
run with deny (since we don't explicitly set it in jvm options). Yet
tests run with illegal-access=warn, for legacy reasons. elastic#71908
proposed to remove the setting from test jvms, but concerns were raised
there about whether this would cause some test failures.

This commit explicitly sets tests to deny. This has the added benefit
that any failures will be caught even when running tests with older
jvms.
rjernst added a commit that referenced this pull request Jun 3, 2021
Since Java 16, the default value for illegal-access is deny. This means
the latest release of Elasticsearch, and all current integration tests,
run with deny (since we don't explicitly set it in jvm options). Yet
tests run with illegal-access=warn, for legacy reasons. #71908
proposed to remove the setting from test jvms, but concerns were raised
there about whether this would cause some test failures.

This commit explicitly sets tests to deny. This has the added benefit
that any failures will be caught even when running tests with older
jvms.
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Sep 23, 2021
Since Java 16, the default value for illegal-access is deny. This means
the latest release of Elasticsearch, and all current integration tests,
run with deny (since we don't explicitly set it in jvm options). Yet
tests run with illegal-access=warn, for legacy reasons. elastic#71908
proposed to remove the setting from test jvms, but concerns were raised
there about whether this would cause some test failures.

This commit explicitly sets tests to deny. This has the added benefit
that any failures will be caught even when running tests with older
jvms.
elasticsearchmachine pushed a commit that referenced this pull request Sep 23, 2021
Since Java 16, the default value for illegal-access is deny. This means
the latest release of Elasticsearch, and all current integration tests,
run with deny (since we don't explicitly set it in jvm options). Yet
tests run with illegal-access=warn, for legacy reasons. #71908
proposed to remove the setting from test jvms, but concerns were raised
there about whether this would cause some test failures.

This commit explicitly sets tests to deny. This has the added benefit
that any failures will be caught even when running tests with older
jvms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants