Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion benchmarks/sandbox/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ export const providers: ProviderConfig[] = [
{
name: 'cloud-run',
requiredEnvVars: ['CLOUD_RUN_SANDBOX_URL', 'CLOUD_RUN_SANDBOX_SECRET'],
createCompute: () => cloudRun({ sandboxUrl: process.env.CLOUD_RUN_SANDBOX_URL!, sandboxSecret: process.env.CLOUD_RUN_SANDBOX_SECRET! }),
createCompute: () => cloudRun({
sandboxUrl: process.env.CLOUD_RUN_SANDBOX_URL!,
sandboxSecret: process.env.CLOUD_RUN_SANDBOX_SECRET!,
executionMode: 'stateful',
write: true,
allowEgress: true,
}),
Comment on lines +60 to +66

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔍 cloud-run provider options depend on unverified package types

The new executionMode: 'stateful', write: true, and allowEgress: true options passed to cloudRun(...) at src/sandbox/providers.ts:59-65 could not be validated against the @computesdk/cloud-run@^0.1.7 type definitions since node_modules is not installed in this checkout. If any of these keys are not part of the provider's options contract, TypeScript would flag it in CI (so this is not reported as a bug), but a reviewer should confirm the option names/values are accepted and actually honored by the installed cloud-run version.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

},
{
name: 'cloudflare',
Expand Down
35 changes: 31 additions & 4 deletions benchmarks/scripts/dax-benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,27 @@ prepare() {
case "$PKG_MANAGER" in
apt)
"${SUDO[@]}" apt-get update -qq
"${SUDO[@]}" env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
bash build-essential ca-certificates curl git python3 python3-setuptools unzip
# python3-setuptools and unzip are missing from some minimal images (e.g.
# cloud-run's gVisor rootfs), and apt-get installs *nothing* when any
# argument is unknown, so drop unavailable ones instead of losing the
# whole transaction. unzip has a Python fallback in unpack_bun().
local packages=(bash build-essential ca-certificates curl git python3)
local optional
for optional in python3-setuptools unzip; do
if apt-cache show "$optional" >/dev/null 2>&1; then
packages+=("$optional")
fi
done
"${SUDO[@]}" env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq "${packages[@]}"
;;
dnf)
"${SUDO[@]}" dnf makecache --quiet
"${SUDO[@]}" dnf install -y --allowerasing \
bash gcc gcc-c++ make ca-certificates curl git python3 python3-setuptools unzip
bash gcc gcc-c++ make ca-certificates curl git python3
local optional
for optional in python3-setuptools unzip; do
"${SUDO[@]}" dnf install -y --allowerasing "$optional" || true
done
;;
apk)
# build-base is Alpine's meta-package for gcc/g++/make/libc-dev.
Expand Down Expand Up @@ -189,7 +203,20 @@ download_bun() {
}

unpack_bun() {
unzip -q -j "$ROOT/bun.zip" "$BUN_INTERNAL_PATH" -d "$BUN_INSTALL/bin"
if command -v unzip >/dev/null 2>&1; then
unzip -q -j "$ROOT/bun.zip" "$BUN_INTERNAL_PATH" -d "$BUN_INSTALL/bin"
else
# Fallback for minimal images without unzip (e.g. cloud-run's gVisor rootfs).
python3 - "$ROOT/bun.zip" "$BUN_INTERNAL_PATH" "$BUN_INSTALL/bin" <<'PY'
import os, shutil, sys, zipfile

archive, member, dest_dir = sys.argv[1:4]
os.makedirs(dest_dir, exist_ok=True)
with zipfile.ZipFile(archive) as z, z.open(member) as src:
with open(os.path.join(dest_dir, 'bun'), 'wb') as dst:
shutil.copyfileobj(src, dst)
PY
fi
chmod +x "$BUN_INSTALL/bin/bun"
}

Expand Down
Loading