Skip to content

Revert "[Recorder] Workaround for the "url-path with single quotes" bug in nock (#13474)"#13488

Merged
1 commit merged intoAzure:masterfrom
HarshaNalluru:harshan/revert-workaround
Jan 29, 2021
Merged

Revert "[Recorder] Workaround for the "url-path with single quotes" bug in nock (#13474)"#13488
1 commit merged intoAzure:masterfrom
HarshaNalluru:harshan/revert-workaround

Conversation

@HarshaNalluru
Copy link
Copy Markdown
Contributor

@HarshaNalluru HarshaNalluru commented Jan 29, 2021

This reverts commit 5cd508c.

Since the regex had replaced an expected fixture at data-tables PR.
TODO: Come up with another regex that would not affect the single quotes in the second argument of post() call in the nock fixture.

@ghost
Copy link
Copy Markdown

ghost commented Jan 29, 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.

@HarshaNalluru HarshaNalluru enabled auto-merge (squash) January 29, 2021 22:13
@HarshaNalluru
Copy link
Copy Markdown
Contributor Author

/check-enforcer override

@ghost ghost merged commit 230fd72 into Azure:master Jan 29, 2021
HarshaNalluru added a commit to HarshaNalluru/azure-sdk-for-js that referenced this pull request Jan 30, 2021
ghost pushed a commit that referenced this pull request Feb 1, 2021
…rted "workaround" (#13494)

#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.
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