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

Fail fast if leading / is missing from path in raw-request #1064

Merged
merged 3 commits into from
Sep 22, 2020

Conversation

ebadyano
Copy link
Contributor

Check for mandatory leading / in path parameter of raw-request. Raise RallyException if it's missing.

Closes #1063

Check for mandatory leading `/` in path parameter of raw-request. Raise
RallyException if it's missing.

Closes elastic#1063
@ebadyano ebadyano added enhancement Improves the status quo :Usability Makes Rally easier to use labels Sep 18, 2020
@ebadyano ebadyano added this to the 2.0.2 milestone Sep 18, 2020
@ebadyano ebadyano self-assigned this Sep 18, 2020
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.

LGTM (left one nit)

@@ -1425,8 +1425,13 @@ async def __call__(self, es, params):
request_params["ignore"] = params["ignore"]
request_params.update(params.get("request-params", {}))

path = mandatory(params, "path", self)
if not path.startswith("/"):
self.logger.error("RawRequest failed. Path parameter: [%s] must begin with a '/'", path)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: missing full stop after '/' (you have it in the exception below).

@ebadyano
Copy link
Contributor Author

@dliappis Thank you for the review!

@ebadyano ebadyano merged commit cbabf05 into elastic:master Sep 22, 2020
@ebadyano ebadyano deleted the rally-path branch December 16, 2022 15:16
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.

Fail fast is leading / is missing from path in raw-transport operation
2 participants