From b50afbec4151d49ded93b137c9f87a14c5054b5a Mon Sep 17 00:00:00 2001 From: YuryShkoda Date: Tue, 21 Jul 2026 12:55:01 +0300 Subject: [PATCH] ci: add VPN diagnostics and curl retry to server-tests workflow The "Fetch SASJS server" step was timing out after 130s+ despite the VPN reporting "Connected", with no way to tell whether routes hadn't propagated yet or the firewall was silently dropping packets from the runner's IP. Log VPN session/route/DNS state right after connecting, and retry the curl with a shorter per-attempt timeout so a routing race resolves itself instead of hanging the whole job. --- .github/workflows/server-tests.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/server-tests.yml b/.github/workflows/server-tests.yml index 1b16039..c03ba87 100644 --- a/.github/workflows/server-tests.yml +++ b/.github/workflows/server-tests.yml @@ -86,8 +86,24 @@ jobs: - name: install pm2 run: npm i -g pm2 + - name: Diagnose VPN connectivity + run: | + echo "--- openvpn3 sessions-list ---" + openvpn3 sessions-list + echo "--- openvpn3 session-stats ---" + openvpn3 session-stats --config .github/vpn/config.ovpn + echo "--- ip addr (tun interface) ---" + ip addr show tun0 || echo "no tun0 interface found" + echo "--- ip route ---" + ip route + echo "--- DNS resolution for target host ---" + getent hosts "$(echo '${{ secrets.SASJS_SERVER_URL }}' | sed -E 's#^[a-z]+://##; s#[:/].*##')" || echo "DNS resolution failed" + shell: bash + - name: Fetch SASJS server - run: curl ${{ secrets.SASJS_SERVER_URL }}/SASjsApi/info + run: | + curl -v --retry 5 --retry-delay 5 --retry-all-errors --connect-timeout 15 --max-time 30 \ + "${{ secrets.SASJS_SERVER_URL }}/SASjsApi/info" - name: Deploy sasjs-tests run: |