Azure / azure-sdk-tools

Tools repository leveraged by the Azure SDK team.
MIT License
110 stars 172 forks source link

Tests with bodies encoded by azure-storage-extensions compression crashing the test-proxy #8895

Open scbedd opened 2 weeks ago

scbedd commented 2 weeks ago

If we don't support a compression algorithm, we currently explode.

Source teams discussion

I need to dig into better fallback.

The lowest effort fix would be to not decompress, treat as bytes, and move on. (no sanitization). However, I think we could take the easier path of taking a dependency on .net version of azure.storage.extensions to get access to the compression algorithm in the test-proxy. That way we don't own implementation but still support it natively.

Going to dig into the test a bit more.

scbedd commented 2 weeks ago

Python repro steps

<activate venv>
git clone https://github.com/weirongw23-msft/azure-sdk-for-python.git
git checkout weirongw23/decompression
cd sdk/storage/azure-storage-blob
python -m pip install .
python -m pip install -r dev_requirements.txt
set PROXY_URL=http://localhost:5000
set PROXY_MANUAL_START=true
set AZURE_SKIP_LIVE_RECORDING="False"
set AZURE_TEST_RUN_LIVE="true"
set STORAGE_ACCOUNT_KEY="<snip>"
set STORAGE_ACCOUNT_NAME="<snip>"
pytest .\tests\test_common_blob.py -sk "test_download_blob_decompress"
scbedd commented 2 weeks ago

Test reproing this issue.

What's really weirding me out here is that this error is occurring on the response. Here is the response that is actually failing the proxy:

image