Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.47k stars 4.8k forks source link

[BUG] No clear error/failure message of root cause when queue message is not base64 encoded #28799

Closed ffarinha-msft closed 5 months ago

ffarinha-msft commented 2 years ago

Library name and version

Microsoft.Azure.WebJobs.Extensions.Storage 5.0.0

Describe the bug

This is related with previously reported BUG https://github.com/Azure/azure-sdk-for-net/issues/21449 since it is not yet totally solved.

In the Microsoft.Azure.WebJobs.Extensions.Storage 5.0.0 and 5.0.1 package, there is no indication of what happened when the message encoding does not match what the [QueueTrigger] expects. For example, if the default base64 encoding is left but a non-base64 encoded queue message is encountered, it will be dead-lettered without any indication of what happened of producing visible function execution failure.

Expected behavior

There should be an error message or failed function invocations about bad message format or an encoding problem.

For example, on previous version V 4.0.5 we see the following:

image

This will cause actual function failures with the root cause which are much more visible, for example on Azure Portal under functions monitoring section.

Actual behavior

On the current 5.0.0 and 5.0.1 the functions are not even executed and only the bellow log is showed (which can be very easily unnoticed).

image

The above image is with the "by default" logging level of the Function. If we enabled Debug Level logging, we get a little bit more info about being a decoding issue but the need for enable debug logs does not seem correct. Also, once again it those not produce a function failure or even an error is more of a warning.

image

Reproduction Steps

1.Create a new Queue Trigger Azure Function app (hello world from VS code)

  1. Update to the latest Microsoft.Azure.WebJobs.Extensions.Storage version (5.0.0 or 5.0.1).
  2. Set the Connection on the [QueueTrigger] to be AzureWebJobsStorage (which defaults to the storage emulator)
  3. Enqueue a message in Azure Storage Explorer setting the encoding to UTF8 instead of the default Base 64.
  4. Run the function.
  5. Notice there is no message indicating that the problem is due to the base 64 encoding.

Environment

No response

ghost commented 2 years ago

Thank you for your feedback. This has been routed to the support team for assistance.

navba-MSFT commented 2 years ago

@ffarinha-msft Apologies for the late reply. Thanks for reaching out to us and sharing this feedback. We are looking into this issue. We will update this thread once we have more details.

navba-MSFT commented 2 years ago

@ffarinha-msft I am able to reproduce this issue. I am doing some more research on this. I will keep you posted on the progress.

navba-MSFT commented 2 years ago

@ffarinha-msft I have looped you in an email with the Product Owners to discuss this further.

navba-MSFT commented 2 years ago

There is active discussion with Service Team on this, So adding them on this github thread.

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

Issue Details
### Library name and version Microsoft.Azure.WebJobs.Extensions.Storage 5.0.0 ### Describe the bug This is related with previously reported BUG https://github.com/Azure/azure-sdk-for-net/issues/21449 since it is not yet totally solved. In the Microsoft.Azure.WebJobs.Extensions.Storage 5.0.0 and 5.0.1 package, there is no indication of what happened when the message encoding does not match what the [QueueTrigger] expects. For example, if the default base64 encoding is left but a non-base64 encoded queue message is encountered, it will be dead-lettered without any indication of what happened of producing visible function execution failure. ### Expected behavior There should be an error message or failed function invocations about bad message format or an encoding problem. For example, on previous version V 4.0.5 we see the following: ![image](https://user-images.githubusercontent.com/92974977/168579458-d8e782f3-d781-4399-899b-eec559894d0a.png) This will cause actual function failures with the root cause which are much more visible, for example on Azure Portal under functions monitoring section. ### Actual behavior On the current 5.0.0 and 5.0.1 the functions are not even executed and only the bellow log is showed (which can be very easily unnoticed). ![image](https://user-images.githubusercontent.com/92974977/168582532-8d75bcef-e735-4aa1-8422-b41c2234bc04.png) The above image is with the "by default" logging level of the Function. If we enabled Debug Level logging, we get a little bit more info about being a decoding issue but the need for enable debug logs does not seem correct. Also, once again it those not produce a function failure or even an error is more of a warning. ![image](https://user-images.githubusercontent.com/92974977/168581008-b4fc2ab9-dcd5-4609-ab94-0be223447c2b.png) ### Reproduction Steps 1.Create a new Queue Trigger Azure Function app (hello world from VS code) 2. Update to the latest Microsoft.Azure.WebJobs.Extensions.Storage version (5.0.0 or 5.0.1). 3. Set the Connection on the [QueueTrigger] to be AzureWebJobsStorage (which defaults to the storage emulator) 4. Enqueue a message in Azure Storage Explorer setting the encoding to UTF8 instead of the default Base 64. 5. Run the function. 6. Notice there is no message indicating that the problem is due to the base 64 encoding. ### Environment _No response_
Author: ffarinha-msft
Assignees: -
Labels: `Storage`, `Service Attention`, `Client`, `customer-reported`, `question`, `needs-team-attention`
Milestone: -
navba-MSFT commented 2 years ago

@xgithubtriage Please provide an update on this once you get a chance.

@ffarinha-msft for awareness.

Qualizorg commented 1 year ago

Any news?

@jaschrep-msft @ffarinha-msft

navba-MSFT commented 1 year ago

@jaschrep-msft Any updates on this ?

jaschrep-msft commented 1 year ago

Sorry, it's been difficult to prioritize this work. Can we get a summary of the specific gap between the referenced #21449 and this one?

github-actions[bot] commented 5 months ago

Hi @ffarinha-msft, we deeply appreciate your input into this project. Regrettably, this issue has remained unresolved for over 2 years and inactive for 30 days, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.