From 2f7189ee9788e384ff65141d6d535439255ae1ab Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 15 Feb 2023 15:46:29 +0100 Subject: [PATCH] duplicate NotebookApp CLI args to ServerApp ahead of ServerApp deprecating handling of NotebookApp aliases --- binderhub/binderspawner_mixin.py | 4 ++++ helm-chart/binderhub/values.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/binderhub/binderspawner_mixin.py b/binderhub/binderspawner_mixin.py index 175e1d56a..aaa4761f8 100644 --- a/binderhub/binderspawner_mixin.py +++ b/binderhub/binderspawner_mixin.py @@ -84,6 +84,10 @@ def get_args(self): if self.cors_allow_origin == "*": args.append("--NotebookApp.allow_origin_pat=.*") args += self.args + # ServerApp compatibility: duplicate NotebookApp args + for arg in list(args): + if arg.startswith("--NotebookApp."): + args.append(arg.replace("--NotebookApp.", "--ServerApp.")) return args def start(self): diff --git a/helm-chart/binderhub/values.yaml b/helm-chart/binderhub/values.yaml index dde5b7a68..0b3139be9 100644 --- a/helm-chart/binderhub/values.yaml +++ b/helm-chart/binderhub/values.yaml @@ -169,6 +169,10 @@ jupyterhub: if self.cors_allow_origin == "*": args.append("--NotebookApp.allow_origin_pat=.*") args += self.args + # ServerApp compatibility: duplicate NotebookApp args + for arg in list(args): + if arg.startswith("--NotebookApp."): + args.append(arg.replace("--NotebookApp.", "--ServerApp.")) return args def start(self):