Azure / Azure/azure-sdk-for-rust

Cosmos: Disable Binary Encoding Support for vNext Emulator

Closed
#5,240 0 comments 1 reaction 1 assignee Claimed by @kundadebdatta View on GitHub
binary-encoding Cosmos
Dominant language
Rust
Stars
884
Forks
365
Avg merge
2d 19h
Merged PRs (30d)
109

Description

As a part of the Rust SDK GA, binary encoding is enabled by default. However, the vNext emulator doesn't support binary encoding by default, and therefore our v-next emulator tests are failing with the below error:

```
failures:

---- emulator_tests::driver_patch::cosmos_patch_pk_guard stdout ----
Error: 400/1001 (PartitionKeyMismatch): Cosmos DB returned HTTP 400/1001: PartitionKeyMismatch

Diagnostics:
{"activity_id":"51634d8f-aa2e-4e6a-8e4c-635b4498b76c","total_duration_ms":7,"total_request_charge":1.0,"request_count":1,"system_usage":{"cpu":{"samples":[],"status":"unavailable"},"processor_count":4,"cpu_overloaded":false},"machine_id":"vmId_26a92d37-c85c-491c-9b36-27dafd9f6dc2","regions":[{"region":"southcentralus","request_count":1,"total_request_charge":1.0,"first":{"execution_context":"initial","endpoint":"http://localhost:8081/","status":"400/1001 (PartitionKeyMismatch)","request_charge":1.0,"duration_ms":7,"timed_out":false},"last":null,"deduplicated_groups":[]}]}

---- emulator_tests::driver_patch::cosmos_patch_pk_guard_hierarchical stdout ----
Error: 400/1001 (PartitionKeyMismatch): Cosmos DB returned HTTP 400/1001: PartitionKeyMismatch

Diagnostics:
{"activity_id":"effb9191-d3e9-4663-8e97-b9f58714db7f","total_duration_ms":8,"total_request_charge":1.0,"request_count":1,"system_usage":{"cpu":{"samples":[],"status":"unavailable"},"processor_count":4,"cpu_overloaded":false},"machine_id":"vmId_26a92d37-c85c-491c-9b36-27dafd9f6dc2","regions":[{"region":"southcentralus","request_count":1,"total_request_charge":1.0,"first":{"execution_context":"initial","endpoint":"http://localhost:8081/","status":"400/1001 (PartitionKeyMismatch)","request_charge":1.0,"duration_ms":7,"timed_out":false},"last":null,"deduplicated_groups":[]}]}

---- emulator_tests::driver_patch::cosmos_patch_semantics stdout ----

thread 'emulator_tests::driver_patch::cosmos_patch_semantics' (34990) panicked at sdk/cosmos/azure_data_cosmos_driver/tests/emulator_tests/driver_patch.rs:853:41:
[remove-root-scalar] seed failed: 400/1001 (PartitionKeyMismatch): Cosmos DB returned HTTP 400/1001: PartitionKeyMismatch
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

failures:
emulator_tests::driver_patch::cosmos_patch_pk_guard
emulator_tests::driver_patch::cosmos_patch_pk_guard_hierarchical
emulator_tests::driver_patch::cosmos_patch_semantics

test result: FAILED. 16 passed; 3 failed; 17 ignored; 0 measured; 0 filtered out; finished in 32.02s
```

Acceptance Criteris:

- **Short Term:** Disable binary encoding for those v-next emulator tests.
- **Long Term:** Follow up with the vnext emulator team to add binary encoding support as a long term fix, which is ideal.

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.