denoland / fresh

The next-gen web framework.
https://fresh.deno.dev
MIT License
12.05k stars 607 forks source link

Deno Fresh is unusable in production with Signal #2564

Closed saeho closed 4 days ago

saeho commented 4 days ago

https://github.com/denoland/fresh/assets/9645145/242e28db-949c-4f7e-9fc8-fffa91d66ad8

Repo: https://github.com/saeho/fresh-signal-bug

Deno Fresh cannot be used in production unless the app completely doesn't use Signals or unless this bug is fixed.

In this reproduceable demo (video + repo), you will see the minimal codebase working when I build & run main.ts to serve the app at port 8000. Then if I re-build and re-serve the app main.ts at port 8000, there is no crash or service interruptions, it just works, and existing users who are on the app before the re-deploy are uninterrupted.

However, the moment I add a single line of code "useSignal()" into a single component, and then re-deploy main.ts at port 8000, every single person who was on that app before the newer version of the app cannot use the app any more.

Unless this issue can be resolved somehow, there's no way I or anyone can use Deno Fresh in production. We need to build and ship new features every day, and if we're going to break every user's experience every single time we upload a new version, that's... that's just not okay.

I truly believe this is a high alert issue for Fresh development.

NOTE: PM2 was not used to deploy Fresh app.

marvinhagemeister commented 4 days ago

This looks like the same reproduction as in #2562 and that it was narrowed down to not be pm2 related. Let's keep the discussion there. I'd rather spend time investigating issues rather than spending having to jump between multiple issues for the same thing and answering in multiple threads.