[DevServer] Add global lockfile for server discovery#92033
[DevServer] Add global lockfile for server discovery#92033
Conversation
Failing test suitesCommit: f85e550 | About building and testing Next.js
Expand output● Static Image Component Tests › production mode › Should allow an image with a static src to omit height and width ● Static Image Component Tests › production mode › Should use immutable cache-control header for static import ● Static Image Component Tests › production mode › Should use immutable cache-control header even when unoptimized ● Static Image Component Tests › production mode › should have containing followed by for priority image ● Static Image Component Tests › production mode › Should automatically provide an image height and width ● Static Image Component Tests › production mode › should use width and height prop to override import ● Static Image Component Tests › production mode › should use height prop to adjust both width and height ● Static Image Component Tests › production mode › should use width prop to adjust both width and height ● Static Image Component Tests › production mode › should add a data URL placeholder to an image ● Static Image Component Tests › production mode › should add a blur placeholder a statically imported jpg ● Static Image Component Tests › production mode › should add a blur placeholder a statically imported png ● Static Image Component Tests › production mode › should add a blur placeholder a statically imported png with fill ● Static Image Component Tests › production mode › should add placeholder with blurDataURL and fill ● Static Image Component Tests › production mode › should add placeholder even when blurDataURL aspect ratio does not match width/height ratio ● Static Image Component Tests › production mode › should load direct imported image
Expand output● app dir - metadata static routes cache › should generate different content after replace the static metadata file |
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
There's currently no way for external tooling to discover all running
next devservers across different projects. Each server only acquires a per-project lockfile at<distDir>/lock.This adds a global lockfile at
~/.next/dev/<port>/lockcontainingDevServerInfoJSON (pid, port, hostname, appUrl, startedAt). The lock is acquired viaLockfile.tryAcquirewithunlockOnExit: true, so the OS releases theflockautomatically on process exit includingkill -9. Cleanup on graceful shutdown is handled via the existingonDevServerCleanupcallback.External tools can discover running servers by scanning
~/.next/dev/*/lockand attemptingflockon each — a held lock means the server is alive, and the file contents provide connection details.