Skip to content

Commit

Permalink
fixing singleton instanciation (jupyter-server#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Chitneni authored and GitHub Enterprise committed Jun 8, 2022
1 parent 244cd4c commit bcd863c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion data_studio_jupyter_extensions/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.20.6" # pragma: no cover
__version__ = "0.20.7" # pragma: no cover
6 changes: 3 additions & 3 deletions data_studio_jupyter_extensions/auth/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from jupyter_server.utils import url_path_join

from data_studio_jupyter_extensions.base_handler import DSExtensionHandlerMixin
from data_studio_jupyter_extensions.configurables.refresh_token import (
RefreshTokenConfigurable,
from data_studio_jupyter_extensions.configurables.notebook_service import (
NotebookServiceClient,
)


Expand All @@ -16,7 +16,7 @@ class JWTLoginHandler(DSExtensionHandlerMixin, LoginHandler):
authenticates with JWT.
"""

refresh_token_provider = RefreshTokenConfigurable.instance()
refresh_token_provider = NotebookServiceClient.instance()

def _render(self, message=None):
if self.datastudio_url:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ async def poll(self):
if self.is_culling_enabled():
culled = await self.cull_if_idle()
if culled:
self.log.info(
f"kernel: {self.kernel_manager.kernel_id} culled, exiting poller"
)
return

# If the kernel is communicating, we're good here.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class NotebookServiceClient(RefreshTokenConfigurable):
request_token = Unicode(allow_none=True)

request_timeout = IntFromEnv(
name=constants.DS_API_REQUEST_TIMEOUT, allow_none=True
name=constants.DS_API_REQUEST_TIMEOUT, default_value=120, allow_none=True
).tag(config=True)

http_client = Instance(AsyncHTTPClient).tag(config=True)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ testpaths = [
]

[tool.tbump.version]
current = "0.20.6"
current = "0.20.7"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion src/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { ISessionContext, ReactWidget } from '@jupyterlab/apputils';
import { EventListener } from './eventlistener';

// This is managed by tbump config in pyproject.toml
const VERSION = '0.20.6';
const VERSION = '0.20.7';

// Define the error states
// https://github.pie.apple.com/pie-data-studio/notebook-service/blob/761d63604966db5918d2e491c0f89cce454b7f67/app/com/apple/datastudio/model/ResourceState.scala#L20
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.20.6
0.20.7

0 comments on commit bcd863c

Please sign in to comment.