diff --git a/src/pkg/cli/client/byoc/do/byoc.go b/src/pkg/cli/client/byoc/do/byoc.go index b1aab643..e6c33047 100644 --- a/src/pkg/cli/client/byoc/do/byoc.go +++ b/src/pkg/cli/client/byoc/do/byoc.go @@ -415,9 +415,18 @@ func (b *ByocDo) Follow(ctx context.Context, req *defangv1.TailRequest) (client. term.Debugf("Deployment phase: %s", deploymentInfo.GetPhase()) switch deploymentInfo.GetPhase() { - case godo.DeploymentPhase_PendingBuild, godo.DeploymentPhase_PendingDeploy, godo.DeploymentPhase_Deploying: + case godo.DeploymentPhase_PendingBuild, godo.DeploymentPhase_PendingDeploy: // Do nothing; check again in 10 seconds + case godo.DeploymentPhase_Deploying: + if logType.Has(logs.LogTypeBuild) { + logs, _, err := b.client.Apps.GetLogs(ctx, appID, deploymentID, appPlatform.CdName, godo.AppLogTypeDeploy, true, 50) + if err != nil { + return nil, err + } + return newByocServerStream(ctx, logs.LiveURL, req.Etag) + } + case godo.DeploymentPhase_Error, godo.DeploymentPhase_Canceled: if logType.Has(logs.LogTypeBuild) { // TODO: provide component name diff --git a/src/pkg/cli/client/byoc/do/stream.go b/src/pkg/cli/client/byoc/do/stream.go index a02797fc..9a95a0fe 100644 --- a/src/pkg/cli/client/byoc/do/stream.go +++ b/src/pkg/cli/client/byoc/do/stream.go @@ -26,7 +26,7 @@ type byocServerStream struct { } func newByocServerStream(ctx context.Context, liveUrl string, etag types.ETag) (*byocServerStream, error) { - if liveUrl == "none" { + if liveUrl == "" { return &byocServerStream{}, nil }