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

SQL Based_SQL Action: Before adding long running scenario query, the workflow is succeeded. #802

Closed
v-prakumar opened this issue May 10, 2023 · 11 comments

Comments

@v-prakumar
Copy link

v-prakumar commented May 10, 2023

Describe the Bug with repro steps

1.Create a project and add Stateful workflow in VS code.
2.Convert your workflow in SQL Based.
3.Open Designer and add http trigger and sql_Execute query_EXEC wait2;
4.Save and Debug the workflow.

Expected: The workflow should be failed after 2 minutes.

Actual: The workflow is succeeded after 2 minutes.
image

What type of Logic App Is this happening in?

Standard (VSCode)

Are you using Preview Designer or GA Designer

Preview

Workflow JSON

No response

Screenshots or Videos

No response

Browser

VS Code

Additional context

Vendor Testing

VS Code extension - ​vscode-azurelogicapps-2.15.10.vsix
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
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.19.4/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.19.4_any-any.zip

AB#24182121

@v-prakumar v-prakumar changed the title SQL Based_SQL Action: Before adding long running scenario, the workflow is succeeded. SQL Based_SQL Action: Before adding long running scenario query, the workflow is succeeded. May 10, 2023
@preetriti1
Copy link
Contributor

@v-prakumar - Please share your workflow definition so we know what inputs or settings you have provided.

@v-prakumar
Copy link
Author

@preetriti1 @ccastrotrejo VSIX(2.15.15) , Given workflow.json

Note: The issue may be intermittent sometime it is as per expected as Failed or sometimes it is passing in all 3 Artifacts.

{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Execute_query": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"query": "EXEC wait2;"
},
"serviceProviderConfiguration": {
"connectionName": "sql",
"operationId": "executeQuery",
"serviceProviderId": "/serviceProviders/sql"
}
},
"runAfter": {}
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {
"When_a_HTTP_request_is_received": {
"type": "Request",
"kind": "Http"
}
}
},
"kind": "Stateful"
}

@v-prakumar
Copy link
Author

@ccastrotrejo Issue is same in the VSIX - 2.18.0, and also it is succeeded with this error.PFA.
image

@preetriti1
Copy link
Contributor

Looks like backend issue.

@preetriti1 preetriti1 transferred this issue from Azure/LogicAppsUX Jun 5, 2023
@v-prakumar
Copy link
Author

@ccastrotrejo Issue is repro in VSIX : 2.24.3

@v-prakumar
Copy link
Author

@ccastrotrejo Issue is repro in vsix 2.28.3

@v-prakumar
Copy link
Author

@ccastrotrejo Issue is repro in the vsix 2.55.1

@vgouth
Copy link

vgouth commented Sep 7, 2023

Issue repro in the latest VS code request

  1. VS Code extension - vscode-azurelogicapps-2.63.3.vsix
  2. NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzc5MjQ0MDM5L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.38.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.38.2/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.38.2_any-any.zip

image
image

Workflow.Json:

{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Execute_query": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"query": "EXEC wait2;"
},
"serviceProviderConfiguration": {
"connectionName": "sql-2",
"operationId": "executeQuery",
"serviceProviderId": "/serviceProviders/sql"
}
},
"runAfter": {}
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {
"When_a_HTTP_request_is_received": {
"type": "Request",
"kind": "Http"
}
},
"parameters": {}
},
"kind": "Stateful"
}

@vgouth
Copy link

vgouth commented Sep 26, 2023

@ccastrotrejo , @AbodeSaafan

Issue not repro in the latest request but there is an error in the terminal. Is the error expected?

1. VS Code extension - vscode-azurelogicapps-2.69.0.vsix
2. NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzgwMDY5MTEwL2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.41.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.41.1/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.41.1_any-any.zip</p

image

Workflow.Json:
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Execute_query": {
"type": "ServiceProvider",
"inputs": {
"parameters": {
"query": "EXEC wait2;"
},
"serviceProviderConfiguration": {
"connectionName": "sql",
"operationId": "executeQuery",
"serviceProviderId": "/serviceProviders/sql"
}
},
"runAfter": {}
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {
"When_a_HTTP_request_is_received": {
"type": "Request",
"kind": "Http"
}
},
"parameters": {}
},
"kind": "Stateful"
}

Error message in terminal:

[2023-09-26T05:54:47.636Z] Error message: correlationId='4a3772c3-478c-4b72-9eea-8bb718199a5d', operationName='sql.SqlServiceOperationsProvider.ExecuteQueryAsync', message='A severe error occurred on the current command. The results, if any, should be discarded.
[2023-09-26T05:54:47.637Z] Operation cancelled by user.', exception='Microsoft.Data.SqlClient.SqlException (0x80131904): A severe error occurred on the current command. The results, if any, should be discarded.
[2023-09-26T05:54:47.638Z] Operation cancelled by user.
[2023-09-26T05:54:47.639Z] at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) [2023-09-26T05:54:47.641Z] at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
[2023-09-26T05:54:47.642Z] at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
[2023-09-26T05:54:47.642Z] at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
[2023-09-26T05:54:47.643Z] at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
[2023-09-26T05:54:47.644Z] at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
[2023-09-26T05:54:47.645Z] at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
[2023-09-26T05:54:47.646Z] at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
[2023-09-26T05:54:47.646Z] at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, Boolean isInternal, String endMethod)
[2023-09-26T05:54:47.647Z] at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult)
[2023-09-26T05:54:47.648Z] at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult)
[2023-09-26T05:54:47.649Z] at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
[2023-09-26T05:54:47.650Z] --- End of stack trace from previous location ---
[2023-09-26T05:54:47.651Z] at Microsoft.Azure.Workflows.ServiceProviders.Sql.Utilities.SqlExecutor.GetSqlDataReader(SqlCommand command, CommandBehavior commandBehavior, CancellationToken cancellationToken)
[2023-09-26T05:54:47.653Z] at Microsoft.Azure.Workflows.ServiceProviders.Sql.Utilities.SqlExecutor.ExecuteQueryAndGetResult(SqlCommand command, CommandBehavior commandBehavior, CancellationToken cancellationToken, String callerName)
[2023-09-26T05:54:47.655Z] at Microsoft.Azure.Workflows.ServiceProviders.Sql.Utilities.SqlExecutor.ExecuteQueryAsync(ConnectionProperties connectionProperties, IDictionary`2 queryParameters, String query, CommandBehavior commandBehavior)
[2023-09-26T05:54:47.656Z] ClientConnectionId:445aa76a-45af-4d28-9ad4-6034624fdc32', organizationId='', activityVector='IN.03', additionalProperties='{"ParentActivityId":"00-e05703eeb881765332ffbeb7fc70e042-51ff31301fb24dc7-00"}', extensionVersion='1.41.1.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='c27bf7be-1d70-4494-9616-37162f1f9a3e'.

@vgouth
Copy link

vgouth commented Oct 18, 2023

@ccastrotrejo , @AbodeSaafan

Issue not repro in the latest request but there is an error in the terminal. Is the error expected?

Similar error logs repro in SQL and nuget artifact

1.VS Code extension - ​​vsix icon vscode-azurelogicapps-2.72.1.vsix

2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzgxMTY0NTE3L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.44.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.44.1/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.44.1_any-any.zip

image

Error message in terminal:

[2023-10-18T13:41:43.354Z] Error message: correlationId='ae091658-ad43-4f2f-b9fe-64931d26b338', operationName='sql.SqlServiceOperationsProvider.ExecuteQueryAsync', message='A severe error occurred on the current command. The results, if any, should be discarded.
[2023-10-18T13:41:43.355Z] Operation cancelled by user.', exception='Microsoft.Data.SqlClient.SqlException (0x80131904): A severe error occurred on the current command. The results, if any, should be discarded.
[2023-10-18T13:41:43.356Z] Operation cancelled by user.
[2023-10-18T13:41:43.357Z] at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) [2023-10-18T13:41:43.358Z] at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)
[2023-10-18T13:41:43.358Z] at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
[2023-10-18T13:41:43.359Z] at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
[2023-10-18T13:41:43.360Z] at Microsoft.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
[2023-10-18T13:41:43.361Z] at Microsoft.Data.SqlClient.SqlDataReader.get_MetaData()
[2023-10-18T13:41:43.362Z] at Microsoft.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
[2023-10-18T13:41:43.365Z] at Microsoft.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
[2023-10-18T13:41:43.367Z] at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, Boolean isInternal, String endMethod)
[2023-10-18T13:41:43.368Z] at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult)
[2023-10-18T13:41:43.369Z] at Microsoft.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult)
[2023-10-18T13:41:43.371Z] at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
[2023-10-18T13:41:43.372Z] --- End of stack trace from previous location ---
[2023-10-18T13:41:43.373Z] at Microsoft.Azure.Workflows.ServiceProviders.Sql.Utilities.SqlExecutor.GetSqlDataReader(SqlCommand command, CommandBehavior commandBehavior, CancellationToken cancellationToken)
[2023-10-18T13:41:43.373Z] at Microsoft.Azure.Workflows.ServiceProviders.Sql.Utilities.SqlExecutor.ExecuteQueryAndGetResult(SqlCommand command, CommandBehavior commandBehavior, CancellationToken cancellationToken, String callerName)
[2023-10-18T13:41:43.374Z] at Microsoft.Azure.Workflows.ServiceProviders.Sql.Utilities.SqlExecutor.ExecuteQueryAsync(ConnectionProperties connectionProperties, IDictionary`2 queryParameters, String query, CommandBehavior commandBehavior)
[2023-10-18T13:41:43.375Z] ClientConnectionId:3a204b1d-2cf4-4511-817b-ac082dbec2fd', organizationId='', activityVector='IN.03', additionalProperties='{"ParentActivityId":"00-21c16d5a7735661095bb3ddd707d3f49-581b3b61829e3115-00"}', extensionVersion='1.44.1.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='b154c40d-a808-45cf-97ed-906ce7b26c74'.
[2023-10-18T13:41:43.437Z] Executed 'Functions.WorkflowDispatcher' (Succeeded, Id=131fff88-8bb6-404a-8a31-5fab02426731, Duration=120475ms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants