diff --git a/hack/version.sh b/hack/version.sh index 7c6bd7b3f0a..54164195b5e 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})" @@ -101,4 +103,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 3aae66ffa85..da4703816a4 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