Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Stop ability of starting stopped shared apps from JupyterHub interface #138

Open
aktech opened this issue Feb 28, 2024 · 1 comment

Comments

@aktech
Copy link
Member

aktech commented Feb 28, 2024

Context

Here is the scenario, when a user creates an app and it's stopped over time and an admin user, who can see the shared app clicks on the app, the user is redirected to JupyterHub's interface to start the app, which calls the jupyterhub API directly instead of going via jhub-apps service, which ends up with following:

  • creating a jupyterlab as it uses the default spawner
  • loses all the user_options set by jhub-apps
  • Gets disappeared from the app launcher home as only the apps with users_options['jhub_app'] = True are shown in the app launcher home.

Stopped shared app should only be started from this interface
image

We need to somehow disable starting from the jupyterhub UI

Value and/or benefit

  • Ability to only create app from one interface
  • Consistency in app creation

Anything else?

No response

@aktech aktech added the needs: triage 🚦 Someone needs to have a look at this issue and triage label Feb 28, 2024
@aktech aktech changed the title [BUG] Stop ability of starting stopped shared app from JupyterHub interface [BUG] Stop ability of starting stopped shared apps from JupyterHub interface Feb 28, 2024
@aktech aktech removed the needs: triage 🚦 Someone needs to have a look at this issue and triage label Feb 28, 2024
@krassowski
Copy link
Member

Currently the user who sees such an app is unable to "Start" it from dropdown:

image

That Start would go post to /server/ endpoint which currently has no parameters so it does not allow to start a specifc server, just the default server of a given user:

@router.post("/server")
async def create_server(
server: ServerCreation = Depends(Checker(ServerCreation)),
thumbnail: typing.Optional[UploadFile] = File(None),
user: User = Depends(get_current_user),
):
logger.info("Creating server", server_name=server.servername, user=user.name)
server.user_options.thumbnail = await get_thumbnail_data_url(
framework_name=server.user_options.framework, thumbnail=thumbnail
)
hub_client = HubClient()
return hub_client.create_server(
username=user.name,
servername=server.servername,
user_options=server.user_options,
)
@router.post("/server/")
@router.post("/server/{server_name}")
async def start_server(

I guess that once we implement the new parameter in /server/ we could then change the main card link to a programmatic call to /server and then only redirect to the link location once the server reports back as running. Does it sound like a good plan?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants