diff --git a/hack/version.sh b/hack/version.sh index c2d134c7d07..da128f15e94 100755 --- a/hack/version.sh +++ b/hack/version.sh @@ -17,6 +17,8 @@ set -o errexit set -o nounset set -o pipefail +set -o xtrace + version::get_version_vars() { # shellcheck disable=SC1083 GIT_COMMIT="$(git rev-parse HEAD^{commit})" @@ -96,4 +98,4 @@ version::ldflags() { echo "${ldflags[*]-}" } -version::ldflags \ No newline at end of file +version::ldflags diff --git a/test/e2e/azure_clusterproxy.go b/test/e2e/azure_clusterproxy.go index 26dfba9f6f3..ff29321a5ab 100644 --- a/test/e2e/azure_clusterproxy.go +++ b/test/e2e/azure_clusterproxy.go @@ -190,7 +190,14 @@ func (acp *AzureClusterProxy) collectNodes(ctx context.Context, namespace string workload := acp.GetWorkloadCluster(ctx, namespace, name) nodes := &corev1.NodeList{} - Expect(workload.GetClient().List(ctx, nodes)).To(Succeed()) + // Failing to collect node logs should not cause the test to fail. The workload cluster + // API server may be unreachable during teardown (for example due to a transient Azure + // load balancer / DNS issue), and we should not turn an otherwise-successful spec into + // a failure during [AfterEach] log collection. + if err := workload.GetClient().List(ctx, nodes); err != nil { + Logf("Failed to list nodes for workload cluster %s/%s: %v", namespace, name, err) + return + } var err error var nodeDescribe string