Azure / Azure/azure-sdk-tools

[Test-Proxy] Newline characters in request bodies producing cross-platform failures

Open
#4,550 1 comment 0 reactions 1 assignee Claimed by @scbedd View on GitHub
Test-Proxy
Dominant language
C#
Stars
135
Forks
260
Avg merge
1d 22h
Merged PRs (30d)
115

Description

@zhengfeiwang reported an issue where body content matching is failing on some CI platforms because newline characters are being recorded as either `\r\n` or `\n`, and incoming playback requests on other platforms sometimes use the opposite newline representation. The issue has been mitigated by turning off body matching for affected tests, but I do wonder if there's any way we can stick to one, platform-agnostic newline representation.

More issue details below, as reported by Zhengfei:

> In AzureML, we have code logic that uploads code files to service side to get ARM ID, and the file content locates in request body. Meanwhile, our CI pipelines will check across windows/Linux/mac. While windows and Linux/mac have different line separator, this leads to the file content differs ("\r\n" and "\n") across different OS, then request body doesn't match any recording and proxy server finally return not found error.
![MicrosoftTeams-image](https://user-images.githubusercontent.com/39780829/198700736-d371496b-b30c-43e7-afba-3788f6515dbe.png)

@scbedd for notifs

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.