Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: turbo cache busting for production builds (#1505)

Myles Scolnick3c3a43482391
diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml
index ae73cde82e..e36a4e53be 100644
--- a/.github/workflows/dev-release.yml
+++ b/.github/workflows/dev-release.yml
@@ -105,6 +105,7 @@ jobs:
- name: 📦 Rebuild frontend
working-directory: frontend
env:
+ NODE_ENV: production
VITE_MARIMO_ISLANDS: "true"
VITE_MARIMO_VERSION: ${{ env.MARIMO_VERSION }}
run: |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 64e42636c7..18afa1f90b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -89,6 +89,7 @@ jobs:
- name: 📦 Rebuild frontend
working-directory: frontend
env:
+ NODE_ENV: production
VITE_MARIMO_ISLANDS: "true"
VITE_MARIMO_VERSION: ${{ env.MARIMO_VERSION }}
run: |
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index f82fa0d2b5..44b22cc121 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -59,9 +59,12 @@ jobs:
- name: 📦 Build
run: pnpm turbo build
+ env:
+ NODE_ENV: production
- name: 📦 Build islands frontend
env:
+ NODE_ENV: production
VITE_MARIMO_ISLANDS: "true"
VITE_MARIMO_VERSION: "0.0.0"
run: |
diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml
index d18d314aba..0f5dd5e4c0 100644
--- a/frontend/pnpm-lock.yaml
+++ b/frontend/pnpm-lock.yaml
@@ -7694,6 +7694,7 @@ packages:
/@storybook/[email protected]:
resolution: {integrity: sha512-L8sXFJUHmrlyU2BsWWZGuAjv39Jl1uAqUHdxmN42JY15M4+XCMjGlArdCCjDe1wpTSW6USYISA9axjZojgtvnw==}
+ deprecated: In Storybook 8, this package functionality has been integrated to a new package called @storybook/test, which uses Vitest APIs for an improved experience. When upgrading to Storybook 8 with 'npx storybook@latest upgrade', you will get prompted and will get an automigration for the new package. Please migrate when you can.
dependencies:
'@testing-library/dom': 9.3.4
'@testing-library/user-event': 14.5.2(@testing-library/[email protected])
@@ -12664,6 +12665,7 @@ packages:
resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==}
+ deprecated: Glob versions prior to v9 are no longer supported
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
@@ -12674,6 +12676,7 @@ packages:
resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==}
+ deprecated: Glob versions prior to v9 are no longer supported
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
@@ -13187,6 +13190,7 @@ packages:
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
+ deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
dependencies:
once: 1.4.0
wrappy: 1.0.2
@@ -16926,6 +16930,7 @@ packages:
resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==}
+ deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
dependencies:
glob: 7.2.0
@@ -16933,6 +16938,7 @@ packages:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
+ deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
dependencies:
glob: 7.2.0
diff --git a/frontend/src/components/editor/package-alert.tsx b/frontend/src/components/editor/package-alert.tsx
index dd59931543..7bae0454b1 100644
--- a/frontend/src/components/editor/package-alert.tsx
+++ b/frontend/src/components/editor/package-alert.tsx
@@ -52,7 +52,7 @@ export const PackageAlert: React.FC = (props) => {
if (isMissingPackageAlert(packageAlert)) {
return (
- <div className="flex flex-col gap-4 mb-5 fixed top-5 left-5 w-[400px] z-[200] opacity-95">
+ <div className="flex flex-col gap-4 mb-5 fixed top-5 left-12 w-[400px] z-[200] opacity-95">
<Banner
kind="danger"
className="flex flex-col rounded py-3 px-5 animate-in slide-in-from-left"
@@ -128,7 +128,7 @@ export const PackageAlert: React.FC = (props) => {
}
return (
- <div className="flex flex-col gap-4 mb-5 fixed top-5 left-5 w-[400px] z-[200] opacity-95">
+ <div className="flex flex-col gap-4 mb-5 fixed top-5 left-12 w-[400px] z-[200] opacity-95">
<Banner
kind={status === "failed" ? "danger" : "info"}
className="flex flex-col rounded pt-3 pb-4 px-5"
diff --git a/frontend/turbo.json b/frontend/turbo.json
index 9a2b8c47a8..96d2c00324 100644
--- a/frontend/turbo.json
+++ b/frontend/turbo.json
@@ -3,7 +3,7 @@
"pipeline": {
"build": {
"outputs": ["dist/**"],
- "env": ["VITE_MARIMO_ISLANDS"]
+ "env": ["VITE_MARIMO_ISLANDS", "NODE_ENV"]
},
"typecheck": {},
"test": {},
@@ -13,7 +13,7 @@
},
"build:islands": {
"outputs": ["dist/**"],
- "env": ["VITE_MARIMO_ISLANDS", "VITE_MARIMO_VERSION"]
+ "env": ["VITE_MARIMO_ISLANDS", "VITE_MARIMO_VERSION", "NODE_ENV"]
},
"dev": {
"cache": false,
diff --git a/scripts/buildfrontend.sh b/scripts/buildfrontend.sh
index 489169cab7..e923018731 100755
--- a/scripts/buildfrontend.sh
+++ b/scripts/buildfrontend.sh
@@ -5,6 +5,7 @@
if [ "$NODE_ENV" = "development" ]; then
cmd="pnpm turbo build -- --mode development"
else
+ export NODE_ENV=production
cmd="pnpm turbo build"
fi