[Recorder] Single quotes in the url-path - careful revert of the reverted "workaround"#13494
Merged
5 commits merged intoAzure:masterfrom Feb 1, 2021
Conversation
…uotes" bug in nock (Azure#13474)" (Azure#13488)" This reverts commit 230fd72.
xirzec
approved these changes
Jan 30, 2021
Member
xirzec
left a comment
There was a problem hiding this comment.
Looks reasonable for now, but maybe put the link to the nock bug in a comment so someone can go check on if it's fixed later without having to dig up the link?
HarshaNalluru
commented
Jan 30, 2021
|
Hello @HarshaNalluru! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
3 tasks
openapi-sdkautomation bot
pushed a commit
to AzureSDKAutomation/azure-sdk-for-js
that referenced
this pull request
Mar 30, 2021
datamigration readme t2 config (Azure#13494) * datamigration readme t2 config * datamigration readme change * datamigration readme change V2 * dataMigration readme change
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#13474 added a workaround in the recorder but was reverted soon at #13488 because the presence of single quotes in the request body had corrupted the updated fixture due to the workaround.
For the case with request bodies, since the request body may contain literally anything, it is not trivial to come up with a regex to split the arguments. Any regex would have assumptions on the line saved by nock, i.e., the number of spaces in between the arguments and the characters with which the payload would start and what the url-path may contain.
Given the problems, it might be much better if we get the fix from nock before the string/fixture is saved.
And since we have only seen the single quotes with the delete requests and that too for the requests without the request body, I'm inclined to have the workaround only for that case(without the request bodies).
I have left a TODO for the case with request bodies for now.
Have tested this fix with the data-tables SDK, and I was able to record and playback all the
data-tablestests. This would unblock #12548.