Skip to content

Commit

Permalink
[ws-manager] Don't add failed condition when headless task fails
Browse files Browse the repository at this point in the history
  • Loading branch information
csweichel authored and roboquat committed Jul 29, 2021
1 parent 7df1a3f commit 479abb7
Show file tree
Hide file tree
Showing 3 changed files with 1,258 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/ws-manager/pkg/manager/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ func extractFailure(wso workspaceObjects) (string, *api.WorkspacePhase) {
// can go in this state and that's ok. However, if the workspace was shutting down due to deletion,
// we would not be here as we've checked for a DeletionTimestamp prior. So let's find out why the
// container is terminating.
if terminationState.Message != "" {
if terminationState.ExitCode != 0 && terminationState.Message != "" {
// the container itself told us why it was terminated - use that as failure reason
return extractFailureFromLogs([]byte(terminationState.Message)), nil
} else if terminationState.Reason == "Error" {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"status": {
"id": "60116ccc-1593-41f5-880e-6c4010dc4d1d",
"metadata": {
"owner": "71548797-a589-45fa-bf22-6aec554dded0",
"meta_id": "sapphire-alligator-jakcgz44",
"started_at": {
"seconds": 1627410546
}
},
"spec": {
"workspace_image": "eu.gcr.io/gitpod-core-dev/registry/workspace-images:295486e99855b59cf8d32b8d9b6c3c0abcf4b76acb8e511f7c919b0341c60f35",
"ide_image": "eu.gcr.io/gitpod-core-dev/build/ide/code:commit-c77d5c144ba894ff5ae71a25af7fe3af4d4bd398",
"headless": true,
"url": "https://sapphire-alligator-jakcgz44.ws-dev.csweichel-don-t-abort-prebuild-4964.staging.gitpod-dev.com",
"type": 1
},
"phase": 5,
"conditions": {
"service_exists": 1,
"deployed": 1,
"headless_task_failed": "headless task failed"
},
"message": "headless workspace is stopping",
"runtime": {
"node_name": "gke-dev-workload-4-5712746c-38bw",
"pod_name": "prebuild-60116ccc-1593-41f5-880e-6c4010dc4d1d",
"node_ip": "10.132.15.209"
},
"auth": {
"owner_token": "E8-X0p-tciJQOuPB4DLCyvAXN-6_PM3n"
}
}
}
Loading

0 comments on commit 479abb7

Please sign in to comment.