Repository navigation
Start frps with node's spawn so the connect-next gate builds and runs again - #6926
Merged
Merged
Conversation
… again #6194 switched the gate's frps launch to @bb/process-utils. The gate's Dockerfile does not copy that package, so the image no longer builds, and the package's cross-spawn uses require(), which the gate's ESM bundle cannot load, so a local build crashed at startup. The gate runs in a Linux container with a fixed FRPS path and needs none of the host toolchain, so it uses node's spawn again. The gate process test now runs a bundle built the way the Dockerfile builds it (same copied sources, npm packages and esbuild flags) instead of the TypeScript source, so these breakages fail CI and the deploy workflow's tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
#6194 switched the connect-next gate's
frpslaunch (apps/connect-next/src/frps.ts) fromnode:child_processtospawnHostProcessfrom@bb/process-utils. That broke the gate in two ways:Could not resolve "@bb/process-utils". The next run of Deploy Connect Next would fail at the build step. The last deploy (Oct 26,3fcb678bf9) predates One host toolchain for executable discovery, child PATH, and proxy/CA defaults #6194, so production is unaffected.@bb/process-utilsbrings incross-spawn, which callsrequire("path"). The gate's ESM bundle can't do that, sopnpm --filter @bb/connect-next buildproduces a gate that crashes at startup withDynamic require of "path" is not supported. This also breaksapps/connect-next/scripts/e2e-local.sh.CI missed both because the gate's process test ran the TypeScript source through tsx, which resolves workspace packages and supports
require.What changed
frps.tsstartsfrpswithnode:child_processspawnagain, and@bb/process-utilsis dropped from the gate's dependencies. The gate runs in a Linux container with a fixedFRPSpath, so it needs none of the host toolchain's PATH, Windows or proxy handling. Lint allows asyncspawnin apps.test/dockerfile-build.tsbuilds the gate the way the Dockerfile's build stage does. It reads the stage'sCOPYlines,npm installpackages andesbuildflags from the Dockerfile, copies only those sources into an empty temp dir, and builds with noNODE_PATH. It throws on any esbuild flag it doesn't recognise, so it can't silently drift from the Dockerfile.test/main.e2e.test.ts(the gate process test: realfrps, a tunnel, SIGTERM shutdown) now runs that bundle instead of the source. Deploy Connect Next runs this test before deploying.How you verified
Could not resolve "@bb/process-utils". After it, it passes.docker build -f apps/connect-next/Dockerfile .fails on main and succeeds on this branch.docker runof the image gets past module load to the gate's own config check (ACCOUNT_API_URL is not set).pnpm --filter @bb/connect-next buildgate now starts the same way.pnpm exec turbo run typecheck lint test --filter=@bb/connect-next: 94/94 tests pass. One run hit a timing failure inregions.e2e.test.tsunder high machine load (load average 65); it passed 6/6 reruns, and it startsfrpsthrough the same plainspawnit used before One host toolchain for executable discovery, child PATH, and proxy/CA defaults #6194.pnpm install --frozen-lockfilepasses; the lockfile change is only the removed@bb/process-utilslink.