Skip to content

[AIRFLOW-1967] Update Celery to 4.0.2#2914

Closed
Fokko wants to merge 1 commit intoapache:masterfrom
Fokko:AIRFLOW-1967-update-celery
Closed

[AIRFLOW-1967] Update Celery to 4.0.2#2914
Fokko wants to merge 1 commit intoapache:masterfrom
Fokko:AIRFLOW-1967-update-celery

Conversation

@Fokko
Copy link
Copy Markdown
Contributor

@Fokko Fokko commented Jan 3, 2018

Hi all,

I'd like to update Celery to version 4.0.2. While updating my Docker container to version 1.9, I caught this error:

worker_1     | [2018-01-03 10:34:29,934: CRITICAL/MainProcess] Unrecoverable error: TypeError("'<=' not supported between instances of 'NoneType' and 'int'",)
worker_1     | Traceback (most recent call last):
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/worker/worker.py", line 203, in start
worker_1     |     self.blueprint.start(self)
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/bootsteps.py", line 115, in start
worker_1     |     self.on_start()
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/apps/worker.py", line 143, in on_start
worker_1     |     self.emit_banner()
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/apps/worker.py", line 159, in emit_banner
worker_1     |     string(self.colored.reset(self.extra_info() or '')),
worker_1     |   File "/usr/local/lib/python3.6/site-packages/celery/apps/worker.py", line 188, in extra_info
worker_1     |     if self.loglevel <= logging.INFO:
worker_1     | TypeError: '<=' not supported between instances of 'NoneType' and 'int'

This is because I've been running Python 2 in my local environments, and the Docker image is Python 3:
https://github.com/puckel/docker-airflow/pull/143/files

This is the issue in Celery:
https://github.com/celery/celery/blob/0dde9df9d8dd5dbbb97ef75a81757bc2d9a4b33e/Changelog#L145

Make sure you have checked all steps below.

JIRA

Description

  • Here are some details about my PR, including screenshots of any UI changes:

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"
  • Passes git diff upstream/master -u -- "*.py" | flake8 --diff

Update Celery to 4.0.2 for fixing error
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
@r39132
Copy link
Copy Markdown
Contributor

r39132 commented Jan 3, 2018

LGTM!

@asfgit asfgit closed this in b9f4a74 Jan 3, 2018
Acehaidrey pushed a commit to Acehaidrey/incubator-airflow that referenced this pull request Jan 19, 2018
Update Celery to 4.0.2 for fixing error
TypeError: '<=' not supported between instances of
'NoneType' and 'int'

Hi all,

I'd like to update Celery to version 4.0.2. While
updating my Docker container to version 1.9, I
caught this error:
```
worker_1     | [2018-01-03 10:34:29,934:
CRITICAL/MainProcess] Unrecoverable error:
TypeError("'<=' not supported between instances of
'NoneType' and 'int'",)
worker_1     | Traceback (most recent call last):
worker_1     |   File "/usr/local/lib/python3.6
/site-packages/celery/worker/worker.py", line 203,
in start
worker_1     |     self.blueprint.start(self)
worker_1     |   File "/usr/local/lib/python3.6
/site-packages/celery/bootsteps.py", line 115, in
start
worker_1     |     self.on_start()
worker_1     |   File "/usr/local/lib/python3.6
/site-packages/celery/apps/worker.py", line 143,
in on_start
worker_1     |     self.emit_banner()
worker_1     |   File "/usr/local/lib/python3.6
/site-packages/celery/apps/worker.py", line 159,
in emit_banner
worker_1     |
string(self.colored.reset(self.extra_info() or
'')),
worker_1     |   File "/usr/local/lib/python3.6
/site-packages/celery/apps/worker.py", line 188,
in extra_info
worker_1     |     if self.loglevel <=
logging.INFO:
worker_1     | TypeError: '<=' not supported
between instances of 'NoneType' and 'int'
```

This is because I've been running Python 2 in my
local environments, and the Docker image is Python
3:
https://github.com/puckel/docker-
airflow/pull/143/files

This is the issue in Celery:
https://github.com/celery/celery/blob/0dde9df9d8dd
5dbbb97ef75a81757bc2d9a4b33e/Changelog#L145

Make sure you have checked _all_ steps below.

### JIRA
- [x] My PR addresses the following [Airflow JIRA]
(https://issues.apache.org/jira/browse/AIRFLOW/)
issues and references them in the PR title. For
example, "[AIRFLOW-XXX] My Airflow PR"
    - https://issues.apache.org/jira/browse/AIRFLOW-
XXX

### Description
- [x] Here are some details about my PR, including
screenshots of any UI changes:

### Tests
- [x] My PR adds the following unit tests __OR__
does not need testing for this extremely good
reason:

### Commits
- [x] My commits all reference JIRA issues in
their subject lines, and I have squashed multiple
commits if they address the same issue. In
addition, my commits follow the guidelines from
"[How to write a good git commit
message](http://chris.beams.io/posts/git-
commit/)":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not
"adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

- [x] Passes `git diff upstream/master -u --
"*.py" | flake8 --diff`

Closes apache#2914 from Fokko/AIRFLOW-1967-update-celery
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.

2 participants