Skip to content

Commit f8d5fe9

Browse files
authored
add fleaky case for silence build error fail and run out of time (#4094)
1 parent 837d4e8 commit f8d5fe9

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

cli/azd/pkg/tools/azcli/webapp.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,31 @@ func appServiceRepositoryHost(
8181
}
8282

8383
func resumeDeployment(err error, progressLog func(msg string)) bool {
84-
if strings.Contains(err.Error(), "empty deployment status id") {
84+
errorMessage := err.Error()
85+
if strings.Contains(errorMessage, "empty deployment status id") {
8586
progressLog("Deployment status id is empty. Failed to enable tracking runtime status." +
8687
"Resuming deployment without tracking status.")
8788
return true
8889
}
8990

90-
if strings.Contains(err.Error(), "response or its properties are empty") {
91+
if strings.Contains(errorMessage, "response or its properties are empty") {
9192
progressLog("Response or its properties are empty. Failed to enable tracking runtime status." +
9293
"Resuming deployment without tracking status.")
9394
return true
9495
}
9596

97+
if strings.Contains(errorMessage, "failed to start within the allotted time") {
98+
progressLog("Deployment with tracking status failed to start within the allotted time." +
99+
"Resuming deployment without tracking status.")
100+
return true
101+
}
102+
103+
if strings.Contains(errorMessage, "the build process failed") && !strings.Contains(errorMessage, "logs for more info") {
104+
progressLog("Failed to enable tracking runtime status." +
105+
"Resuming deployment without tracking status.")
106+
return true
107+
}
108+
96109
var httpErr *azcore.ResponseError
97110
if errors.As(err, &httpErr) && httpErr.StatusCode == 404 {
98111
progressLog("Resource not found. Failed to enable tracking runtime status." +

0 commit comments

Comments
 (0)