Skip to content

Commit 81af500

Browse files
committed
chore: debug pod status
Signed-off-by: Mariusz Jasuwienas <jasuwienas@gmail.com>
1 parent e637c95 commit 81af500

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/test-workflow.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
5757
with:
5858
node-version: 20
59-
#cache: npm Disabling this because it causes the workflow to hang and eventually timeout
6059

6160
- name: Create .env file
6261
run: cp .env.example .env
@@ -112,6 +111,29 @@ jobs:
112111
- name: Run the test in ${{ inputs.testfilter }}
113112
run: npx hardhat test --grep ${{ inputs.testfilter }}
114113

114+
- name: Debug consensus node pod
115+
if: always()
116+
shell: bash
117+
run: |
118+
set +e
119+
NS="$(kubectl get namespaces | grep solo | grep -v 'solo-setup' | awk '{print $1}')"
120+
POD="network-node1-0"
121+
122+
echo "== Pod describe ($POD) =="
123+
kubectl describe pod "$POD" -n "$NS"
124+
125+
echo "== Pod status (restart counts + last state) =="
126+
kubectl get pod "$POD" -n "$NS" -o jsonpath='{range .status.containerStatuses[*]}{.name}{"\tready="}{.ready}{"\trestarts="}{.restartCount}{"\tlastFinished="}{.lastState.terminated.finishedAt}{"\tlastReason="}{.lastState.terminated.reason}{"\tlastExit="}{.lastState.terminated.exitCode}{"\n"}{end}'; echo
127+
128+
echo "== Events (namespace, sorted) =="
129+
kubectl get events -n "$NS" --sort-by=.lastTimestamp
130+
131+
echo "== Current logs (pod, all containers) =="
132+
kubectl logs -n "$NS" "$POD" --all-containers --timestamps --tail=300
133+
134+
echo "== Previous logs (if restarted) =="
135+
kubectl logs -n "$NS" "$POD" --all-containers --timestamps --tail=300 --previous
136+
115137
- name: Upload Test Results
116138
if: always()
117139
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

0 commit comments

Comments
 (0)