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

Update Celery and Kombu dependencies #4842

Merged
merged 3 commits into from
Mar 20, 2018
Merged

Update Celery and Kombu dependencies #4842

merged 3 commits into from
Mar 20, 2018

Conversation

robertknight
Copy link
Member

@robertknight robertknight commented Mar 1, 2018

Update Celery from 3.x to current 4.x release.

This is required to support the latest Python 3.x version. For changelog see http://celery.readthedocs.io/en/latest/whatsnew-4.0.html#upgrading-from-celery-3-1 . Note that we were already using 3.1.25 as highlighted in the migration notes.

The only breaking change I encountered was the removal of the --autoreload flag. I also applied an automated fix to h/celery.py to migrate setting names as documented in the changelog.

Edit: Elsevier are also interested in this because I believe it should enable them to run h using Amazon SQS (which they already use) instead of setting up a separate RabbitMQ service.

@codecov
Copy link

codecov bot commented Mar 1, 2018

Codecov Report

Merging #4842 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4842   +/-   ##
=======================================
  Coverage   96.63%   96.63%           
=======================================
  Files         387      387           
  Lines       21580    21580           
  Branches     1223     1223           
=======================================
  Hits        20854    20854           
  Misses        611      611           
  Partials      115      115
Impacted Files Coverage Δ
h/celery.py 93.93% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a04ba85...56c1c13. Read the comment docs.

@robertknight
Copy link
Member Author

In addition to Python 3.6 support, it turns out that this may also be useful for partners running h due to support for new brokers such as SQS in Celery 4.x

Copy link
Contributor

@hmstepanek hmstepanek left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -80,7 +80,7 @@ def devserver(https, web, ws, worker, assets, beat):
m.add_process('ws', 'gunicorn --name websocket --reload --paste conf/development-websocket.ini %s' % gunicorn_args)

if worker:
m.add_process('worker', 'hypothesis --dev celery worker --autoreload -l INFO')
m.add_process('worker', 'hypothesis --dev celery worker -l INFO')
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we don't need this as we have other ways of reloading files automagically when running in dev mode, if I'm understanding what this feature was intended for. (I know it was deprecated but just being thorough about whether we need to replace it with something else or not and I think the answer is no we don't.)

Copy link
Member Author

@robertknight robertknight Mar 20, 2018

Choose a reason for hiding this comment

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

We have autoreloading of the webpage/API-serving code in h via gunicorn's --reload flag. I don't think we have any replacement mechanism for --autoreload in place here, and I'm not sure it was actually working anyway. I don't know what commonly used alternatives are but I found one suggestion to use watchdog.

I don't think it has been/will be much of an issue in practice because worker code just doesn't get changed that often.

@robertknight robertknight merged commit f760d38 into master Mar 20, 2018
@robertknight robertknight deleted the update-celery branch March 20, 2018 07:56
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.

None yet

2 participants