-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fix --number-of-docs bug in create-workload #659
Fix --number-of-docs bug in create-workload #659
Conversation
Signed-off-by: Ian Hoang <[email protected]>
Signed-off-by: Ian Hoang <[email protected]>
Signed-off-by: Ian Hoang <[email protected]>
Signed-off-by: Ian Hoang <[email protected]>
Signed-off-by: Ian Hoang <[email protected]>
osbenchmark/utils/opts.py
Outdated
|
||
# If values contains spaces, user provided 2+ key value pairs | ||
kv_pairs = values[0].split(" ") | ||
|
||
for kv in kv_pairs: |
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.
fIs this the case where the user provides multiple entries in a single arg within shell quotes?
--number-of-docs "x:3 y:4 z:8"
In that case, nargs
should be 1, not +.
To handle both cases with +, this code should be activated only when len(values) is 1. In other cases, this should fall back to the earlier mode of processing.
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.
Got it. Will implement it to where it handles both use cases.
Signed-off-by: Ian Hoang <[email protected]>
Signed-off-by: Ian Hoang <[email protected]>
Description
Currently, there's a bug in create-workload when users specify the number of docs to extract from an index. Addressing the fix in this PR. This PR also adds more error handling and warnings to streamline user experience.
Issues Resolved
#658
Testing
Tested with these scenarios:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.