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

pserve reloader revamp #2805

Merged
merged 4 commits into from
Nov 20, 2016
Merged

Conversation

mmerickel
Copy link
Member

@mmerickel mmerickel commented Nov 4, 2016

This PR replaces the --reload support in pserve with the new hupper package [1].

Features

Incompatibilities

I want to avoid merging this until windows support is improved in hupper but we're close enough to get some review.

[1] http://docs.pylonsproject.org/projects/hupper/en/latest/
[2] https://pypi.org/project/watchdog/

@mmerickel
Copy link
Member Author

This is ready for review.

@stevepiercy
Copy link
Member

Is there a need to update the Pyramid docs?

If so, is there a separate issue open?

@mmerickel
Copy link
Member Author

There's no change to the docs unless we want to add some mentions to the pserve docs like... To make this work better you should install watchdog into your development environment. See http://docs.pylonsproject.org/projects/hupper/en/latest/#watchdog-support for more info on what I mean.

@stevepiercy
Copy link
Member

I made a new issue #2806 for making mention.

mmerickel added a commit to mmerickel/pyramid that referenced this pull request Nov 19, 2016
@mmerickel
Copy link
Member Author

New commits should handle #2806.

@digitalresistor digitalresistor self-assigned this Nov 20, 2016
@digitalresistor
Copy link
Member

Will review this in a little bit.

mmerickel added a commit to mmerickel/pyramid that referenced this pull request Nov 20, 2016
mmerickel added a commit to mmerickel/pyramid that referenced this pull request Nov 20, 2016
@mmerickel
Copy link
Member Author

I just rebased this branch on top of the latest master, should be mergeable again.

@digitalresistor
Copy link
Member

Would it make sense to rebase and squash the first three commits down to "use hupper"?

@mmerickel
Copy link
Member Author

Sure if you want me to. In general Pyramid hasn't been very picky about commit history.

@digitalresistor
Copy link
Member

I tend to not want to have WIP commits in the final history... but if it doesn't matter, I don't care. I've been using this branch + hupper + watchdog for the last 3 hours for a project I am working on. Haven't seen it crash yet!!!

Also, it seems to be much faster at reloading than the old version. With watchdog it is fast enough that doing a pip install -U webob==1.7.0rc1 will cause it to restart three times as pip installs the newly updated files ;-)

Copy link
Member

@digitalresistor digitalresistor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than possibly squashing the WIP I am a huge and excited +2 on this :D.

@mmerickel
Copy link
Member Author

Is it restarting more than once per second?

The behaviors are a little bit more complex than the old reloader because the file monitor is always running so some race conditions can definitely exist that I've tried to account for.

@mmerickel
Copy link
Member Author

Okay I made the history pretty.

@mmerickel mmerickel merged commit 0c1c8bf into Pylons:master Nov 20, 2016
@digitalresistor
Copy link
Member

It might be more than once per second (I have watchdog installed) but it's just really fast... I haven't seen it do something weird or get wedged.

@mmerickel mmerickel deleted the pserve-reloader-revamp branch November 29, 2020 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pserve --reload in 1.6 is less reliable than in 1.5
3 participants