Skip to content

Commit

Permalink
Fix misleading error message when gradle is present but jdk9 is not
Browse files Browse the repository at this point in the history
Currently when `esrally configure` is run, the gradle binary path is
persisted to rally.ini only if jdk9 is also installed.  However, when
`esrally` is run in benchmark_from_source mode (e.g., no args provided),
the gradle binary path in rally.ini is referenced before any jdk9 checks
take place -- leading to the following message:
`No value for mandatory configuration: section=build, key=gradle.bin`

This commit persists the gradle binary path to rally.ini in any case,
allowing existing logic around jdk9 to emit a sensible error.

Fixes #423
Relates #425
  • Loading branch information
tomcallahan authored and danielmitterdorfer committed Mar 9, 2018
1 parent 188495b commit 512e2a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions esrally/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ def create_config(self, config_file, advanced_config=False, assume_defaults=Fals
# the Elasticsearch directory is just the last path component (relative to the source root directory)
config["source"]["elasticsearch.src.subdir"] = io.basename(source_dir)

if gradle_bin:
config["build"] = {}
config["build"]["gradle.bin"] = gradle_bin

Expand Down

0 comments on commit 512e2a0

Please sign in to comment.