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

Warn users that resources may be left behind if interrupting dss initialize, dss create #126

Open
ca-scribner opened this issue May 8, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ca-scribner
Copy link
Contributor

Why it needs to get done

If a user does:

dss create
# wait a few seconds, but not long enough to create the notebook
ctrl+c

the dss create command is interrupted but likely has created a notebook already. We should warn the users about this. An option could be to add a signal handler in main.create_notebook_command() like:

import signal

def create_notebook_command(...):
    def signal_handler(sig, frame):
        logger.info(f"`dss create` cancelled.  This may leave a notebook behind in your environment - use `dss list` to find the notebook and `dss remove {name}` to remove it")
        click.get_current_context().exit(1)
    signal.signal(signal.SIGINT, signal_handler)

    ...

ref

We can add a similar warning to dss initialize

What needs to get done

.

When is the task considered done

dss create and dss initialize gracefully handle SIGINT, warning the users of potential consequences and how to address them

@ca-scribner ca-scribner added the enhancement New feature or request label May 8, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5647.

This message was autogenerated

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

No branches or pull requests

1 participant