From 797f46c680370407291e61a2adf01cbaae1ffd79 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 16 Jan 2025 18:26:03 +0100 Subject: [PATCH] chore: update bun to 1.43.0 and loaded from tsx to ts --- .github/workflows/backend-test.yml | 5 +++-- Dockerfile | 2 +- backend/windmill-worker/loader.bun.js | 4 ++-- backend/windmill-worker/loader_builder.bun.js | 1 + backend/windmill-worker/src/bun_executor.rs | 2 ++ docker/DockerfileSlim | 2 +- docker/DockerfileSlimEe | 2 +- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/backend-test.yml b/.github/workflows/backend-test.yml index 8cb445496d..4cbda91248 100644 --- a/.github/workflows/backend-test.yml +++ b/.github/workflows/backend-test.yml @@ -47,7 +47,7 @@ jobs: python-version: 3.11 - uses: oven-sh/setup-bun@v2 with: - bun-version: 1.1.40 + bun-version: 1.1.43 - uses: astral-sh/setup-uv@v4 with: version: "0.4.18" @@ -67,4 +67,5 @@ jobs: DISABLE_EMBEDDING=true RUST_LOG=info PYTHON_PATH=$(which python) DENO_PATH=$(which deno) BUN_PATH=$(which bun) GO_PATH=$(which go) UV_PATH=$(which uv) cargo test --features - enterprise,deno_core,license,python,rust,scoped_cache --all -- --nocapture + enterprise,deno_core,license,python,rust,scoped_cache --all -- + --nocapture diff --git a/Dockerfile b/Dockerfile index 20a582474e..f6ce5525d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -177,7 +177,7 @@ COPY --from=builder /windmill/target/release/windmill ${APP}/windmill COPY --from=denoland/deno:2.1.2 --chmod=755 /usr/bin/deno /usr/bin/deno -COPY --from=oven/bun:1.1.40 /usr/local/bin/bun /usr/bin/bun +COPY --from=oven/bun:1.1.43 /usr/local/bin/bun /usr/bin/bun COPY --from=php:8.3.7-cli /usr/local/bin/php /usr/bin/php COPY --from=composer:2.7.6 /usr/bin/composer /usr/bin/composer diff --git a/backend/windmill-worker/loader.bun.js b/backend/windmill-worker/loader.bun.js index ce75cbfc15..5455e8b099 100644 --- a/backend/windmill-worker/loader.bun.js +++ b/backend/windmill-worker/loader.bun.js @@ -23,7 +23,7 @@ const p = { const filterLoad = new RegExp(`^${cdir}\/main\\.ts$`); const transpiler = new Bun.Transpiler({ - loader: "tsx", + loader: "ts", }); function replaceRelativeImports(code) { @@ -62,7 +62,7 @@ const p = { const contents = await req.text(); return { contents: replaceRelativeImports(contents).contents, - loader: "tsx", + loader: "ts", }; }); diff --git a/backend/windmill-worker/loader_builder.bun.js b/backend/windmill-worker/loader_builder.bun.js index 1ef09f1a04..dec0e41fed 100644 --- a/backend/windmill-worker/loader_builder.bun.js +++ b/backend/windmill-worker/loader_builder.bun.js @@ -14,6 +14,7 @@ import { semver } from "bun"; if (!bo.success) { bo.logs.forEach((l) => console.log(l)); + console.log("Failed to build bundle"); process.exit(1); } else { let content = await fs.readFile("./out/main.js", { encoding: "utf8" }); diff --git a/backend/windmill-worker/src/bun_executor.rs b/backend/windmill-worker/src/bun_executor.rs index d0fd654d73..5f62720b44 100644 --- a/backend/windmill-worker/src/bun_executor.rs +++ b/backend/windmill-worker/src/bun_executor.rs @@ -407,6 +407,7 @@ const bo = await Bun.build({{ if (!bo.success) {{ bo.logs.forEach((l) => console.log(l)); + console.log("Failed to build node bundle"); process.exit(1); }} "#, @@ -454,6 +455,7 @@ const bo = await Bun.build({{ if (!bo.success) {{ bo.logs.forEach((l) => console.log(l)); + console.log("Failed to build node bundle"); process.exit(1); }} "#, diff --git a/docker/DockerfileSlim b/docker/DockerfileSlim index 21e8161c95..d960fb6d92 100644 --- a/docker/DockerfileSlim +++ b/docker/DockerfileSlim @@ -20,7 +20,7 @@ RUN /usr/local/bin/python3 -m pip install pip-tools # Install UV RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.5.15/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv -COPY --from=oven/bun:1.1.40 /usr/local/bin/bun /usr/bin/bun +COPY --from=oven/bun:1.1.43 /usr/local/bin/bun /usr/bin/bun # add the docker client to call docker from a worker if enabled COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/ diff --git a/docker/DockerfileSlimEe b/docker/DockerfileSlimEe index 29c627b332..0adcd73552 100644 --- a/docker/DockerfileSlimEe +++ b/docker/DockerfileSlimEe @@ -19,7 +19,7 @@ RUN /usr/local/bin/python3 -m pip install pip-tools # Install UV RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.5.15/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv -COPY --from=oven/bun:1.1.40 /usr/local/bin/bun /usr/bin/bun +COPY --from=oven/bun:1.1.43 /usr/local/bin/bun /usr/bin/bun # add the docker client to call docker from a worker if enabled COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/