Skip to content

Commit

Permalink
Merge pull request #494 from GoogleCloudPlatform/ojarjur-ignore-remot…
Browse files Browse the repository at this point in the history
…e-list-kernels-failures

[kernels-mixer] Ignore errors listing remote kernels
  • Loading branch information
ojarjur authored Mar 12, 2024
2 parents bcaf977 + f3d6905 commit a9f35e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion kernels-mixer/kernels_mixer/kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ def __init__(self, *args, **kwargs):
kernel_spec_manager=self.kernel_spec_manager.remote_manager)

def list_kernels(self):
run_sync(self.remote_manager.list_kernels)()
try:
run_sync(self.remote_manager.list_kernels)()
except Exception as ex:
self.log.exception('Failure listing remote kernels: %s', ex)
# Ignore the exception listing remote kernels, so that local kernels are still usable.
return super().list_kernels()

def kernel_model(self, kernel_id):
Expand Down
2 changes: 1 addition & 1 deletion kernels-mixer/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setuptools.setup(
name="kernels-mixer",
version="0.0.9",
version="0.0.10",
author="Google, Inc.",
description="Jupyter server extension that allows mixing local and remote kernels together",
long_description=long_description,
Expand Down

0 comments on commit a9f35e4

Please sign in to comment.