Skip to content

delete step fails to serialize dataset response #480

Description

@trivedi234

While deployment in ADO the process fails at the step where deletion of objects not existing in code happens with the error:

`STEP: Deleting objects not in source ...
Azure Data Factory (instance) loaded.
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Unable to deserialize the response.
At /home/agent/.local/share/powershell/Modules/azure.datafactory.tools/1.14.0/public/Get-AdfFromService.ps1:40 char:21

  • … .DataSets = Get-AzDataFactoryV2Dataset -ResourceGroupName "$ResourceG …
  •           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

##[error]PowerShell exited with code '1'.
`
The problem seems to be related to Issue 473

As a consequence:

  1. If we keep the DeleteNotInSource to true, then post the failure all the stopped triggers are not turned on causing an unexpected discontinuity of changed pipelines
  2. If we keep the DeleteNotInSource to false, then already deployed pipelines could possibly overlap with their new incoming versions as the older ones cant be deleted anymore. AN causes a general code maintenance problems as nothing can be deleted in our set-up manually (no publish button enabled)

Here is the ADO power-shell task that we are using:

- task: AzurePowerShell@5 inputs: azureSubscription: 'xxx' ScriptType: 'InlineScript' Inline: | $opt = New-AdfPublishOption $opt.IncrementalDeployment = $true $opt.IncrementalDeploymentStorageUri = '$(adfStateStorageUri)' $opt.TriggerStopMethod = 'DeployableOnly' # $opt.DeleteNotInSource = $true Publish-AdfV2FromJson -RootFolder '$(System.ArtifactsDirectory)/factory' -ResourceGroupName "$(adfResourceGroup)" -DataFactoryName "$(adfName)" -Location "xxx" -Stage "tst" -Option $opt pwsh: true azurePowerShellVersion: 'LatestVersion' failOnStandardError: true

Expected behaviour is to be able to delete all the objects from datafactory not in the code.

PowerShell Module version: 1.14.0

Metadata

Metadata

Assignees

Labels

defectFlaw or imperfection, affecting functionality, but a function can be used

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions