Return error if timeout when checking server version (#9111)
Some checks failed
Run the E2E test on kind / build (push) Failing after 8m20s
Run the E2E test on kind / setup-test-matrix (push) Successful in 5s
Run the E2E test on kind / run-e2e-test (push) Has been skipped
Main CI / Build (push) Failing after 36s
Close stale issues and PRs / stale (push) Successful in 33s
Trivy Nightly Scan / Trivy nightly scan (velero, main) (push) Failing after 3m59s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-aws, main) (push) Failing after 1m25s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-gcp, main) (push) Failing after 1m40s
Trivy Nightly Scan / Trivy nightly scan (velero-plugin-for-microsoft-azure, main) (push) Failing after 1m58s

Return error if timeout when checking server version

Fixes #8620

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
This commit is contained in:
Wenkai Yin(尹文开)
2025-07-26 00:31:55 +08:00
committed by GitHub
parent f985879f4b
commit 63ebd4e51b
2 changed files with 8 additions and 1 deletions

View File

@@ -0,0 +1 @@
Return error if timeout when checking server version

View File

@@ -69,5 +69,11 @@ func (g *DefaultServerStatusGetter) GetServerStatus(kbClient kbclient.Client) (*
wait.Until(checkFunc, 250*time.Millisecond, ctx.Done())
return created, nil
err := ctx.Err()
// context.Canceled error means we have received a processed ServerStatusRequest
if err == context.Canceled {
err = nil
}
return created, err
}