-
Notifications
You must be signed in to change notification settings - Fork 314
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
Let the runner determine progress #789
Conversation
With this commit we add the ability to have runners determine progress. Usually the runner is just responsible for executing requests and the parameter source is determining completion. However, there are cases, like snapshot/restore or replication where we need to determine progress based on a request against Elasticsearch.
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!
Left a nit that doesn't require further reviews.
def __init__(self, runnable, name, context_manager_enabled=False): | ||
def _single_cluster_runner(runnable, name, context_manager_enabled=False): | ||
# only pass the default ES client | ||
delegate = DelegatingRunner(runnable, name, lambda es: es["default"], context_manager_enabled) |
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.
Clever idea!
tests/driver/driver_test.py
Outdated
# The runner will determine progress | ||
"size": None | ||
}, | ||
param_source="driver-test-param-source"), |
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.
nit: indentation seems a bit wonky 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.
Thanks! Addressed in b1c5b72.
With this commit we add the ability to have runners determine progress.
Usually the runner is just responsible for executing requests and the
parameter source is determining completion. However, there are cases,
like snapshot/restore or replication where we need to determine progress
based on a request against Elasticsearch.