From 76579a3fb0f2e2520ff12a0443756eb6e21fd0ca Mon Sep 17 00:00:00 2001 From: Gosuto Inzasheru Date: Thu, 26 Mar 2026 11:22:48 +0100 Subject: [PATCH] add debug workflow for raw.githubusercontent.com CI issue --- .../debug_raw_githubusercontent.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/debug_raw_githubusercontent.yaml diff --git a/.github/workflows/debug_raw_githubusercontent.yaml b/.github/workflows/debug_raw_githubusercontent.yaml new file mode 100644 index 0000000..689bfe5 --- /dev/null +++ b/.github/workflows/debug_raw_githubusercontent.yaml @@ -0,0 +1,48 @@ +name: Debug raw.githubusercontent.com + +on: + workflow_dispatch: + +jobs: + debug: + runs-on: ubuntu-latest + steps: + - name: Test raw.githubusercontent.com responses + run: | + for URL in \ + "https://raw.githubusercontent.com/balancer/bal_addresses/refs/heads/main/extras/chains.json" \ + "https://raw.githubusercontent.com/balancer/bal_addresses/main/extras/chains.json" \ + "https://raw.githubusercontent.com/BalancerMaxis/bal_addresses/main/extras/chains.json"; do + echo "=== $URL ===" + echo "--- Headers ---" + curl -sI "$URL" + echo "--- Status code ---" + curl -s -o /dev/null -w "HTTP %{http_code}\n" "$URL" + echo "--- First 200 bytes ---" + curl -s "$URL" | head -c 200 + echo "" + echo "" + done + + - name: Test Python requests behavior + run: | + pip3 install requests + python3 -c " + import requests + urls = [ + 'https://raw.githubusercontent.com/balancer/bal_addresses/refs/heads/main/extras/chains.json', + 'https://raw.githubusercontent.com/balancer/bal_addresses/main/extras/chains.json', + ] + for url in urls: + print(f'=== {url} ===') + resp = requests.get(url) + print(f'Status: {resp.status_code}') + print(f'Content-Type: {resp.headers.get(\"content-type\")}') + print(f'Body[:200]: {resp.text[:200]}') + try: + resp.json() + print('json(): OK') + except Exception as e: + print(f'json(): FAILED - {e}') + print() + "