Skip to content

Start-AzSynapseTrigger throws error but starts the trigger #16368

Open
@sarajag

Description

@sarajag

Description

When using the {Start-AzSynapseTrigger} PS cmd in Azure Powershell 5.0 task in Azure DevOps pipeline, the cmd fails with the error
"Request operation requires element of type Object byt target is String"
However, in the background it would have started the trigger.

Issue script & Debug output

Start-AzSynapseTrigger : The requested operation requires an element of type 'Object', but the target element has type
'String'.
At line:1 char:26
+ ... ach-Object {Start-AzSynapseTrigger -WorkspaceName $workspaceName -Nam ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Start-AzSynapseTrigger], InvalidOperationException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Synapse.StartAzureSynapseTrigger

Environment data

**************************************
Name                           Value
----                           -----
PSVersion                      5.1.22000.65
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22000.65
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

0.11.0     Az.Synapse

Error output

Exception      : System.InvalidOperationException
InvocationInfo : {Start-AzSynapseTrigger}
Line           : $trigs | ForEach-Object {Start-AzSynapseTrigger -WorkspaceName $workspaceName -Name $_.name}
Position       : At line:1 char:26
                 + ... ach-Object {Start-AzSynapseTrigger -WorkspaceName $workspaceName -Nam ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 17

Message        : The requested operation requires an element of type 'Object', but the target element has type
                 'String'.
StackTrace     :    at System.Text.Json.JsonElement.EnumerateObject()
                    at Azure.Core.ArmOperationHelpers`1.IsTerminalState(String& state)
                    at Azure.Core.ArmOperationHelpers`1.<UpdateStatusAsync>d__25.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at Azure.Core.ArmOperationHelpers`1.<UpdateStatusAsync>d__26.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at Azure.Core.ArmOperationHelpers`1.<WaitForCompletionAsync>d__24.MoveNext()
                 --- End of stack trace from previous location where exception was thrown ---
                    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
                    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
                    at System.Threading.Tasks.ValueTask`1.get_Result()
                    at Microsoft.Azure.Commands.Synapse.Common.Utils.Poll[T](Operation`1 operation)
                    at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsArtifactsClient.StartTrigger(String
                 triggerName)
                    at Microsoft.Azure.Commands.Synapse.StartAzureSynapseTrigger.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Service AttentionThis issue is responsible by Azure service team.SynapsebugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions