OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
162 stars 20 forks source link

DeploymentLabel character limit validation and error handling #4635

Closed shaunmarx closed 1 year ago

shaunmarx commented 6 years ago

We currently allow any arbitrary length value to be specified for the Octopus.Action.Azure.DeploymentLabel variable which ends up with some pretty convoluted errors at deployment time if it exceeds the 100 character limit. We can also end up in a similar situation when Octopus.Action.Azure.DeploymentLabel is omitted and the {Action Name} plus the {Release Number} happen to exceed the 100 character limit.

The resulting error would be something like the following:

Set-AzureDeployment : Specified argument was out of the range of valid values. 
Parameter name: parameters.Label 
At E:\Octopus\Work\20180611163020-601394-70449\staging\DeployToAzure.ps1:42 char:5 
+     Set-AzureDeployment -Upgrade -ServiceName $OctopusAzureServiceNam ... 
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo          : CloseError: (:) [Set-AzureDeployment], ArgumentOutOfRangeException 
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices.SetAzureDeploymentComma  
   nd

We should consider adding better error handling so that things fail with a meaningful error message which won't result in unnecessary support tickets and or wasting customers time to track things down.

We should also try and provide some validation around the Octopus.Action.Azure.DeploymentLabel variable as well so that we can try and prevent this from happening at deployment time or at the very least fail early.

chrisdrobison commented 6 years ago

Do we know what the timeline is on this?

susanpann commented 1 year ago

This issue relates to Cloud Services through the Azure Service Management API, which was deprecated back in 2018. We've closed the issue as it is no longer being actively supported. See here for more details.