Skip to content

[Recorder] Single quotes in the url-path - careful revert of the reverted "workaround"#13494

Merged
5 commits merged intoAzure:masterfrom
HarshaNalluru:harshan/recorder/nock-single-quotes-core-v2
Feb 1, 2021
Merged

[Recorder] Single quotes in the url-path - careful revert of the reverted "workaround"#13494
5 commits merged intoAzure:masterfrom
HarshaNalluru:harshan/recorder/nock-single-quotes-core-v2

Conversation

@HarshaNalluru
Copy link
Copy Markdown
Contributor

@HarshaNalluru HarshaNalluru commented Jan 30, 2021

#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-tables tests. This would unblock #12548.

Copy link
Copy Markdown
Member

@xirzec xirzec left a comment

Choose a reason for hiding this comment

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

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?

@ghost
Copy link
Copy Markdown

ghost commented Feb 1, 2021

Hello @HarshaNalluru!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 7ec5c9e into Azure:master Feb 1, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants