-
Notifications
You must be signed in to change notification settings - Fork 313
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
Extend error msg to specify operation name for missing index #872
Conversation
operation with multiple indices Closes #597
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a couple of suggestions. Can you please also add a test for SearchParamSource
that raises the error?
esrally/track/params.py
Outdated
@@ -365,7 +365,7 @@ def __init__(self, track, params, **kwargs): | |||
} | |||
|
|||
if not index_name: | |||
raise exceptions.InvalidSyntax("'index' is mandatory") | |||
raise exceptions.InvalidSyntax("'index' is mandatory and is missing for operation '%s'" % kwargs.get("operation_name")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per convention we should use the format
method instead of % formatting.
esrally/track/loader.py
Outdated
@@ -314,7 +314,7 @@ def operation_parameters(t, op): | |||
if op.param_source: | |||
return params.param_source_for_name(op.param_source, t, op.params) | |||
else: | |||
return params.param_source_for_operation(op.type, t, op.params) | |||
return params.param_source_for_operation(op.type, t, op.params, op.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each operation will have a name but if we specify operations inline with a task, it's the operation type's name. How about we instead use the task's name here which is always recognizable by the user (see attached patch for a sketch).
@ebadyano seems
Can you please have a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Closes #597