Skip to content

x-ms-client-request-id overwritten by CLI core #25831

@saisankargochhayat

Description

@saisankargochhayat

Describe the bug
Unable to set

rpHeaders = {
                        "x-ms-client-request-id": <any valid guid>,
                    }
appl_client.appliances.begin_create_or_update(resource_group_name=resourceData['resource']['resource_group'],
                                                      resource_name=resourceData['resource']['name'],
                                                      parameters=appliance, headers=rpHeaders)

cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies: 'Content-Length': '176'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '4159a480-c203-11ed-b9e5-6045bdc724a4'
cli.azure.cli.core.sdk.policies: 'x-ms-return-client-request-id': 'True'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'CommandName': 'arcappliance deploy vmware'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--config-file --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.45.0 (PIP) azsdk-python-mgmt-resourceconnector/1.0.0b3 Python/3.10.8 (Windows-10-10.0.22000-SP0) arcappliance-extension-version/1.0.0'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
Related issue - Azure/azure-sdk-for-python#29325

To Reproduce

Expected behavior
Passing the header with x-ms-client-request-id should be respected by CLI core

Environment summary

Environment Summary

Windows-10-10.0.22000-SP0
Python 3.10.8
Installer: PIP

azure-cli 2.45.0 *

Extensions:
arcappliance 1.0.1b0
arcappliance 0.2.30 (dev) E:\sgochhayat\arcappliance-cli-extensions\src\arcappliance

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional context

Metadata

Metadata

Labels

Azure CLI TeamThe command of the issue is owned by Azure CLI teamCoreCLI core infrastructureact-platform-engineering-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions