From 30bff2083702d295085f82676b85b700f560c5bc Mon Sep 17 00:00:00 2001 From: Jonathon Belotti Date: Thu, 21 Nov 2024 19:56:43 +0000 Subject: [PATCH] make Mount._deploy implicitly Environment-scoped --- modal/mount.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modal/mount.py b/modal/mount.py index 7c83afe06..e6c33e83d 100644 --- a/modal/mount.py +++ b/modal/mount.py @@ -622,12 +622,13 @@ async def _deploy( client: Optional[_Client] = None, ) -> None: check_object_name(deployment_name, "Mount") + environment_name = _get_environment_name(environment_name, resolver=None) self._deployment_name = deployment_name self._namespace = namespace self._environment_name = environment_name if client is None: client = await _Client.from_env() - resolver = Resolver(client=client) + resolver = Resolver(client=client, environment_name=environment_name) await resolver.load(self) def _get_metadata(self) -> api_pb2.MountHandleMetadata: