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

Remove/move is_local checks to make it possible to deploy apps with mounts from within running functions #2882

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

freider
Copy link
Contributor

@freider freider commented Feb 20, 2025

iirc, the checks were mostly in place to prevent unnecessary logic from running in global scope of containers, but just adding pre-defined mounts to a list wouldn't account for many clock cycles, and this change still prevents auto-mounting from running within containers (soon to be deprecated anyways)

Fixes: CLI-190


Check these boxes or delete any item (or this section) if not relevant for this PR.

  • Client+Server: this change is compatible with old servers
  • Client forward compatibility: this change ensures client can accept data intended for later versions of itself

Note on protobuf: protobuf message changes in one place may have impact to
multiple entities (client, server, worker, database). See points above.


Changelog

  • Fixes an issue where modal.runner.deploy_app() didn't work when called from within a running (remote) Modal Function

…ounts from within running functions

iirc, the checks were mostly in place to prevent unnecessary logic from running in global scope of containers,
but just adding pre-defined mounts to a list wouldn't account for many clock cycles, and this change still
prevents auto-mounting from running within containers (soon to be deprecated anyways)
@freider freider requested a review from mwaskom February 20, 2025 09:34
@@ -473,51 +473,41 @@ def from_local(

explicit_mounts = mounts

if is_local():
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just an unindent, with the is_local() getting moved to the inner auto mounts if condition

Copy link
Contributor

@mwaskom mwaskom left a comment

Choose a reason for hiding this comment

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

If we have an existing fixture for making unit tests appear to be running in a container, might be nice to assert on the new behavior. But thanks for addressing it!

@freider freider merged commit 821ea54 into main Feb 20, 2025
24 checks passed
@freider freider deleted the freider/remove-mount-is-local-checks branch February 20, 2025 17:19
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.

2 participants