@@ -559,9 +559,20 @@ def _replace_outdated_proxy(self, cfgdir: Path) -> bool:
559
559
)
560
560
fl .unlink ()
561
561
continue
562
+
562
563
# 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
+
565
576
old = "{EXTERNAL_INSTANCE_URL}{JUPYTERHUB_SERVICE_PREFIX}"
566
577
new = "{JUPYTERHUB_PUBLIC_URL}"
567
578
try :
@@ -625,7 +636,7 @@ def _inject_new_proxy(self, tgt: Path) -> None:
625
636
626
637
def _replace_proxy_link (
627
638
self ,
628
- obj : dict [str , Any ],
639
+ obj : dict [str , Any ] | None ,
629
640
goodlink : dict [str , dict [str , dict [str , str ]]],
630
641
) -> dict [str , Any ]:
631
642
flensed = self ._flense_dict (obj )
@@ -667,7 +678,7 @@ def _flense_dict(
667
678
flensed = self ._flense_dict (val )
668
679
if flensed is None :
669
680
continue
670
- retval [keyent ] = val
681
+ retval [keyent ] = flensed
671
682
return retval if retval else None
672
683
673
684
def _copy_logging_profile (self ) -> None :
0 commit comments