diff options
author | Martin Polden <mpolden@mpolden.no> | 2024-06-10 12:57:14 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2024-06-10 13:47:01 +0200 |
commit | f9796bf5213afa8e1ffef75d264563f8a7fcfbcd (patch) | |
tree | 3f4c21e7cb43c1cc7f807708de065d52c96d51c9 /client/go/internal | |
parent | 5f650ba39e70837d68c589fba287337d8527917e (diff) |
Log run URL when waiting times out
Diffstat (limited to 'client/go/internal')
-rw-r--r-- | client/go/internal/cli/cmd/waiter.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/client/go/internal/cli/cmd/waiter.go b/client/go/internal/cli/cmd/waiter.go index 591cbf0c4ba..8a25e18cd1e 100644 --- a/client/go/internal/cli/cmd/waiter.go +++ b/client/go/internal/cli/cmd/waiter.go @@ -90,7 +90,7 @@ func (w *Waiter) FastWaitOn(target vespa.Target) bool { } // Deployment waits for a deployment to become ready, returning the ID of the converged deployment. -func (w *Waiter) Deployment(target vespa.Target, id int64) (int64, error) { +func (w *Waiter) Deployment(target vespa.Target, wantedID int64) (int64, error) { timeout := w.Timeout fastWait := w.FastWaitOn(target) if timeout > 0 { @@ -100,9 +100,14 @@ func (w *Waiter) Deployment(target vespa.Target, id int64) (int64, error) { // invalid application package timeout = 2 * time.Second } - id, err := target.AwaitDeployment(id, timeout) - if fastWait && errors.Is(err, vespa.ErrWaitTimeout) { - return id, nil // Do not report fast wait timeout as an error + id, err := target.AwaitDeployment(wantedID, timeout) + if errors.Is(err, vespa.ErrWaitTimeout) { + if fastWait { + return id, nil // Do not report fast wait timeout as an error + } + if target.IsCloud() { + w.cli.printInfo("Timed out waiting for deployment to converge. See ", color.CyanString(target.Deployment().System.ConsoleRunURL(target.Deployment(), wantedID)), " for more details") + } } return id, err } |