Azure / Azure/azure-powershell

[Doc]: Remove-AzSynapseWorkspacePackage

Open
#27,053 0 comments 0 reactions 0 assignees View on GitHub
customer-reported needs-triage
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

### Type of issue

Code doesn't work

### Feedback

Via DevOps we run a pipeline that removes existing synapse workspace packages and upload the artifacts that we have in our devops-enviroment. This is done by using the Remove-AzSynapseWorkspacePackage

**While using the Remove-AzSynapseWorkspacePackage, an error occurs with the message:**
```
Remove-AzSynapseWorkspacePackage : Array cannot be null.
Parameter name: bytes
```

**This is the code we use:**
```
Write-Host "Updating packages on workspace $($ws.Name)"
$workspacePackages | ForEach-Object { Write-Host " - Package to delete: $($_.Name)" }
$workspacePackages | ForEach-Object {
Write-Verbose -Message "Deleting package: $($_.Name)" -Verbose
Remove-AzSynapseWorkspacePackage -Name $_.Name -WorkspaceName $workspaceName -Force -Verbose
}
```

We already determined that there are packages that need to be removed. When entering the Remove-AzSynapseWorkspacePackage command, the named packed is still there and not null. During the command the package gets removed, but ends up showing this message.

Information:
PS Version : 5.251.1

### Page URL

https://learn.microsoft.com/en-us/powershell/module/az.synapse/remove-azsynapseworkspacepackage?view=azps-13.1.0

### Content source URL

https://github.com/Azure/azure-powershell/blob/main/src/Synapse/Synapse/help/Remove-AzSynapseWorkspacePackage.md

### Author

@mikefrobbins

### Document Id

605cf78a-4bdd-6bfb-8066-42af487a213c

Contributor guide

Open the contributing guide

Research direction

Start with src/Synapse/Synapse/help/Remove-AzSynapseWorkspacePackage.md and reproduce the reported command against a Synapse workspace containing removable packages. Trace the cmdlet implementation from its documented entry point to identify why successful deletion still reports the null-bytes error. Done means the package is removed without the reported error and the relevant documentation remains accurate.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.