azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[BUG] Azure.ResourceManager.Logic.LogicWorkflowResource.UpdateAsync always returns 400 BadRequest

Open jdefesche1 opened this issue 2 years ago • 2 comments

Library name and version

Azure.ResourceManager.Logic 1.0.0

Describe the bug

When I call UpdateAsync irrespective of having updated the Data.Definition, it returns a bad request (Resource Definition is invalid). I've used fiddler to capture traffic using the deprecated package (Microsoft.Azure.Management.Logic) when calling UpdateAsync. Repeated the process for Azure.ResourceManager.Logic but there I see no body.

See the document containing the Fiddler traces: Azure.ResourceManager.Logic bug MS.docx

Expected behavior

When calling LogicWorkflowResource.UpdateAsync the json representation of the definition should be included in the request.

Actual behavior

The exception I get while debugging is badrequest

Reproduction Steps

  1. Get a workflow using GetAsync()
  2. Update the workflow using UpdateAsync()

Environment

  • Visual Studio 2022 (64 bit) 17.3.6
  • Windows server 2022 version 21H2 OS Build 20348.887
  • project is class library .net standard 2.0

jdefesche1 avatar Dec 29 '22 13:12 jdefesche1

Thank you for your feedback. Tagging and routing to the team member best able to assist. Please expect delayed responses due to the US holidays.

jsquire avatar Dec 29 '22 15:12 jsquire

Thanks for reaching out to us, will dig into this issue.

Yao725 avatar Jan 10 '23 09:01 Yao725

This issue can be reproduced and the behavior is same when I used Postman to send the request directly. It turns out that this is an API spec issue, this request doesn't define the body parameter. There is already issue complaining about this problem.

I have left a comment in 18132 to ask for the update, but considering the latest API version is almost four years ago, I opened #33944 to work around this issue from SDK side and the simple test shows this fix could work as expected.

Yao725 avatar Feb 07 '23 08:02 Yao725

Hi, thanks for the update. Once your PR is approved, how much time does it take before the update becomes available?

jdefesche1 avatar Feb 07 '23 09:02 jdefesche1

I think the release will be no later than the end of this month.

Yao725 avatar Feb 07 '23 09:02 Yao725

The new version has been released: https://www.nuget.org/packages/Azure.ResourceManager.Logic/1.0.1

Yao725 avatar Feb 16 '23 02:02 Yao725

Thanks, I've updated the package and the problem is gone

jdefesche1 avatar Feb 17 '23 09:02 jdefesche1