Skip to content

Commit b99c2f3

Browse files
committed
include entrypoint check in wait_for_static
more informative error if the expected entrypoint doesn't exist, now that we aren't trying to discover it
1 parent ab4b05c commit b99c2f3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

jupyterhub_traefik_proxy/proxy.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ async def _check_traefik_static_conf_ready():
319319
"""Check if traefik loaded its static configuration yet"""
320320
try:
321321
await self._traefik_api_request("/api/overview")
322+
await self._traefik_api_request(
323+
f"/api/entrypoints/{self.traefik_entrypoint}"
324+
)
322325
except ConnectionRefusedError:
323326
self.log.debug(
324327
f"Connection Refused waiting for traefik at {self.traefik_api_url}. It's probably starting up..."
@@ -331,9 +334,14 @@ async def _check_traefik_static_conf_ready():
331334
)
332335
return False
333336
if e.code == 404:
334-
self.log.debug(
335-
f"traefik api at {e.response.request.url} overview not ready yet"
336-
)
337+
if "/entrypoints/" in e.response.request.url:
338+
self.log.warning(
339+
f"c.{self.__class__.__name__}.traefik_entrypoint={self.traefik_entrypoint!r} not found in traefik. Is it correct?"
340+
)
341+
else:
342+
self.log.debug(
343+
f"traefik api at {e.response.request.url} overview not ready yet"
344+
)
337345
return False
338346
# unexpected
339347
self.log.error(f"Error checking for traefik static configuration {e}")

0 commit comments

Comments
 (0)