Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wizard restarts on every commit on a staging server #2637

Closed
pabloarosado opened this issue May 10, 2024 · 5 comments
Closed

Wizard restarts on every commit on a staging server #2637

pabloarosado opened this issue May 10, 2024 · 5 comments
Labels
priority 3 - nice to have wontfix This will not be worked on

Comments

@pabloarosado
Copy link
Contributor

Streamlit currently restarts every time something is committed to a staging server. But, if you are working on the Wizard (e.g. upgrading indicators or reviewing charts), you may lose work. Would it be possible to avoid the restart?

@Marigold
Copy link
Collaborator

I looked into it and here are a couple of observations:

  1. Sometimes you don't necessarily lose your work. When I was testing this locally on chart-sync, I edited one field, stopped the app, then the field grayed out, then started the app and the field was active again. So restarting doesn't necessarily removes all values (I haven't tried other examples though)
  2. We could just stop restarting the app and hope that live reload will work. I don't know if this will work in all cases, but it could be worth a try?
  3. Ideally, all fields would be persistent in your browser or in the app, but that might be just too much work.

@lucasrodes you're the expert, any ideas? Has this ever happened to you?

@Marigold
Copy link
Collaborator

We can enable live reload on staging servers and do hard restart on master (where there's a likely code change).

@lucasrodes
Copy link
Member

hi @Marigold,
Yes, this has happened to me sometimes.

While editing a form on streamlit, fields are not saved in any python variable to the best of my knowledge. So if we wanted them to persist if the streamlit app is re-started, we'd need to re-think some bits of code.

We can enable live reload on staging servers and do hard restart on master (where there's a likely code change).

I am not sure I follow on this one. What's the difference between 'live reload' and 'hard restart'?

@Marigold
Copy link
Collaborator

I am not sure I follow on this one. What's the difference between 'live reload' and 'hard restart'?

As far as I know, streamlit uses "live reload" by default (if you make any code change, it'll reload the app). By "hard restart" I mean restarting the app (which is done via pm2 process manager).

Copy link

stale bot commented Jul 18, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 18, 2024
@stale stale bot closed this as completed Jul 25, 2024
@larsyencken larsyencken closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority 3 - nice to have wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

4 participants