Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert amqp mgmt string type check to avoid log error when description is null #235

Merged

Conversation

yunhaoling
Copy link
Contributor

@yunhaoling yunhaoling commented Apr 28, 2021

when servicebus mgmt operation succeeds, the service returns status code 200 and desc_value is of type AMQP_TYPE_NULL.
we should not call amqpvalue_get_string on a NULL type.

issue: Azure/azure-sdk-for-python#18361 (comment)

revert the following check in v1.2.13 to avoid the misleading error log. (not sure why the changes get ignored when I was updating the dependency..)

AMQP_TYPE amqp_type = amqpvalue_get_type(desc_value);
if (amqp_type == AMQP_TYPE_STRING)
{
...
}

see code in v1.2.13 here:
https://github.com/Azure/azure-uamqp-python/blob/v1.2.13/src/vendor/azure-uamqp-c/src/amqp_management.c#L201-L210
(originally from PR: #102)

@yunhaoling yunhaoling assigned annatisch and unassigned annatisch Apr 29, 2021
@yunhaoling yunhaoling requested a review from annatisch April 29, 2021 15:31
HISTORY.rst Outdated Show resolved Hide resolved
@yunhaoling yunhaoling merged commit f85df2f into Azure:master Apr 29, 2021
@yunhaoling yunhaoling deleted the mgmt-op-amqpvaluegetstring-log-fix branch April 29, 2021 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants