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

[BUG] empty responses throw exceptions #47544

Closed
cataggar opened this issue Dec 13, 2024 · 2 comments
Closed

[BUG] empty responses throw exceptions #47544

cataggar opened this issue Dec 13, 2024 · 2 comments
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. duplicate This issue is the duplicate of another issue needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team

Comments

@cataggar
Copy link
Member

cataggar commented Dec 13, 2024

Library name and version

Azure.Core 1.44.0

Describe the bug

Empty HTTP responses throw exceptions when using Azure.Core >= 1.44.0 with System.Memory.Data == 6.0.0 due to dotnet/runtime#68262. It was fixed in dotnet/runtime#68349, so System.Memory.Data >= 7.0.0 no longer has the bug. Please consider updating to System.Memory.Data >= 7.0.0

Sounds like you have a plan:

We're currently working to bump the 6.x dependencies to 8.x, but doing so requires internal coordination to ensure we retain compatibility with the Azure Functions host and supported versions of PowerShell.
#46444 (comment)

I understand the workaround is to update our apps ourselves to System.Memory.Data >= 7.0.0. In this internal pull request, I have to update it in a couple of dozen projects. If we miss one, we potentially have runtime exceptions in the clients.

Expected behavior

Empty HTTP responses do not throw exceptions.

Actual behavior

Empty HTTP responses throw exceptions.

Reproduction Steps

The internal pull request is using Geneva Actions, so here is the unit test that reproduced it:

        [TestMethod]
        public void LogResponseEmptyContent_Test()
        {
            // Arrange
            var mockResponse = new StubAzureResponse(content: BinaryData.Empty);

            // Act
            var logResponse = AcisOpUtils.LogResponse(mockResponse, logger);

            // Assert
            Assert.AreEqual(SuccessResult.Success, logResponse.SuccessResult);
            Assert.AreEqual(string.Empty, logResponse.Result);
        }

It should be pretty easy to do in the Azure.Core unit tests as well.

Environment

No response

@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 13, 2024
@cataggar
Copy link
Member Author

cataggar commented Dec 13, 2024

This bug was introduced in #46143. The bump to a newer System.Memory.Data is being tracked in #41941.

@jsquire jsquire self-assigned this Dec 13, 2024
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Azure.Core customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Dec 13, 2024
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Dec 13, 2024
@jsquire jsquire added the duplicate This issue is the duplicate of another issue label Dec 13, 2024
@jsquire
Copy link
Member

jsquire commented Dec 13, 2024

Hi @cataggar. Thanks for reaching out and we regret that you're experiencing difficulties. As we discussed in #46444, we intend to update our dependencies across the Azure SDK to the 8.x range. In order to ensure stability across platforms on which the Azure SDK runs - particularly with Azure Functions - these updates need to be coordinated with updates/deployments for the host and thoroughly tested.

This work is tracked by #46280 (overall dependency bump) and #41941 (incorporate in code generation). I'm going to link this issue there and close this as a duplicate.

As you noted, the mitigation in the short-term is to take a direct reference to System.Memory.Data in your application which will hoist the version for transitive depdencies.

@jsquire jsquire closed this as completed Dec 13, 2024
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. duplicate This issue is the duplicate of another issue needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team
Projects
None yet
Development

No branches or pull requests

2 participants