From 856fe0ffb69442fac37a5f709d23c0827debfd62 Mon Sep 17 00:00:00 2001 From: Waleed Date: Mon, 3 Aug 2026 19:23:52 -0700 Subject: [PATCH] fix(docker): upgrade bun to 1.3.14 (#6236) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(docker): upgrade bun to 1.3.14 to unbreak the Next 16.3.0 server Bun 1.3.13 cannot load Next 16.3.0's compiled server runtime. The app container runs the Next server under Bun (`oven/bun:1.3.13-slim`, `bun apps/sim/bootstrap.js`), so every app-page render threw and `/api/health` returned 500: ⨯ Error: Failed to load external module next/dist/compiled/next-server/app-page-turbo.runtime.prod.js: TypeError: Expected CommonJS module to have a function wrapper. If you weren't messing around with Bun's internals, this is a bug in Bun Isolated to Bun, not Next, by loading that exact module in the real images: Next 16.2.12 + Bun 1.3.13 -> loads (why staging was fine before) Next 16.3.0 + Bun 1.3.13 -> CJS wrapper error Next 16.3.0 + Bun 1.3.14 -> loads Bun 1.3.14 is the current stable and already fixes it, so this bumps every pin rather than reverting the framework upgrade, which would only defer the same latent Bun bug to the next attempt. Why no gate caught it: local dev machines and this bump's own verification run Bun 1.3.14, while the container and CI pinned 1.3.13 — and CI only *builds* the image, it never boots one and probes `/api/health`. A container smoke test in CI would have caught this before merge; that is worth adding separately. * fix(docker): align the remaining bun pins with 1.3.14 Two pins were missed in the first pass because the search was scoped to docker/, package.json and .github/workflows/: - .devcontainer/Dockerfile still built on oven/bun:1.3.13-alpine - PI_BUN_VERSION in apps/sim/scripts/pi-sandbox-packages.ts was still 1.3.13, despite being documented as mirroring the root packageManager field, so Pi sandbox images would have kept installing the Bun release that cannot load the Next 16.3.0 server runtime. Fixed surgically rather than with a repo-wide replace: "1.3.13" also appears inside SVG path data in apps/sim/components/icons.tsx and apps/docs/components/icons.tsx, which a blind sed would have corrupted. --- .devcontainer/Dockerfile | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/desktop-e2e.yml | 4 ++-- .github/workflows/desktop-release.yml | 2 +- .github/workflows/docs-embeddings.yml | 2 +- .github/workflows/helm.yml | 2 +- .github/workflows/migrations.yml | 2 +- .github/workflows/publish-cli.yml | 2 +- .github/workflows/publish-ts-sdk.yml | 2 +- .github/workflows/test-build.yml | 4 ++-- apps/sim/scripts/pi-sandbox-packages.ts | 2 +- docker/app.Dockerfile | 2 +- docker/db.Dockerfile | 2 +- docker/realtime.Dockerfile | 2 +- package.json | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 201719f0f0..8d14cd9850 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM oven/bun:1.3.13-alpine +FROM oven/bun:1.3.14-alpine # Install necessary packages for development RUN apk add --no-cache \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42faa142a7..227fda6e1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -226,7 +226,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Cache Bun dependencies uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 @@ -652,7 +652,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Install dependencies run: bun install --frozen-lockfile --ignore-scripts diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml index 5a305244d1..4feb7b9131 100644 --- a/.github/workflows/desktop-e2e.yml +++ b/.github/workflows/desktop-e2e.yml @@ -30,7 +30,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Install dependencies run: bun install --frozen-lockfile @@ -66,7 +66,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@v4 diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml index f0f512b526..d8a9e650d8 100644 --- a/.github/workflows/desktop-release.yml +++ b/.github/workflows/desktop-release.yml @@ -57,7 +57,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@v4 diff --git a/.github/workflows/docs-embeddings.yml b/.github/workflows/docs-embeddings.yml index a8d882c4a5..969f47f4b9 100644 --- a/.github/workflows/docs-embeddings.yml +++ b/.github/workflows/docs-embeddings.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index ea9ac3f522..05e2ee8a12 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -35,7 +35,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 # Docker Compose and Kubernetes must run the same background jobs on the # same schedules; this fails the build if the two drift apart. The script diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml index c91b9c300c..c23a39a925 100644 --- a/.github/workflows/migrations.yml +++ b/.github/workflows/migrations.yml @@ -34,7 +34,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Cache Bun dependencies uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml index 0bc5fadd5c..9513018c12 100644 --- a/.github/workflows/publish-cli.yml +++ b/.github/workflows/publish-cli.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node.js for npm publishing uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 diff --git a/.github/workflows/publish-ts-sdk.yml b/.github/workflows/publish-ts-sdk.yml index 65b5e02411..c643c6ea5d 100644 --- a/.github/workflows/publish-ts-sdk.yml +++ b/.github/workflows/publish-ts-sdk.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node.js for npm publishing uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index c072d19f14..4b5a0fb140 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -20,7 +20,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 @@ -251,7 +251,7 @@ jobs: - name: Setup Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: - bun-version: 1.3.13 + bun-version: 1.3.14 - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 diff --git a/apps/sim/scripts/pi-sandbox-packages.ts b/apps/sim/scripts/pi-sandbox-packages.ts index 59d7c29632..a6646201cc 100644 --- a/apps/sim/scripts/pi-sandbox-packages.ts +++ b/apps/sim/scripts/pi-sandbox-packages.ts @@ -14,7 +14,7 @@ */ /** Bun version mirrored from the root packageManager field. */ -export const PI_BUN_VERSION = '1.3.13' +export const PI_BUN_VERSION = '1.3.14' /** Exact global package versions mirrored from package.json and bun.lock. */ export const PI_GLOBAL_NPM_PACKAGES = [ diff --git a/docker/app.Dockerfile b/docker/app.Dockerfile index c580bcd02e..484086774f 100644 --- a/docker/app.Dockerfile +++ b/docker/app.Dockerfile @@ -1,7 +1,7 @@ # ======================================== # Base Stage: Debian-based Bun with Node.js 24 # ======================================== -FROM oven/bun:1.3.13-slim AS base +FROM oven/bun:1.3.14-slim AS base # Install Node.js 24 (Active LTS) and common dependencies once in base stage. # Node runs only the isolated-vm sandbox worker (the app itself runs under Bun); diff --git a/docker/db.Dockerfile b/docker/db.Dockerfile index 728083a3ae..5ca6cb831e 100644 --- a/docker/db.Dockerfile +++ b/docker/db.Dockerfile @@ -1,7 +1,7 @@ # ======================================== # Base Stage: Alpine Linux with Bun # ======================================== -FROM oven/bun:1.3.13-alpine AS base +FROM oven/bun:1.3.14-alpine AS base # ======================================== # Dependencies Stage: Install Dependencies diff --git a/docker/realtime.Dockerfile b/docker/realtime.Dockerfile index d403c90646..c87f14b8a4 100644 --- a/docker/realtime.Dockerfile +++ b/docker/realtime.Dockerfile @@ -1,7 +1,7 @@ # ======================================== # Base Stage: Alpine Linux with Bun # ======================================== -FROM oven/bun:1.3.13-alpine AS base +FROM oven/bun:1.3.14-alpine AS base RUN apk add --no-cache libc6-compat curl diff --git a/package.json b/package.json index 66fb8fd840..888d925fd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simstudio", - "packageManager": "bun@1.3.13", + "packageManager": "bun@1.3.14", "version": "0.0.0", "private": true, "license": "Apache-2.0",