From 0d8ca96ed04f6b81b977786d378b81f52bbd6683 Mon Sep 17 00:00:00 2001 From: Anunay Joshi Date: Thu, 19 Feb 2026 13:09:39 +0400 Subject: [PATCH] fix(ci): add error handling for Kubernetes cluster connection in CI workflow --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a56560f30a8..6a126af1682f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,6 +137,10 @@ jobs: mkdir -p $HOME/.kube echo "${{ secrets.KUBE_CONFIG }}" | base64 --decode > $HOME/.kube/config chmod 600 $HOME/.kube/config + if ! kubectl cluster-info > /dev/null 2>&1; then + echo "Error: Failed to connect to Kubernetes cluster. Please verify KUBE_CONFIG secret is correct." + exit 1 + fi git_hash=$(git rev-parse --short "$GITHUB_SHA") masternodes=$(kubectl get deployment -o json| jq -r '.items[] | select(.metadata.name | test("devnet")) | "\(.metadata.name)"') rpcs=$(kubectl get deployment -o json| jq -r '.items[] | select(.metadata.name | test("rpc")) | "\(.metadata.name)"')