Skip to content

Commit

Permalink
added deployment name and resource group name to deployment error (Az…
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitsh authored and Terje Torkelsen committed Mar 15, 2018
1 parent 1c1e812 commit 8ccb763
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/armhelpers/deploymentError.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (

// DeploymentError contains the root deployment error along with deployment operation errors
type DeploymentError struct {
DeploymentName string
ResourceGroup string
TopError error
StatusCode int
Response []byte
Expand All @@ -39,8 +41,8 @@ func (e *DeploymentError) Error() string {
}
}
}
return fmt.Sprintf("TopError[%s] StatusCode[%d] Response[%s] ProvisioningState[%s] Operations[%s]",
str, e.StatusCode, e.Response, e.ProvisioningState, strings.Join(ops, " | "))
return fmt.Sprintf("DeploymentName[%s] ResourceGroup[%s] TopError[%s] StatusCode[%d] Response[%s] ProvisioningState[%s] Operations[%s]",
e.DeploymentName, e.ResourceGroup, str, e.StatusCode, e.Response, e.ProvisioningState, strings.Join(ops, " | "))
}

// DeploymentValidationError contains validation error
Expand All @@ -62,6 +64,8 @@ func DeployTemplateSync(az ACSEngineClient, logger *logrus.Entry, resourceGroupN

logger.Infof("Getting detailed deployment errors for %s", deploymentName)
deploymentErr := &DeploymentError{}
deploymentErr.DeploymentName = deploymentName
deploymentErr.ResourceGroup = resourceGroupName
deploymentErr.TopError = err

if deploymentExtended == nil {
Expand Down

0 comments on commit 8ccb763

Please sign in to comment.