Repository navigation
Check extensions without starting the application - #1
Merged
Merged
Conversation
rustcfml-warm-extensions ran `rustcfml -c 'writeOutput("")'` in the webroot.
Inline code there runs the app's Application.cfc, so every container start
booted the application once before the server: onApplicationStart, then
onRequest with no page, which an onRequest that includes its target page
turns into an error.
The probe is now an empty template in a scratch directory, with the
webroot's extensions/ linked in so the search order is unchanged, and the
cwd still the webroot so the server .cfconfig.json is found as before.
Messages report the webroot's paths. A smoke case checks that the check
does not fire onApplicationStart.
Blute
force-pushed
the
fix/extension-check-no-app-boot
branch
from
October 28, 2026 02:27
71df227 to
fb05bbf
Compare
…th rewrite, read-only fallback - An empty Application.cfc beside the probe ends the engine's upward search, so the app's Application.cfc is not run when the scratch directory is under the webroot (TMPDIR inside it, or a webroot of /tmp). - The webroot is made absolute before it is linked into the scratch directory; a relative one (RUSTCFML_WEBROOT=.) linked to itself and skipped the webroot's extensions, so a broken one passed. - Problems are counted from the engine's unedited output, and the shown paths are rewritten with a literal awk replacement. A | in the webroot broke the sed expression, emptied the output and let a broken extension pass; a & garbled the shown paths. - With no writable temp directory (a read-only container) the check falls back to the previous inline probe in the webroot instead of failing. A smoke case for each; all four fail against the previous version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
rustcfml-warm-extensions(run by the entrypoint at every container start, before the server) ranrustcfml -c 'writeOutput("")'from the webroot. Inline code run there picks up the app'sApplication.cfc, so each start booted the application once before serving:onApplicationStartran, including any database work it does;onRequestran with an empty target page. AnonRequestthat includes its target page then fails, because an empty include resolves to the Application.cfc's own directory (Cannot read '<dir>': Is a directory), and the app'sonErrorhandles it as a 500.Summary
mktemp -dscratch directory instead of inline code in the webroot.Application.cfcbeside the probe stops the engine's upward search. The app's own isn't found even when the scratch directory is inside the webroot (TMPDIRunder it, or a webroot of/tmp).extensions/is symlinked into the scratch directory, because the engine takes its application directory from the template. The search order stays:--extensions/ configdirectory, webrootextensions/, home, beside the binary. The webroot is made absolute first, so a relativeRUSTCFML_WEBROOTlinks correctly..cfconfig.json(and itsextensions.directory) is found exactly as the server finds it.$WEBROOT/extensions/…paths, and that uses a literal awk replacement, so no character in a path can change what's matched.--read-onlycontainer), the check falls back to the previous inline probe and says so on stderr, rather than failing the start.Test plan
make smokepasses, with five new cases:onApplicationStart;TMPDIRinside the webroot;RUSTCFML_WEBROOT=.);|and&in its path, reported with the webroot's path;--read-onlycontainer still passes..rcxinextensions/and a throwingApplication.cfc: loads the extension and reports the/srv/app/extensions/...path, exit 0.🤖 Generated with Claude Code