Skip to content

Commit 50e8324

Browse files
edwardrfedw-defang
andauthored
Increase the delay after cd exit to 3s for gcp (#1020)
As CD logs often are incomplete due to the delayed availability of logs in the gcp logging tail API, probably due to aggregation. Co-authored-by: Edward J <[email protected]>
1 parent 8a6927b commit 50e8324

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pkg/cli/client/byoc/gcp/byoc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,12 +529,12 @@ func (b *ByocGcp) Follow(ctx context.Context, req *defangv1.TailRequest) (client
529529
for subscribeStream.Receive() {
530530
msg := subscribeStream.Msg()
531531
if msg.State == defangv1.ServiceState_BUILD_FAILED || msg.State == defangv1.ServiceState_DEPLOYMENT_FAILED {
532-
pkg.SleepWithContext(ctx, 1*time.Second) // Make sure the logs are flushed
532+
pkg.SleepWithContext(ctx, 3*time.Second) // Make sure the logs are flushed, gcp logs has a longer delay, thus 3s
533533
cancel(fmt.Errorf("CD job failed %s", msg.Status))
534534
return
535535
}
536536
if msg.State == defangv1.ServiceState_DEPLOYMENT_COMPLETED {
537-
pkg.SleepWithContext(ctx, 1*time.Second) // Make sure the logs are flushed
537+
pkg.SleepWithContext(ctx, 3*time.Second) // Make sure the logs are flushed, gcp logs has a longer delay, thus 3s
538538
cancel(io.EOF)
539539
return
540540
}

0 commit comments

Comments
 (0)