Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
75 stars 81 forks source link

IBM host files action : Running trigger failed by showing server failure message. #2760

Closed vgouth closed 1 year ago

vgouth commented 1 year ago

Describe the Bug with repro steps

1.Create a new workflow app using VS Code. 2.Create a stateful workflow 3.Add a HTTP trigger to the workflow and save the workflow 4.Add a "Generate Host File Contents" (from the IBM Host File SP) Action after the trigger 5.The Connection Parameters can (should) be left unchanged - or, if you like: 37 and unchecked. 6.For the first 2 parameters of the Action, enter: redefines.hidx (for the HIDX Name), "CUSTOMER_FILE_ROW" (for the Schema Name). 7.Open the attachment named InputJson.txt, copy the contents. In VS Code - the third Parameter Rows, has a button on the right enabling you to fill out all Input as a single value, click this. Delete the contents of the text box ("[ null ]" or similar) and then paste in the copied Input.Json contents. 8. Add a "Parse Host File Contents" Action, and fill out the first 2 Parameters as above (step 6). For the "Binary Contents" select the Dynamic content "Binary Contents" (which is the output of the previous step). 9.Add a response action as well - Http Response - for the Body, use the Dynamic content "Rows" (the output from the previous step). 10.Click on "Artifacts/Maps", right click - reveal in file explorer. Download the attachment "Redefines.hidx" into that directory. 11.Press F5/Run the Workflow

  1. Get the trigger URL by going to the "overview" page for the workflow.
  2. Expected Result : Run trigger should succeed. Actual Result : Run trigger getting failed by showing server failure message

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "Parse_Host_File_Contents": {
                "type": "ServiceProvider",
                "inputs": {
                    "parameters": {
                        "hidx": "redefines.hidx",
                        "schema": "CUSTOMER_FILE_ROW",
                        "contents": "@body('Generate_Host_File_Contents')?['contents']"
                    },
                    "serviceProviderConfiguration": {
                        "connectionName": "hostfile",
                        "operationId": "parseFileContents",
                        "serviceProviderId": "/serviceProviders/hostfile"
                    }
                },
                "runAfter": {
                    "Generate_Host_File_Contents": [
                        "SUCCEEDED"
                    ]
                }
            },
            "Response": {
                "type": "Response",
                "kind": "Http",
                "inputs": {
                    "statusCode": 200,
                    "body": "@body('Parse_Host_File_Contents')?['rows']"
                },
                "runAfter": {
                    "Parse_Host_File_Contents": [
                        "SUCCEEDED"
                    ]
                }
            },
            "Generate_Host_File_Contents": {
                "type": "ServiceProvider",
                "inputs": {
                    "parameters": {
                        "hidx": "redefines.hidx",
                        "schema": "CUSTOMER_FILE_ROW",
                        "rows": [
                            {
                                "CUSTOMER_TYPE": "B",
                                "SIMPLE_REDEFINITION1": {
                                    "BUSINESS": {
                                        "NAME": "ABC"
                                    }
                                }
                            },
                            {
                                "CUSTOMER_TYPE": "P",
                                "SIMPLE_REDEFINITION1": {
                                    "PERSONAL": {
                                        "NAME": {
                                            "FIRST_NAME": "Rob",
                                            "LAST_NAME": "BEA"
                                        }
                                    }
                                }
                            }
                        ]
                    },
                    "serviceProviderConfiguration": {
                        "connectionName": "hostfile",
                        "operationId": "generateFileContents",
                        "serviceProviderId": "/serviceProviders/hostfile"
                    }
                },
                "runAfter": {}
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "type": "Request",
                "kind": "Http"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

image

Browser

VS code

Additional context

Artifacts Version:

VS Code extension - ​vsix icon vscode-azurelogicapps-2.0.26.vsix NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzcxMzU5ODUxL2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.17.1.nupkg Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.17.1/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.17.1_any-any.zip

AB#24131200

AB#24287580

vgouth commented 1 year ago

Issue repro in latest artifact.

  1. VS Code extension - vscode-azurelogicapps-2.9.1.vsix
  2. NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzcyMDcxNTQ1L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.19.1.nupkg
  3. Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting
  4. Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.19.1/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.19.1_any-any.zip
vgouth commented 1 year ago

Issue repro in latest artifact.

  1. VS Code extension - vscode-azurelogicapps-2.15.10.vsix
  2. NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzcyNDMyOTY3L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.19.4.nupkg
  3. Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting
  4. Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.19.4/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.19.4_any-any.zip

image

vgouth commented 1 year ago

Issue repro in latest artifact.

1,VS Code extension – vscode-azurelogicapps-2.15.15.vsix 2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzczMDA5ODA5L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.21.3.nupkg 3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting 4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.21.3/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.21.3_any-any.zip 5.Resources vsix. vscode-azureresourcegroups-LA.vsix

image

preetriti1 commented 1 year ago

@ccastrotrejo - if you think this is not related to vscode extension rather backend, then can you verify and transfer it to the backend?

vgouth commented 1 year ago

Issue repro in latest artifact.

1.VS Code extension: vscode-azurelogicapps-2.18.0.vsix 2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzczNTE1ODYzL2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.23.1.nupkg 3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting 4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.23.1/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.23.1_any-any.zip

image image

vgouth commented 1 year ago

Issue repro in latest artifact.

1.VS Code extension: vscode-azurelogicapps-2.24.3.vsix 2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzc0Mzk0ODczL2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.25.4.nupkg 3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting 4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.25.4/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.25.4_any-any.zip

image image image image image

@AbodeSaafan adding Robert Beardsworth @rob-beardsworth

vgouth commented 1 year ago

@AbodeSaafan @ccastrotrejo @preetriti1

I had a call with Robert Beardsworth, when we add the code in below format, the new designer is automatically adding the backslash code in codeview and getting the above given errors in both portal and VS code . [ { "CUSTOMER_TYPE": "B", "SIMPLE_REDEFINITION1": { "BUSINESS": { "NAME": "ABC" } } }, { "CUSTOMER_TYPE": "P", "SIMPLE_REDEFINITION1": { "PERSONAL": { "NAME": { "FIRST_NAME": "Rob", "LAST_NAME": "BEA" } } } } ]

image

But when we are adding the code in below format as given by Robert Beardsworth it is working fine without any errors in both portal and VS code and the code in workflow JSON is there without any backslash.

[ { "CUSTOMER_TYPE": "B", "SIMPLE_REDEFINITION1": { "BUSINESS": { "NAME": "ABC" } } }, { "CUSTOMER_TYPE": "P", "SIMPLE_REDEFINITION1": { "PERSONAL": { "NAME": { "FIRST_NAME": "Rob", "LAST_NAME": "BEA" } } } } ]

image image image

Observations: Looks like new designer is taking the spaces as count in the first code , As of now I am not closing this issue. Going forward let us know what code format we need to use.

vgouth commented 1 year ago

@Eric-B-Wu , Requesting your support for this as this is a new line issue.

Above Issue repro in the new request

Artifacts details:

1.VS Code extension: vscode-azurelogicapps-2.24.6.vsix 2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzc0NTYyNjAxL2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.26.1.nupkg 3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting 4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.26.1/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.26.1_any-any.zip

vgouth commented 1 year ago

@Eric-B-Wu , @hartra344 Requesting your support for this as this is a new line issue.

Above issue repro in new portal request as well.

Environment Details: URL: https://aka.ms/emastaging-flowstip1 Version: "2.30613.1.2"

vgouth commented 1 year ago

Above issue repro in new VS code request as well. Looks like the change made is not included in the below artifact.

Artifacts details:

1.VS Code extension: vscode-azurelogicapps-2.28.3.vsix 2.Nuget package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzc1MzA5MDMwL2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.28.2.nupkg 3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting 4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.28.2/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.28.2_any-any.zip

image image