mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
Merge pull request #22525 from BerriAI/fix/observatory-tunnel-retry
Fix observatory tunnel DNS flakiness and PLR0915 lint
This commit is contained in:
commit
fc68609b42
2 changed files with 14 additions and 3 deletions
15
.github/workflows/run_observatory_tests.yml
vendored
15
.github/workflows/run_observatory_tests.yml
vendored
|
|
@ -104,8 +104,19 @@ jobs:
|
|||
- name: Verify tunnel connectivity
|
||||
run: |
|
||||
echo "Testing tunnel at ${{ env.TUNNEL_URL }}..."
|
||||
curl -sf "${{ env.TUNNEL_URL }}/health/liveliness"
|
||||
echo "Tunnel is working"
|
||||
# Quick tunnels need time for DNS propagation; retry to avoid
|
||||
# transient NXDOMAIN (curl exit code 6) on first attempt.
|
||||
for i in $(seq 1 10); do
|
||||
if curl -sf "${{ env.TUNNEL_URL }}/health/liveliness" > /dev/null 2>&1; then
|
||||
echo "Tunnel is working (attempt $i)"
|
||||
exit 0
|
||||
fi
|
||||
echo "Attempt $i/10 - tunnel not routable yet, waiting 5s..."
|
||||
sleep 5
|
||||
done
|
||||
echo "Tunnel failed to become reachable after 50s"
|
||||
cat /tmp/cloudflared.log
|
||||
exit 1
|
||||
|
||||
- name: Trigger observatory test run
|
||||
id: trigger
|
||||
|
|
|
|||
|
|
@ -1718,7 +1718,7 @@ class Router:
|
|||
|
||||
return FallbackStreamWrapper(stream_with_fallbacks())
|
||||
|
||||
def _completion_streaming_iterator(
|
||||
def _completion_streaming_iterator( # noqa: PLR0915
|
||||
self,
|
||||
model_response: CustomStreamWrapper,
|
||||
messages: List[Dict[str, str]],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue