Skip to content

Commit

Permalink
[server] Wait for image build logs in preparing state
Browse files Browse the repository at this point in the history
  • Loading branch information
WVerlaek authored and roboquat committed Jan 6, 2023
1 parent 277a1f2 commit 907cc87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions components/dashboard/debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
# Copyright (c) 2022 Gitpod GmbH. All rights reserved.
# Licensed under the GNU Affero General Public License (AGPL).
# See License.AGPL.txt in the project root for license information.

set -Eeuo pipefail
source /workspace/gitpod/scripts/ws-deploy.sh deployment dashboard
2 changes: 1 addition & 1 deletion components/server/src/workspace/gitpod-server-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
await new Promise((resolve) => setTimeout(resolve, 2000));

const wsi = await this.workspaceDb.trace(ctx).findInstanceById(instance.id);
if (!wsi || wsi.status.phase !== "building") {
if (!wsi || !["preparing", "building"].includes(wsi.status.phase)) {
log.debug(logCtx, `imagebuild logs: instance is not/no longer in 'building' state`, {
phase: wsi?.status.phase,
});
Expand Down

0 comments on commit 907cc87

Please sign in to comment.