logicapps icon indicating copy to clipboard operation
logicapps copied to clipboard

small error in parameters.json or connections.json cause workflows to not be found with no insight into the cause

Open skyaddict opened this issue 4 years ago • 6 comments

create a couple of workflows with request triggers. Add the following parameters to the parameters.json file. Notice that waitSeconds is listed as int but the value is a string.

{ "ID": { "type": "string", "value": "5637210577" }, "waitSeconds": { "type": "int", "value": "1200" } }

zip deploy these to azure.

Navigate to one of the workflows. there is no callback Url after deployment. attempting to run any workflow from the portal will fail with Workflow not found.

at no point was there a warning or error that said there is an issue with the parameters.json. To make matters worse if I open and save a workflow the issue is corrected silently until I redeploy the workflows. If the parameters.json is invalid there should be a build error keeping invalid JSON from being checked in. Additionally, if this case happens some error should say the parameters are invalid, and or during zip deploy perhaps whatever process corrects the parameters should be called to ensure the parameters are corrected.

I noticed the same behavior from the portal if the connections.json had an issue in it. In my case, I was trying to parameterize azure functions. parameterizing like this deploys fine but cause workflows to be lost "func1": { "authentication": { "name": "Code", "type": "QueryString", "value": "@appsetting('function_key_func1')" }, "displayName": "func1", "function": { "id": "/subscriptions/@appsetting('subscription)/resourceGroups/@appsetting('group')/providers/Microsoft.Web/sites/@appsetting('funcAppName')/functions/func1" }, "triggerUrl": "https://@appsetting('funcAppName').azurewebsites.net/api/func1" }

If the whole id is in a appSetting it works fine.

    "func1": {
        "authentication": {
            "name": "Code",
            "type": "QueryString",
            "value": "@appsetting('function_key_func1')"
        },
        "displayName": "func1",
        "function": {
            "id": "@appsetting('function_id_getfunc1')"
        },
        "triggerUrl": "@appsetting('function_triggerUrl_func1')"
    }

skyaddict avatar Sep 21 '21 14:09 skyaddict

Do you see any logs in Kudo logs after the Zip Deployment?

mbarqawi avatar Sep 27 '21 06:09 mbarqawi

@mbarqawi No i did not see errors in Kusto. other than the workflow not found error.

skyaddict avatar Oct 05 '21 16:10 skyaddict

@skyaddict can you please check the logs from Monitoring section in azure portal and run some queries like eg. FunctionAppLogs | where Level contains "error". this should give you some details about why the workflow is not loaded.

ghost avatar Dec 10 '21 11:12 ghost

Any updates on this, I am also facing same issue when I am trying to parameterize connections.json for azure functions. Nothing in logs.

PratikT29 avatar Mar 08 '22 08:03 PratikT29

@skyaddict For the issue where invalid parameters stops the rest of the runtime from loading, we are taking a look to see what kind of improvement we can implement here. To confirm, are your other concerns:

  1. Error needs to be surfaced more clearly?
  2. Silent changes happen when loading designer

Can you also confirm if you created your parameters manually? I am asking because when the designer creates parameters, it should always have the value match the type, if that is not the case, it is a bug we need to take a look at. If you are manually creating parameters, then you would need to ensure that your value matches the type.

AbodeSaafan avatar Mar 31 '22 00:03 AbodeSaafan

The type check was because I had created it by hand but was just one example where this failed. I understand that the types need to match the value but I would have expected the build to fail because it did not. That surprised me as the first I noticed the issue was when I tried to access the workflow after deployment.

Handling of the Variable expansion in the connections file could be greatly approved. I would like to use Variables like Subscription and Group and FunctionAppName.

"id": /subscriptions/@appsetting('subscription)/resourceGroups/@appsetting('group')/providers/Microsoft.Web/sites/@appsetting('funcAppName')/functions/func1"

As it stands today I have to have a single variable for the whole group

"id": "@appsetting('function_id_getfunc1')"

When it comes to Parameter creation another thing that would be great is a way to have more than 50 parameters now that all workflows share the parameters list 50 seems to be too few. It would be nice to have some type of scope that allows for a workflow-specific parameter as well as parameters that can work in all workflows. If that is not an option, then allowing more than 50 seems reasonable.

skyaddict avatar Apr 04 '22 15:04 skyaddict

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 21 '22 00:10 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Oct 28 '22 01:10 github-actions[bot]