Skip to content

Commit 1002637

Browse files
committed
ci: improve debugging output of legacy integration tests
1 parent 71d4284 commit 1002637

1 file changed

Lines changed: 25 additions & 9 deletions

File tree

.github/workflows/integration.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,35 @@ jobs:
5656
if [ -f client-tests-failed ]; then has_error=1; echo "Client tests failed"; fi
5757
if [ -f pilot-tests-failed ]; then has_error=1; echo "Pilot tests failed"; fi
5858
if [ ${has_error} = 1 ]; then exit 1; fi
59-
- name: diracx filtered requests logs
59+
- name: Debugging information
60+
if: always()
6061
run: |
62+
mkdir -p /tmp/service-logs
63+
64+
echo "::group::Container status"
65+
docker ps -a --format "table {{.Names}}\t{{.Status}}\t{{.Image}}\t{{.Ports}}"
66+
echo "::endgroup::"
67+
68+
DIRACX_CONTAINERS="diracx diracx-init-keystore diracx-init-cs diracx-init-db diracx-chmod"
69+
70+
for container in $DIRACX_CONTAINERS; do
71+
if docker inspect "$container" &>/dev/null; then
72+
echo "::group::Logs: $container"
73+
docker logs "$container" 2>&1 | tee -a /tmp/service-logs/diracx.log
74+
echo "::endgroup::"
75+
fi
76+
done
77+
78+
echo "::group::DiracX API request summary"
6179
docker logs diracx 2>/dev/null | grep '/api/' \
6280
| awk -F\" '{print $2, $3}' \
6381
| awk '{print $1, $2, $4}' \
64-
| sort | uniq -c | sort
65-
- name: diracx error logs
66-
if: ${{ failure() }}
67-
run: |
68-
mkdir -p /tmp/service-logs
69-
docker logs diracx 2>&1 | tee /tmp/service-logs/diracx.log
70-
cd /tmp/DIRACRepo
71-
./integration_tests.py logs --no-follow --lines 1000 2>&1 | tee /tmp/service-logs/dirac.log
82+
| sort | uniq -c | sort || true
83+
echo "::endgroup::"
84+
85+
echo "::group::DIRAC server logs"
86+
cd /tmp/DIRACRepo && ./integration_tests.py logs --no-follow --lines 1000 2>&1 | tee /tmp/service-logs/dirac.log || true
87+
echo "::endgroup::"
7288
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
7389
if: ${{ failure() }}
7490
with:

0 commit comments

Comments
 (0)