chore: use Bun package management and Turbo remote caching (#6978)
* feat: migrate tooling and runtimes to bun * fix: serialize act installs and adapt backup checks * fix: finish bun scripts and rootless act setup * fix: support bun images in runtime benchmarks * fix: keep a single bun toolchain configuration * fix: include docs mascot sources in workshop build * docs: use bun in remaining tool commands * fix: complete bun sqlite development tooling * docs: explain sqlite development adapter * fix: align remaining commands and local ci validation * fix: use renovate regex fallback with bun * fix: finalize bun sqlite connections during cleanup * fix: preserve sqlite foreign key enforcement * fix: align docker build frontends * fix: prepare release versions with bun * Add Bun benchmarks and preserve SQLite connection defaults * Benchmark Bun installs, conflicts and production workloads * Force Bun workspace tools and HTTP/1.1 upstream streaming * Exclude benchmark evidence from Docker contexts * Expose branch benchmarks through CI * Verify hydrated widget data in production benchmarks * Measure image archives and document benchmark protocol * Audit dependency sharing across every workspace * Pin pnpm for nested baseline benchmark scripts * Preserve nested manager pinning on benchmark resume * Include application and runtime image footprints * Fail benchmark gates on candidate command errors * Report complete build overhead and sampled memory bounds * Validate migration comparisons across pinned revisions * Record configurable runtime memory budgets * Retain out-of-memory kills in runtime budget probes * Reject OOM events consistently across runtime metrics * Record complete Bun migration benchmarks * Record memory diagnosis and correct Turbo caching * Use Bun package management while preserving Node runtimes * Keep native build fallbacks and exclude development artifacts * Fix Node ESM metadata and isolate local CI configuration * Measure development performance and isolate act environment * Support isolated environment files in rootless act * Validate the full migration range with act * Preserve native SQLite binding for bundled migrations * Use documented dev defaults and report benchmark scope * Validate dev defaults and isolate restart measurements * Record package-manager and development benchmarks * Keep benchmark measurements and link full command artifacts * Clean up temporary act environment files * Validate Node runtimes in package-manager comparisons * Validate every workspace in manual CI runs * Retain patched nested brace expansion versions * Complete package-manager and Node performance report * Normalize archived benchmark logs * Record final hosted validation * Cache both Next builds with platform isolation * Prime cache with write-only mode * Split Next artifacts below Cloudflare upload limit * Assemble coherent standalone cache outputs * Preserve traced middleware entrypoints * Assemble traced directory links before files * Separate cached dependencies from assembled output * Record signed Turbo cache benchmarks * Remove archived benchmark captures Full benchmark evidence is preserved at 8f7d3bcd14109bfb13fa664d31710b88d820ad66. * Remove migration benchmark harness * fix: correct migration launch and local Act prerequisites * Consolidate Turbo caches and production artifacts * Exclude generated files from Docker cache inputs * fix: address Bun migration review findings * fix: check restored compiler bundle manifests
This commit is contained in:
1 parent
dc5f382875
commit
229bd4b3ed
109 files changed
+8507
-28875
No files matched your search
@@ -48,7 +48,8 @@ try {
|
||||
collect(join(nextRoot, "server/chunks/ssr"), (name) =>
|
||||
/^packages_widgets_src_custom-api_component.*\.js$/u.test(name),
|
||||
),
|
||||
collect(join(nextRoot, "standalone"), (name) => name === "react-loadable-manifest.json"),
|
||||
// Canonical route manifests survive compiler-cache restoration; standalone is assembled separately.
|
||||
collect(join(nextRoot, "server"), (name) => name === "react-loadable-manifest.json"),
|
||||
]);
|
||||
} catch {
|
||||
throw new Error("Next.js build output is missing. Run the Next.js production build before the bundle check.");
|
||||
|
||||
@@ -25,10 +25,7 @@ describe("Custom Widget bundle budget", () => {
|
||||
test("finds the dynamic module from its runtime chunk when server metadata is absent", async () => {
|
||||
const nextRoot = await mkdtemp(join(tmpdir(), "homarr-custom-widget-bundle-"));
|
||||
const serverChunk = join(nextRoot, "server/chunks/ssr/packages_widgets_src_custom-api_component_test.js");
|
||||
const manifestPath = join(
|
||||
nextRoot,
|
||||
"standalone/apps/nextjs/.next/server/app/[locale]/(home)/(board)/page/react-loadable-manifest.json",
|
||||
);
|
||||
const manifestPath = join(nextRoot, "server/app/[locale]/(home)/(board)/page/react-loadable-manifest.json");
|
||||
const runtimeChunk = join(nextRoot, "static/chunks/custom-widget-runtime.js");
|
||||
try {
|
||||
await Promise.all([
|
||||
|
||||
+20
-5
@@ -30,11 +30,11 @@ if [[ -z "${DOCKER_HOST:-}" ]]; then
|
||||
fi
|
||||
|
||||
head_sha=$(git rev-parse HEAD)
|
||||
base_sha=$(git rev-parse HEAD~1 2>/dev/null || echo "$head_sha")
|
||||
head_ref=$(git branch --show-current)
|
||||
head_ref=${head_ref:-act-local}
|
||||
event_file=$(mktemp "${TMPDIR:-/tmp}/homarr-act-event.XXXXXX")
|
||||
trap 'rm -f "$event_file"' EXIT
|
||||
environment_file=$(mktemp "${TMPDIR:-/tmp}/homarr-act-env.XXXXXX")
|
||||
trap 'rm -f "$event_file" "$environment_file"' EXIT
|
||||
|
||||
json_escape() { printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g; s/\t/\\t/g'; }
|
||||
|
||||
@@ -46,7 +46,7 @@ if [[ "$mode" == "cleanup" ]]; then
|
||||
"repository": { "full_name": "homarr-labs/homarr" }
|
||||
}
|
||||
EOF
|
||||
elif [[ "$mode" == "docker" ]]; then
|
||||
elif [[ "$mode" == "docker" || "$mode" == "all" ]]; then
|
||||
event_name="workflow_dispatch"
|
||||
cat >"$event_file" <<EOF
|
||||
{
|
||||
@@ -55,6 +55,7 @@ elif [[ "$mode" == "docker" ]]; then
|
||||
}
|
||||
EOF
|
||||
else
|
||||
base_sha=$(git merge-base origin/dev HEAD)
|
||||
event_name="pull_request"
|
||||
safe_ref=$(json_escape "$head_ref")
|
||||
cat >"$event_file" <<EOF
|
||||
@@ -83,15 +84,29 @@ args=(
|
||||
--eventpath "$event_file"
|
||||
--platform "ubuntu-latest=$runner_image"
|
||||
--container-architecture linux/amd64
|
||||
--env-file /dev/null
|
||||
--bind
|
||||
--env "DB_DRIVER=better-sqlite3"
|
||||
--env "TURBO_CACHE_DIR=$PWD/.turbo/cache"
|
||||
# Jobs share the dependency volume; installs must not race.
|
||||
--concurrent-jobs 1
|
||||
)
|
||||
|
||||
# Ryuk mounts the host socket; rootless runners also need a reachable host address.
|
||||
if [[ "$DOCKER_HOST" == unix://* ]]; then
|
||||
args+=(--env "TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=${DOCKER_HOST#unix://}")
|
||||
fi
|
||||
if [[ -n "${ACT_TESTCONTAINERS_HOST:-}" ]]; then
|
||||
args+=(--env "TESTCONTAINERS_HOST_OVERRIDE=$ACT_TESTCONTAINERS_HOST")
|
||||
fi
|
||||
|
||||
if [[ -n "$job" ]]; then
|
||||
args+=(--job "$job")
|
||||
fi
|
||||
|
||||
git_common_dir=$(cd "$(git rev-parse --git-common-dir)" && pwd)
|
||||
container_options="--volume homarr-act-node-modules:$PWD/node_modules --volume homarr-act-pnpm-store:$PWD/.pnpm-store"
|
||||
# Bun loads .env automatically; reproduce GitHub's checkout without local settings.
|
||||
container_options="--volume $environment_file:$PWD/.env --volume homarr-act-bun-1-4-2-node-24-18-0-modules:$PWD/node_modules --volume homarr-act-bun-cache:/root/.bun/install/cache"
|
||||
case "$git_common_dir" in
|
||||
"$PWD" | "$PWD"/*) ;;
|
||||
*) container_options="$container_options --volume $git_common_dir:$git_common_dir:ro" ;;
|
||||
@@ -102,4 +117,4 @@ if [[ -n "${ACT_SECRET_FILE:-}" ]]; then
|
||||
args+=(--secret-file "$ACT_SECRET_FILE")
|
||||
fi
|
||||
|
||||
exec act "${args[@]}"
|
||||
act "${args[@]}"
|
||||
@@ -0,0 +1,14 @@
|
||||
import { execFile } from "node:child_process";
|
||||
import { readFile, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { promisify } from "node:util";
|
||||
|
||||
// Homarr publishes images and archives; only the repository version needs updating.
|
||||
export async function prepare(_pluginConfig, { cwd, env, nextRelease, logger }) {
|
||||
const packagePath = join(cwd, "package.json");
|
||||
const manifest = JSON.parse(await readFile(packagePath, "utf8"));
|
||||
manifest.version = nextRelease.version;
|
||||
await writeFile(packagePath, `${JSON.stringify(manifest, null, 2)}\n`);
|
||||
await promisify(execFile)(process.execPath, ["install", "--lockfile-only", "--ignore-scripts"], { cwd, env });
|
||||
logger.log("Updated package.json and bun.lock to %s", nextRelease.version);
|
||||
}
|
||||
Reference in new issue
Block a user