reflex-dev / reflex

🕸️ Web apps in pure Python 🐍
https://reflex.dev
Apache License 2.0
20.49k stars 1.18k forks source link

State methods persistent after redeploying #4439

Closed dominikbenk closed 5 days ago

dominikbenk commented 5 days ago

Describe the bug After the initial reflex deploy, any changes made to rx.State methods are not applied during subsequent redeployments. Everything works fine on the local host, and I am unable to identify the cause of this issue.

I have also tried adding an on_load method to the State, but it does not have any effect either, as it is likely still being cached.

class State(rx.State):
...
def on_load(self):
    self.reset()

Additionally, redeployments seem to preserve environment variables, although this behavior might be intentional (they are not on the reflex deployments list).

Is there a way to reset the State after each redeployment? Any help would be greatly appreciated. Thank you in advance!

Expected behavior rx.State resets after deploy

Specifics:

EDIT: I've also noticed that backend_url is not reachable, maybe this is the issue.

linear[bot] commented 5 days ago

ENG-4145 State methods persistent after redeploying

dominikbenk commented 5 days ago

Fly.ai servers were down