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

Allow to pass parameters via a file #441

Merged

Conversation

danielmitterdorfer
Copy link
Member

Previously we allowed users to pass track, car and plugin parameters via
a list of key-value pairs. While this covers a lot of use cases, we can
give users even more flexibility by letting them provide a file to
Rally. This allows users to pass also nested structures which is e.g.
handy to specify index settings.

Previously we allowed users to pass track, car and plugin parameters via
a list of key-value pairs. While this covers a lot of use cases, we can
give users even more flexibility by letting them provide a file to
Rally. This allows users to pass also nested structures which is e.g.
handy to specify index settings.
@danielmitterdorfer danielmitterdorfer added enhancement Improves the status quo :Usability Makes Rally easier to use labels Mar 15, 2018
@danielmitterdorfer danielmitterdorfer added this to the 0.10.0 milestone Mar 15, 2018
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

Useful addition, thanks!

I left a minor question.

esrally/rally.py Outdated
@@ -587,6 +587,15 @@ def dispatch_sub_command(cfg, sub_command):
return False


def to_dict(arg):
if io.has_extension(arg, ".json"):
import json
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor comment: you probably have your reasons, but why not have this at the top? AFAIK pep8 is rather strict about this. I read some literature preferring from json import load for inside-function uses such as this one, if it must be done.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to limit the scope of the import so we don't accidentally use this functionality somewhere else. I'm fine with putting it at the top. Mid-term it might make sense to split rally.py though.

@danielmitterdorfer danielmitterdorfer merged commit e7ab4e1 into elastic:master Mar 15, 2018
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this pull request Mar 15, 2018
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this pull request Mar 15, 2018
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this pull request Mar 15, 2018
danielmitterdorfer added a commit to elastic/rally-tracks that referenced this pull request Mar 15, 2018
danielmitterdorfer added a commit that referenced this pull request Mar 15, 2018
@danielmitterdorfer danielmitterdorfer deleted the track-param-file branch April 6, 2018 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the status quo :Usability Makes Rally easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants