-
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
Warn when cluster settings cannot be applied #542
Warn when cluster settings cannot be applied #542
Conversation
With this commit we issue a warning on the terminal when a user runs a track that specifies cluster settings but uses the benchmark-only pipeline. Previously we issued a warning in the logs but this is not the first place user is looking (nor should they be required to in this case). Closes elastic#541
Example output:
I am not so happy about the fact that we render the settings as JSON (ideal would be YAML) but I figured this compromise is ok. The |
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.
Thanks for the quick action here!
I left a question.
esrally/mechanic/mechanic.py
Outdated
@@ -270,6 +269,12 @@ def receiveMsg_StartEngine(self, msg, sender): | |||
|
|||
if msg.external: | |||
self.logger.info("Cluster will not be provisioned by Rally.") | |||
if msg.cluster_settings: | |||
import json |
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 am curious, do you feel that import json
at the top of the file as per PEP 8 is risky for the performance or is there some other reason? I know that there are issues with the log level when the elasticsearch module is imported at top level, but unsure about the reason here.
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.
It was more to avoid that usage of the json
module does not spread across mechanic
because I felt it should not. I changed it now to a top-level import.
Thanks for your quick review! |
With this commit we issue a warning on the terminal when a user runs a
track that specifies cluster settings but uses the benchmark-only
pipeline. Previously we issued a warning in the logs but this is not the
first place user is looking (nor should they be required to in this
case).
Closes #541