Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.15k stars 3.78k forks source link

Set-AzSynapsePipeline error out when pipeline definition has multiple "boolean" fields being set using Expression type. #20881

Open lilysuwito opened 1 year ago

lilysuwito commented 1 year ago

Description

When invoking "Set-AzSynapsePipeline" to deploy an Synapse pipeline, if there are multiple "boolean" properties that are using Expression type, the cmdlet failed to deploy.

image

image

test_pipeline_2022_01_03.zip

Issue script & Debug output

Set-AzSynapsePipeline -WorkspaceName 'sandbox-xxxxxx' -Name 'test_pipeline_2022_01_03' -DefinitionFile "C:\Repo\xxxxxxx\test_pipeline_2022_01_03.json"

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.2
PSEdition                      Core
GitCommitId                    7.3.2
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     2.11.1                Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     2.2.0                 Az.Synapse                          {Add-AzSynapseDataFlowDebugSessionPackage, Add-AzSynapseTriggerSubscription, Clear-AzSynapseSql…

Error output

Message        : Exception has been thrown by the target of an invocation.
StackTrace     :    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
                    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)       
                    at Microsoft.Azure.Commands.Synapse.Common.JsonConvert.DeserializeObject[T](String rawJsonContent)
                    at Microsoft.Azure.Commands.Synapse.Models.SynapseAnalyticsArtifactsClient.CreateOrUpdatePipeline(String pipelineName, String rawJsonContent)     
                    at Microsoft.Azure.Commands.Synapse.SetAzureSynapsePipeline.ExecuteCmdlet()
                    at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception      : System.Reflection.TargetInvocationException
InvocationInfo : {Set-AzSynapsePipeline}
Line           : Set-AzSynapsePipeline -WorkspaceName 'sandbox-xxxxxx' -Name 'test_pipeline_2022_01_03' -DefinitionFile
                 "C:\Repo\xxxxxxx\test_pipeline_2022_01_03.json"

Position       : At line:2 char:1
                 + Set-AzSynapsePipeline -WorkspaceName 'sandbox-xxxxxx' -N …
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 61

Message        : The requested operation requires an element of type 'Boolean', but the target element has type 'Object'.
StackTrace     :    at System.Text.Json.JsonElement.<GetBoolean>g__ThrowJsonElementWrongTypeException|17_0(JsonTokenType actualType)
                    at Azure.Analytics.Synapse.Artifacts.Models.AzureBlobFSReadSettings.DeserializeAzureBlobFSReadSettings(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.StoreReadSettings.DeserializeStoreReadSettings(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.ParquetSource.DeserializeParquetSource(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.CopySource.DeserializeCopySource(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.CopyActivity.DeserializeCopyActivity(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.Activity.DeserializeActivity(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.SwitchActivity.DeserializeSwitchActivity(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.Activity.DeserializeActivity(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.ForEachActivity.DeserializeForEachActivity(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.Activity.DeserializeActivity(JsonElement element)
                    at Azure.Analytics.Synapse.Artifacts.Models.PipelineResource.DeserializePipelineResource(JsonElement element)
                    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
                    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Exception      : System.InvalidOperationException
InvocationInfo : {Set-AzSynapsePipeline}
Line           : Set-AzSynapsePipeline -WorkspaceName 'sandbox-xxxxxx' -Name 'test_pipeline_2022_01_03' -DefinitionFile
                 "C:\Repo\xxxxxxx\test_pipeline_2022_01_03.json"

Position       : At line:2 char:1
                 + Set-AzSynapsePipeline -WorkspaceName 'sandbox-xxxxxx' -N …
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 61
ghost commented 1 year ago

Thank you for your feedback. This has been routed to the support team for assistance.

SaurabhSharma-MSFT commented 1 year ago

@lilysuwito We are looking into it and get back to you for any additional information.

SaurabhSharma-MSFT commented 1 year ago

@lilysuwito I am able to reproduce this issue and checking internally. I will let you know I have any updates. Thanks.

lilysuwito commented 1 year ago

It has been a few months. Any updates please?

SaurabhSharma-MSFT commented 1 year ago

@lilysuwito Sorry for the delay. There are still some work pending on this which may take more time than expected. We will update you as soon as the fix is available.