Skip to content

Commit a3a4de7

Browse files
committed
Address review suggestions
1 parent 08bfb61 commit a3a4de7

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/lsst/rsp/startup/services/labrunner/labrunner.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,20 @@ def _replace_outdated_proxy(self, cfgdir: Path) -> bool:
559559
)
560560
fl.unlink()
561561
continue
562+
562563
# Look for "distributed.dashboard.link"
563-
# The old link is not correct for per-user domains.
564-
# It needs to become {JUPYTERHUB_PUBLIC_URL}
564+
# It may have an older, non-user-domain-aware link
565+
# in it, and if so, then we need to replace it
566+
# with the newer, user-domain-aware one.
567+
#
568+
# Dask does the template-from-environment substitution
569+
# so these are just strings. The point is that "old"
570+
# is not correct in a user-domain-aware world, but
571+
# "new" works in either case (and also is something
572+
# JupyterHub gives us for free, and does not rely on our
573+
# very-RSP-specific-and-going-away-with-service-discovery
574+
# EXTERNAL_INSTANCE_URL variable).
575+
565576
old = "{EXTERNAL_INSTANCE_URL}{JUPYTERHUB_SERVICE_PREFIX}"
566577
new = "{JUPYTERHUB_PUBLIC_URL}"
567578
try:
@@ -625,7 +636,7 @@ def _inject_new_proxy(self, tgt: Path) -> None:
625636

626637
def _replace_proxy_link(
627638
self,
628-
obj: dict[str, Any],
639+
obj: dict[str, Any] | None,
629640
goodlink: dict[str, dict[str, dict[str, str]]],
630641
) -> dict[str, Any]:
631642
flensed = self._flense_dict(obj)
@@ -667,7 +678,7 @@ def _flense_dict(
667678
flensed = self._flense_dict(val)
668679
if flensed is None:
669680
continue
670-
retval[keyent] = val
681+
retval[keyent] = flensed
671682
return retval if retval else None
672683

673684
def _copy_logging_profile(self) -> None:

0 commit comments

Comments
 (0)