Closed danielszaniszlo closed 3 months ago
I was able to fix the issue by modifying the removeSanitizers:
await recorder.start({
envSetupForPlayback: replaceableVariables,
sanitizerOptions: {
bodyKeySanitizers: [
{
value: replaceableVariables.STORAGE_ACCOUNT_SAS_URI,
jsonPath: "$..location",
regex: "^(?!.*FAKE_STORAGE_ACCOUNT).*",
}
],
},
removeCentralSanitizers: ["AZSDK4001", "AZSDK2030", "AZSDK3430","AZSDK3493"],
});
Describe the bug I recently regenerated our SDK and upgraded
@azure/core-lro
package tov3.0.1
. Since then the LRO polling is not working inplayback
mode. I think it is related to test proxy somehow removes parts of the URL. In live mode everything works fine test cases are passing. I think something is related to sanitizers. I just recently did the same task for JAVA and there I was removing these two sanitizers:"AZSDK2003", "AZSDK2030"
but if I remove them here I get the following error:RecorderError: removeSanitizers request failed.
When I look at the new recording under.assets\xt6hYh2zvq\js\sdk\healthdataaiservices\azure-health-deidentification\recordings\browsers\batch\recording_jobe2e_wait_until_success.json
I can notice that the first request has theoperation-location
inResponseHeaders
but after that the polling requests doesn't have theoperation-location
in theResponseHeaders
. Also the initial request is going tohttps://example.com/jobs/js-sdk-job-recorded-003i?api-version=2024-07-12-preview
and after that the polling requests arehttps://example.com/?api-version=2024-07-12-preview
somehow the/jobs/js-sdk-job-recorded-003i
got removed.I have the following setup for sanitizers and env variables:
This is my PR: https://github.com/Azure/azure-sdk-for-js/pull/30049
Screenshots
Additional context Add any other context about the problem here.