Skip to content

Commit 0c7bdcc

Browse files
committed
Added enhanced log collection script and workflow steps for improved debugging of test failures
Signed-off-by: Helber Belmiro <[email protected]>
1 parent 12f5bad commit 0c7bdcc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/e2e-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
- name: Collect Pod logs on test failure
162162
id: collect-failure-logs
163163
shell: bash
164-
if: ${{ steps.test-run.outcome == 'failure' }}
164+
if: ${{ always() && steps.test-run.outcome != 'success' && steps.configure.outcome == 'success' }}
165165
run: |
166166
echo "=== Collecting enhanced logs after test failure ==="
167167
NAMESPACE=${{ steps.configure.outputs.NAMESPACE }}
@@ -185,7 +185,7 @@ jobs:
185185

186186
- name: Upload Pod logs on test failure
187187
uses: actions/upload-artifact@v4
188-
if: ${{ steps.test-run.outcome == 'failure' && steps.collect-failure-logs.outcome == 'success' }}
188+
if: ${{ always() && steps.test-run.outcome != 'success' && steps.collect-failure-logs.outcome == 'success' }}
189189
with:
190190
name: failure-logs-${{ matrix.test_label}}-K8s-${{ matrix.k8s_version }}-cache-${{ matrix.cache_enabled }}-argo-${{ matrix.argo_version}}-proxy-${{ matrix.proxy }}-storage-${{ matrix.storage }}
191191
path: /tmp/enhanced_failure_logs.txt
@@ -301,7 +301,7 @@ jobs:
301301
- name: Collect Pod logs on test failure
302302
id: collect-failure-logs
303303
shell: bash
304-
if: ${{ steps.test-run.outcome == 'failure' }}
304+
if: ${{ always() && steps.test-run.outcome != 'success' && steps.configure.outcome == 'success' }}
305305
run: |
306306
echo "=== Collecting enhanced logs after test failure ==="
307307
NAMESPACE=${{ steps.configure.outputs.NAMESPACE }}
@@ -337,7 +337,7 @@ jobs:
337337

338338
- name: Upload Pod logs on test failure
339339
uses: actions/upload-artifact@v4
340-
if: ${{ steps.test-run.outcome == 'failure' && steps.collect-failure-logs.outcome == 'success' }}
340+
if: ${{ always() && steps.test-run.outcome != 'success' && steps.collect-failure-logs.outcome == 'success' }}
341341
with:
342342
name: failure-logs-multiuser-K8s-${{ matrix.k8s_version }}-cache-${{ matrix.cache_enabled }}-storage-${{ matrix.storage }}
343343
path: /tmp/enhanced_failure_logs.txt

0 commit comments

Comments
 (0)