Configuring Remix server to fallback to previous build on manifest failure
0 reputation · 04 Aug 2021, 10:49 UTC
The goal is to allow a Remix @remix-run/node server to automatically serve the last known good build when a newly deployed build fails to produce a valid remix-manifest.json. Currently the server starts with whatever manifest is present; if the manifest is missing or malformed it throws an error and the application stops responding unless the process is restarted with a good build. Some hosting platforms provide atomic rollback by keeping immutable builds, but this behavior is not guaranteed across all deployment targets.
Constraints include the absence of built‑in health‑check or auto‑rollback logic in Remix, the risk of serving mixed assets if a partially written build is used, and the reliance on external tooling to preserve old build folders. It is unclear whether a configurable fallbackToPreviousBuild flag should be added, what manifest validation steps are required before triggering a fallback, and how the server should log or report the fallback event to operators.
- Should the Remix server expose a fallbackToPreviousBuild option that can be toggled via environment variable or configuration?
- What minimal manifest validation (e.g., JSON parse and version check) should precede a fallback decision?
- How should the server log the fallback occurrence and notify operators without exposing internal details?