Repository navigation
fix(deps): bump modal from 1.4.3 to 1.6.1 #5400
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,7 +75,7 @@ e2b = [ | |
| "pygments>=2.20.0", | ||
| ] | ||
| modal = [ | ||
| "modal==1.4.3", | ||
| "modal==1.6.1", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a directory snapshot takes more than 55 seconds, Modal 1.5 now terminates it at a new provider-side default even if AGENTS.md reference: AGENTS.md:L115-L115 Useful? React with 👍 / 👎. |
||
| "aiohttp>=3.14.3,<4", | ||
| "cbor2>=5.9.0", | ||
| "h2>=4.4.1", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,7 @@ | |
| SandboxError, | ||
| WorkspaceArchiveReadError, | ||
| WorkspaceArchiveWriteError, | ||
| WorkspaceReadNotFoundError, | ||
| WorkspaceStartError, | ||
| WorkspaceStopError, | ||
| WorkspaceWriteTypeError, | ||
|
|
@@ -1251,30 +1252,23 @@ async def _terminate_pty_entry(self, entry: _ModalPtyProcessEntry) -> None: | |
| async def _read_bounded(self, path: Path, *, max_bytes: int) -> bytes: | ||
| try: | ||
| workspace_path = await self._validate_path_access(path) | ||
| await self._ensure_sandbox() | ||
| assert self._sandbox is not None | ||
| # Each read starts a remote operation. Use Modal's 100 MiB per-read | ||
| # ceiling while respecting the caller's remaining byte budget. | ||
| stream = await self._sandbox.open.aio(sandbox_path_str(workspace_path), "rb") | ||
| completed = False | ||
| try: | ||
| result = bytearray() | ||
| while len(result) < max_bytes: | ||
| chunk = await stream.read.aio(min(100 * 1024 * 1024, max_bytes - len(result))) | ||
| if not chunk: | ||
| break | ||
| result.extend(chunk) | ||
| payload = bytes(result) | ||
| completed = True | ||
| return payload | ||
| finally: | ||
| try: | ||
| await asyncio.wait_for(stream.close.aio(), timeout=5.0) | ||
| except Exception: | ||
| # Preserve an active read failure or cancellation. A close failure | ||
| # still fails a read that would otherwise have completed. | ||
| if completed: | ||
| raise | ||
| # Bound acquisition inside the sandbox, using the same exec transport as read(). | ||
| # Like read(), do not impose an exec deadline: it terminates the whole sandbox. | ||
| result = await self.exec( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When cancellation arrives after Modal has created the AGENTS.md reference: AGENTS.md:L117-L118 Useful? React with 👍 / 👎. |
||
| "/bin/sh", | ||
| "-c", | ||
| "PATH=/usr/bin:/bin; export PATH; " | ||
| '[ -e "$1" ] || exit 44; [ -f "$1" ] || exit 45; head -c "$2" < "$1"', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛡️ Codex Security Review · Automatically triggered
When a Modal-backed agent can modify image utilities, model-controlled shell commands can replace SECURITY.md reference: SECURITY.md:L38-L38 Dismiss this finding: Reply with Valid reasons: What each reason means
Useful? React with 👍 / 👎. |
||
| "sh", | ||
| sandbox_path_str(workspace_path), | ||
| str(max_bytes), | ||
| shell=False, | ||
| ) | ||
| if result.exit_code == 44: | ||
| raise WorkspaceReadNotFoundError(path=path) | ||
| if not result.ok(): | ||
| raise WorkspaceArchiveReadError(path=path) | ||
| return result.stdout | ||
| except (FileNotFoundError, SandboxError): | ||
| raise | ||
| except Exception as error: | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
workspace_persistenceissnapshot_filesystemorsnapshot_directory, this upgrade crosses Modal 1.5, which changed both snapshot APIs from indefinite retention to a 30-day default. The persistence methods still call these APIs withoutttl=and serialize only the resulting image ID, so after 30 days a previously durable workspace can no longer be restored. Passttl=Noneexplicitly to preserve the released behavior; Modal documents this breaking default in its Python SDK release notes.AGENTS.md reference: AGENTS.md:L111-L111
Useful? React with 👍 / 👎.