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

Create jvm options dsl and generator in gradle #32257

Closed
rjernst opened this issue Jul 20, 2018 · 6 comments
Closed

Create jvm options dsl and generator in gradle #32257

rjernst opened this issue Jul 20, 2018 · 6 comments
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team

Comments

@rjernst
Copy link
Member

rjernst commented Jul 20, 2018

Elasticsearch has a text file called jvm.options which is pretty much a line delimited set of additional command line arguments for java when invoked by bin/elasticsearch (with the caveat it has version specific conditionals to allow eg java 9 specific options). While the integration tests, by virtue of running bin/elasticsearch, use these options, the unit tests do not. This issue is intended to outline a proposal for how unit tests can use these options, without the need for duplication across gradle and the jvm.options text file.

The proposal is to move the specification of the jvm options we ship with into gradle itself. That would allow the unit tests to consume the dsl (or rather, the dsl can fan it's configured settings out to all RandomizedTestTasks or something like that), and the shipped jvm.options file can be generated from the dsl as part of the distribution build.

@rjernst rjernst added the :Delivery/Build Build or test infrastructure label Jul 20, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@alpar-t
Copy link
Contributor

alpar-t commented Sep 18, 2018

@rjernst what is the advantage of the DSL vs reading the file and passing in the arguments for the tests ? We could expose it trough a configuration on the relevant project and make it a proper dependency if you are concerned about locating it.

@rjernst
Copy link
Member Author

rjernst commented Sep 18, 2018

The file has a syntax that is not simple to read (we have our own parser so we can have options specific to a java version). Since we need this at gradle configuration time, we would have a chicken/egg problem because to reuse that parser would mean already having compiled the parser.

@pgomulka
Copy link
Contributor

this issue should also be taken into account #48222

@cbuescher
Copy link
Member

Also related: #46118 (comment)

@rjernst rjernst added the Team:Core/Infra Meta label for core/infra team label May 4, 2020
@mark-vieira mark-vieira added Team:Delivery Meta label for Delivery team and removed Team:Core/Infra Meta label for core/infra team labels Nov 11, 2020
@mark-vieira
Copy link
Contributor

I think this is even less compelling with the addition of auto heap sizing so we've reduced the need for folks to touch the jvm.options file at all by a significant amount. I'm going to close this issue unless a testing scenario that would benefit from such a thing comes up again.

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 Team:Delivery Meta label for Delivery team
Projects
None yet
Development

No branches or pull requests

6 participants