From 328a33befa74aa6517971f180075e4dbb99bc82f Mon Sep 17 00:00:00 2001 From: Steve Silvester Date: Wed, 25 Aug 2021 06:02:02 -0500 Subject: [PATCH] Make provisioner ip configurable (#97) * make provisioner ip configurable * bump version --- data_studio_jupyter_extensions/_version.py | 2 +- data_studio_jupyter_extensions/provisioner.py | 8 ++++---- pyproject.toml | 2 +- version | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data_studio_jupyter_extensions/_version.py b/data_studio_jupyter_extensions/_version.py index 9407492141..3b3ca6c457 100644 --- a/data_studio_jupyter_extensions/_version.py +++ b/data_studio_jupyter_extensions/_version.py @@ -1 +1 @@ -__version__ = "0.5.0" # pragma: no cover +__version__ = "0.6.0" # pragma: no cover diff --git a/data_studio_jupyter_extensions/provisioner.py b/data_studio_jupyter_extensions/provisioner.py index 1a77b73bd4..bfa5538130 100644 --- a/data_studio_jupyter_extensions/provisioner.py +++ b/data_studio_jupyter_extensions/provisioner.py @@ -30,7 +30,7 @@ class NotebookServiceProvisioner(provisioning.KernelProvisionerBase): """Kernel Provisioner that talks directly to the Notebook Service.""" - ip = Unicode(allow_none=True) + ip = Unicode(allow_none=True).tag(config=True) iopub_port = IntFromEnv(name=constants.IOPUBPORT, allow_none=True) hb_port = IntFromEnv(name=constants.HBPORT, allow_none=True) control_port = IntFromEnv(name=constants.CONTROLPORT, allow_none=True) @@ -367,7 +367,7 @@ async def _launch_kernel_local_to_local(self) -> KernelConnectionInfo: # Get the Host information from the kernel details endpoint. kernel_info = await self.nbservice_client.get_kernel_details(self.process_id) - self.ip = kernel_info["host"] + self.ip = self.ip or kernel_info["host"] return self.connection_info async def _launch_kernel_local_to_cluster( @@ -385,7 +385,7 @@ async def _launch_kernel_local_to_cluster( self.control_port = port_map["control"] self.shell_port = port_map["shell"] self.stdin_port = port_map["stdin"] - self.ip = host + self.ip = self.ip or host return self.connection_info async def _launch_kernel_cluster_to_cluster( @@ -397,7 +397,7 @@ async def _launch_kernel_cluster_to_cluster( # The connection info should be predetermined by the kernel itself. # Get the Host information from the kernel details endpoint. kernel_info = await self.nbservice_client.get_kernel_details(self.process_id) - self.ip = kernel_info["host"] + self.ip = self.ip or kernel_info["host"] return self.connection_info async def launch_kernel( diff --git a/pyproject.toml b/pyproject.toml index 0002088b58..aa9dcbd2b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ testpaths = [ ] [tool.tbump.version] -current = "0.5.0" +current = "0.6.0" regex = ''' (?P\d+)\.(?P\d+)\.(?P\d+) ((?Pa|b|rc|.dev)(?P\d+))? diff --git a/version b/version index 8f0916f768..a918a2aa18 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.5.0 +0.6.0