Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Great example. Wondering if it is correct?
Should this be
because that the end there is
'\'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.
Haha, having just spent several hours settling on this exact sequence of characters, I can certify that it's correct ;)
Actually, I would like to get at least one other person to try it out. Do you mind?
To answer your question, here's how it works:
first string (wrapped in single quotes for consistency with the second string):
--parametersfirst escaped single quote:
\'second string (wrapped in single quotes to avoid evaluating the special characters):
{"from_version":"0.10.1.1","to_version":"2.6.0-SNAPSHOT"}second escaped single quote:
\'Following Bash rules, a sequence of strings and characters just get concatenated, so all of the above gets smashed together to form the desired final string:
--parameters '{"from_version":"0.10.1.1","to_version":"2.6.0-SNAPSHOT"}'which will then be evaluated again by Bash inside the docker container, so that the final argument to ducktape is the desired argument list:
--parameters, followed by{"from_version":"0.10.1.1","to_version":"2.6.0-SNAPSHOT"}.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 tried it out on Friday but left it running and forgot to report back. It passed for me 👍