feat: remove nextjs production runtime (#1389)

This commit is contained in:
Carlos Florêncio
2026-06-18 18:36:48 +01:00
committed by GitHub
parent 2781556ead
commit aee1846cd5
368 changed files with 10228 additions and 3306 deletions
+7 -15
View File
@@ -84,16 +84,15 @@ jobs:
path: apps/backend/bin/
retention-days: 1
# Tar the .next directory to preserve pnpm symlinks in the standalone build.
# upload-artifact dereferences symlinks which breaks the Node.js module resolution.
# Tar the Vite dist directory so shards can reuse the same static web build.
- name: Package web build
run: tar -cf apps/web/next-build.tar -C apps/web .next
run: tar -cf apps/web/web-dist.tar -C apps/web dist
- name: Upload web build
uses: actions/upload-artifact@v5
with:
name: e2e-web-build
path: apps/web/next-build.tar
path: apps/web/web-dist.tar
retention-days: 1
e2e:
@@ -122,15 +121,8 @@ jobs:
defaults:
run:
shell: bash
# Node 18+'s `dns.lookup` defaults to `verbatim: true`, returning the OS
# resolver order. Inside this container `localhost` resolves to ::1 first,
# so `net.Server.listen({ host: "localhost" })` (used by Next.js standalone
# via $HOSTNAME) binds IPv6-only — and undici's `fetch("http://localhost…")`
# in the test runner only tries the first resolved address (IPv4), so the
# frontend health check times out and every spec fails. Forcing
# IPv4-first ordering aligns both the bind and the fetch and matches the
# effective default on the github-hosted ubuntu runner this workflow
# previously ran on.
# Keep localhost resolution deterministic for Node fetches used by the
# Playwright fixtures and backend readiness polling.
env:
NODE_OPTIONS: --dns-result-order=ipv4first
strategy:
@@ -173,7 +165,7 @@ jobs:
- name: Extract web build
working-directory: apps/web
run: tar -xf next-build.tar && rm next-build.tar
run: tar -xf web-dist.tar && rm web-dist.tar
# Pinned to chromium + mobile-chrome so the dedicated `e2e-containers`
# job below owns the real-Docker project (which covers both the Docker
@@ -334,7 +326,7 @@ jobs:
- name: Extract web build
working-directory: apps/web
run: tar -xf next-build.tar && rm next-build.tar
run: tar -xf web-dist.tar && rm web-dist.tar
- name: Run container-backed E2E tests shard ${{ matrix.shard }}/6 (Docker executor + SSH executor)
working-directory: apps/web
+8 -9
View File
@@ -5,7 +5,7 @@ name: release
#
# Flow (one click → everything below):
# 1. prepare — bump version, regen CHANGELOG, open + merge release PR, push tag vX.Y.Z
# 2. build-web — build Next.js standalone bundle (shared across arches)
# 2. build-web — build Vite SPA bundle (shared across arches)
# 3. build-cli — build + esbuild-bundle CLI (shared across arches)
# 4. build-bundles — assemble bin/ + web/ + cli/ tarballs for 5 platforms
# 5. docker-{amd64,arm64} — native per-arch image builds (no QEMU), consuming
@@ -251,7 +251,7 @@ jobs:
echo "DRY RUN: CHANGELOG.md regenerated (in-runner only)."
build-web:
name: Build web standalone
name: Build web SPA
needs: prepare
if: ${{ !inputs.dry_run }}
runs-on: ubuntu-latest
@@ -269,16 +269,16 @@ jobs:
cache-dependency-path: apps/pnpm-lock.yaml
- name: Install dependencies
run: pnpm -C apps install --frozen-lockfile
- name: Build web (standalone)
- name: Build web (Vite)
env:
KANDEV_VERSION: ${{ needs.prepare.outputs.tag }}
VITE_KANDEV_API_PORT: ""
VITE_KANDEV_DEBUG: ""
run: pnpm -C apps --filter @kandev/web build
- name: Package web bundle
run: bash scripts/release/package-web.sh
- uses: actions/upload-artifact@v5
with:
name: web-bundle
path: dist/web
path: apps/web/dist
include-hidden-files: true
build-cli:
@@ -351,7 +351,7 @@ jobs:
- uses: actions/download-artifact@v5
with:
name: web-bundle
path: dist/web
path: apps/backend/internal/webapp/embedded/generated
- uses: actions/download-artifact@v5
with:
name: cli-bundle
@@ -377,6 +377,7 @@ jobs:
CC: ${{ matrix.cc || '' }}
KANDEV_VERSION: ${{ needs.prepare.outputs.tag }}
run: |
test -f apps/backend/internal/webapp/embedded/generated/index.html
cd apps/backend
mkdir -p bin
EXT=${{ matrix.goos == 'windows' && '.exe' || '' }}
@@ -408,8 +409,6 @@ jobs:
cp apps/backend/bin/kandev${EXT} dist/kandev/bin/
cp apps/backend/bin/agentctl${EXT} dist/kandev/bin/
cp apps/backend/bin/agentctl-linux-amd64 dist/kandev/bin/
mkdir -p dist/kandev/web
cp -R dist/web/. dist/kandev/web/
# cli/ was already placed by the build-cli job (downloaded above).
# actions/upload-artifact + download-artifact zip-roundtrip strips the
# executable bit, so re-apply it. The Homebrew formula's wrapper at