solari-runloop-compat 0.2.7__tar.gz → 0.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/COMPAT.md +1 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/PKG-INFO +1 -1
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/pyproject.toml +1 -1
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/__init__.py +1 -1
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_dockerfile.py +2 -2
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_gateway.py +23 -7
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_mapping.py +10 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/.gitignore +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/LICENSE +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/NOTICE +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/README.md +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_branding.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_client.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_config.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_context.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_exceptions.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_loop.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_models.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_options.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_redact.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_resources.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_sync.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_types.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/_vendor_user.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/lib/__init__.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/lib/polling.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/pagination.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/sdk.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/__init__.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/blueprint_build_log.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/blueprint_build_logs_list_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/blueprint_build_parameters.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/blueprint_list_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/blueprint_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devbox_async_execution_detail_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devbox_execution_detail_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devbox_snapshot_list_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devbox_snapshot_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devbox_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devboxes/__init__.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devboxes/devbox_logs_list_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devboxes/devbox_snapshot_async_status_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devboxes/execution_update_chunk.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/object_download_url_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/object_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/secret_list_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/secret_view.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/shared/__init__.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/shared/after_idle.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/shared/code_mount_parameters.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/shared/launch_parameters.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/shared/lifecycle_configuration.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/shared/lifecycle_hooks.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/shared/resume_triggers.py +0 -0
- {solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/tunnel_view.py +0 -0
|
@@ -160,6 +160,7 @@ Last run 2026-10-21 against the F15 integration build `desktop-gateway:staging-1
|
|
|
160
160
|
Here, Runloop sandboxes run as `user` in `/home/user`; commands, code and files all start there, and relative paths resolve against it. This package
|
|
161
161
|
asks the gateway for exactly that at create time (`user: "user"`, `cwd: "/home/user"`; the gateway creates the user at first boot with passwordless
|
|
162
162
|
sudo). Restores from a snapshot keep the snapshot's own user.
|
|
163
|
+
- **File calls act as that user.** `files.*` / `fs.*` run with the sandbox user's permissions (not root): `/etc/shadow` is refused with `permission denied`, a write under `/etc` fails, and a file you create is owned by the user. Guest images built before this fix still ran them as root.
|
|
163
164
|
- **Gateway that predates `user` / `cwd`** (it answers 400 naming them, or ignores them): the plain create is used and the sandbox runs as **root in
|
|
164
165
|
`/home/root`**, which is what this package did before. Check `whoami` if code depends on it.
|
|
165
166
|
- **Template or snapshot made before user support** (the server answers 400 naming `user`): the plain create is used, the sandbox runs as **root**, and one warning says so. Rebuild templates and snapshots to get the vendor user.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "solari-runloop-compat"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.9"
|
|
8
8
|
description = "Runloop-compatible Python interface over Solari Sandboxes. Not affiliated with Runloop."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -33,7 +33,7 @@ from ._types import NOT_GIVEN, NoneType, NotGiven, Omit, Timeout, not_given, omi
|
|
|
33
33
|
from .lib.polling import PollingConfig, PollingTimeout
|
|
34
34
|
from .sdk import AsyncRunloopSDK, RunloopSDK
|
|
35
35
|
|
|
36
|
-
__version__ = "0.2.
|
|
36
|
+
__version__ = "0.2.9"
|
|
37
37
|
Client = Runloop
|
|
38
38
|
AsyncClient = AsyncRunloop
|
|
39
39
|
|
|
@@ -9,7 +9,7 @@ Supported: ``FROM`` (one stage; ubuntu/debian-family or a Solari base/template m
|
|
|
9
9
|
image becomes the gateway's native ``compiled.fromImage`` build, BLUEPRINTS.md level 3b), ``RUN``, ``ENV``, ``ARG`` (defaults and
|
|
10
10
|
``--build-arg``), ``WORKDIR``, ``ENTRYPOINT``, ``CMD`` (recorded in the image, not started: pass ``entrypoint=`` to ``devboxes.create``), ``SHELL``
|
|
11
11
|
(exec form; later shell-form ``RUN``/``CMD``/``ENTRYPOINT`` use it), ``EXPOSE`` (validated; every guest port is reachable through the
|
|
12
|
-
tunnel, so a TCP port needs nothing more). ``LABEL`` and ``MAINTAINER`` are metadata only: accepted with one warning. Refused, never dropped: ``STOPSIGNAL`` (a Solari template has
|
|
12
|
+
tunnel, so a TCP port needs nothing more). ``LABEL`` and ``MAINTAINER`` are metadata only: accepted with one warning that says they are not recorded. Refused, never dropped: ``STOPSIGNAL`` (a Solari template has
|
|
13
13
|
no stop signal), ``EXPOSE .../udp``, ``FROM --platform`` other than linux/amd64, multi-stage, ``USER``, ``VOLUME``, ``HEALTHCHECK``,
|
|
14
14
|
``ONBUILD``.
|
|
15
15
|
"""
|
|
@@ -250,7 +250,7 @@ def compile_dockerfile(
|
|
|
250
250
|
if not warned_metadata:
|
|
251
251
|
warned_metadata = True
|
|
252
252
|
log.warning(
|
|
253
|
-
"Dockerfile %s is ignored: a Solari template
|
|
253
|
+
"Dockerfile %s is ignored: a Solari template stores no image labels, so they are not recorded or readable later; the devbox runs the same without them. Remove LABEL / MAINTAINER lines to silence this warning",
|
|
254
254
|
instr,
|
|
255
255
|
)
|
|
256
256
|
elif instr == "STOPSIGNAL":
|
|
@@ -542,14 +542,30 @@ class Gateway:
|
|
|
542
542
|
log.exception("streaming output of %s failed", eid)
|
|
543
543
|
rec.flush()
|
|
544
544
|
|
|
545
|
+
#: How long a durable execution's watcher keeps asking while the devbox cannot answer (suspended, restarting, a pod
|
|
546
|
+
#: change) before it gives up; the process may well still be running, so this is NOT a verdict about it.
|
|
547
|
+
REMOTE_WATCH_PATIENCE_S = 600.0
|
|
548
|
+
|
|
545
549
|
async def _remote_watch(self, rec: _Exec) -> None:
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
550
|
+
deadline = time.monotonic() + self.REMOTE_WATCH_PATIENCE_S
|
|
551
|
+
delay = 0.5
|
|
552
|
+
while True:
|
|
553
|
+
try:
|
|
554
|
+
final = await self.remote_wait(rec.devbox_id, rec.execution_id)
|
|
555
|
+
rec.exit_code = final.exit_status
|
|
556
|
+
rec.stdout, rec.stderr = [final.stdout or ""], [final.stderr or ""]
|
|
557
|
+
rec.truncated = (bool(final.stdout_truncated), bool(final.stderr_truncated))
|
|
558
|
+
break
|
|
559
|
+
except Exception as e: # noqa: BLE001
|
|
560
|
+
# A wait that cannot be answered right now (the devbox is suspended: 409; connection or 5xx while it resumes) says
|
|
561
|
+
# nothing about the command: reading "completed" here told callers a process that was still alive had finished.
|
|
562
|
+
transient = isinstance(e, (ex.ConflictError, ex.APIConnectionError, ex.InternalServerError, ex.RateLimitError))
|
|
563
|
+
if transient and time.monotonic() < deadline:
|
|
564
|
+
await asyncio.sleep(delay)
|
|
565
|
+
delay = min(delay * 2, 10.0)
|
|
566
|
+
continue
|
|
567
|
+
rec.error = e if isinstance(e, ex.APIError) else ex.APIError(str(e), None, body=None)
|
|
568
|
+
break
|
|
553
569
|
rec.status = "completed"
|
|
554
570
|
rec.done.set() # type: ignore[union-attr]
|
|
555
571
|
|
|
@@ -54,6 +54,10 @@ def resolve_size(lp: Optional[Dict[str, Any]]) -> Tuple[Optional[int], Optional[
|
|
|
54
54
|
elif size == "CUSTOM_SIZE" or lp.get("custom_cpu_cores") or lp.get("custom_gb_memory"):
|
|
55
55
|
cpu_f = lp.get("custom_cpu_cores")
|
|
56
56
|
mem_gib = lp.get("custom_gb_memory")
|
|
57
|
+
if size and size != "CUSTOM_SIZE" and (lp.get("custom_cpu_cores") or lp.get("custom_gb_memory")):
|
|
58
|
+
# Same refusal as the TypeScript package: a named size and an explicit core / memory count disagree, and silently
|
|
59
|
+
# taking the named size dropped what the caller asked for.
|
|
60
|
+
raise ex.BadRequestError(f"custom_cpu_cores / custom_gb_memory need resource_size_request CUSTOM_SIZE (or none), not {size!r}", status_code=400)
|
|
57
61
|
cpu = max(1, math.ceil(cpu_f)) if cpu_f else None
|
|
58
62
|
mem_mb = int(mem_gib * 1024) if mem_gib else None
|
|
59
63
|
if cpu is not None and cpu > SOLARI_MAX_VCPU:
|
|
@@ -438,6 +442,12 @@ def map_error(exc: BaseException) -> BaseException:
|
|
|
438
442
|
out3 = ex.APIConnectionError(exc.message)
|
|
439
443
|
out3.__cause__ = exc
|
|
440
444
|
return out3
|
|
445
|
+
# A file or directory that does not exist is Runloop's 404, not a bare APIError: the guest answers the RPC with "open <path>: no such file
|
|
446
|
+
# or directory" and no code (fs.download / fs.list / fs.stat ...).
|
|
447
|
+
if isinstance(exc, core_errors.ActionError) and str(getattr(exc, "method", "")).startswith("fs.") and "no such file or directory" in exc.message.lower():
|
|
448
|
+
nf = ex.NotFoundError(exc.message, body={"message": exc.message})
|
|
449
|
+
nf.__cause__ = exc
|
|
450
|
+
return nf
|
|
441
451
|
if isinstance(exc, core_errors.SolariError):
|
|
442
452
|
out4 = ex.APIError(exc.message, None, body=None)
|
|
443
453
|
out4.__cause__ = exc
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/blueprint_view.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/devbox_view.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/object_view.py
RENAMED
|
File without changes
|
{solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/secret_list_view.py
RENAMED
|
File without changes
|
{solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/secret_view.py
RENAMED
|
File without changes
|
{solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/shared/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.7 → solari_runloop_compat-0.2.9}/solari_runloop/types/tunnel_view.py
RENAMED
|
File without changes
|