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

modal shell takes container IDs now #2336

Merged
merged 2 commits into from
Oct 14, 2024
Merged

modal shell takes container IDs now #2336

merged 2 commits into from
Oct 14, 2024

Conversation

ekzhang
Copy link
Member

@ekzhang ekzhang commented Oct 14, 2024

Describe your changes

Resolves MOD-4091, allowing you to do modal shell ta-123456.

Changelog

  • The modal shell CLI command now takes a container ID, allowing you to shell into a running container.

Copy link
Contributor

@thecodingwizard thecodingwizard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! another minor benefit is now users don't have to write "bash" after "modal container exec [id]" if they just want a shell in a container

@@ -331,49 +331,46 @@ def serve(


def shell(
func_ref: Optional[str] = typer.Argument(
container_or_function: Optional[str] = typer.Argument(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, but one tricky thing about container_or_function is that they're not equivalent — the "container" mode is a container_id but while we do have a function_id concept, that isn't what you would pass here 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that makes sense! It's only internal though since the metavar in the help is REF so maybe fine.

@ekzhang ekzhang merged commit 3f7da81 into main Oct 14, 2024
22 checks passed
@ekzhang ekzhang deleted the ekzhang/container-shell branch October 14, 2024 20:16
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

Successfully merging this pull request may close these issues.

3 participants