Azure / Azure/azure-sdk-tools

`BodyKeySanitizer` applying to body with escaped unicode results in failure to match

Open
#8,341 0 comments 0 reactions 1 assignee Claimed by @scbedd View on GitHub
Central-EngSys Test-Proxy
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
144

Description

Occurring on commit `b5320b85f1303024252651f5075fc45c9946f78d` of [revise-common-sanitizers](https://github.com/samvaity/azure-sdk-for-java/tree/revise-common-sanitizers) branch.

Go after `TextAnalyticsClientTest#recognizePiiEntitiesEmojiWithSkinToneModifier` to repro. This should be transferred to a unit test while integrating the fix.

[Existing recording](https://github.com/Azure/azure-sdk-assets/blob/java/textanalytics/azure-ai-textanalytics_fbd1568119/java/sdk/textanalytics/azure-ai-textanalytics/src/test/resources/session-records/TextAnalyticsClientTest.recognizePiiEntitiesEmojiWithSkinToneModifier%5B1%5D.json)

AFAICT it is [this LoC](https://github.com/Azure/azure-sdk-tools/blob/04333b37b738c9a0ca13ef480728fe09cde566eb/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Sanitizers/BodyKeySanitizer.cs#L104) breaking the serialization. Then during matching the bytes don't line up.

![image](https://github.com/Azure/azure-sdk-tools/assets/45376673/8b236695-13a1-40a7-a335-14abb927b48b)

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.