[ 
https://issues.apache.org/jira/browse/AIRFLOW-4224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vianney FOUCAULT updated AIRFLOW-4224:
--------------------------------------
    Description: 
python 3 does not handle some cross type comparisons.

 

python2.7
  
{code:java}
>>> foo = 10
>>> bar = "20"
>>> foo > bar
False
>>>
{code}
python3.5
{code:java}
>>> foo = 10
>>> bar = "10"
>>> foo >= bar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unorderable types: int() >= str()
>>>
{code}
python3.7
{code:java}
>>> foo = 10
>>> bar = 10
>>> bar = "10"
>>> foo >= bar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: '>=' not supported between instances of 'int' and 'str'
>>>
{code}
within airflow 1.10.1
 * jobs.py:1182
 * and models.py:3586

within airflow 1.10.2
 * jobs.py:1179
 * models.py:3705

No clue so far

 
{code:java}
Apr 02 13:10:11 airflow-scheduler systemd[1]: Started Airflow scheduler daemon. 
Apr 02 13:10:14 airflow-scheduler bash[523]: 
/data/venvs/airflow/lib/python3.5/site-packages/airflow/configuration.py:276: 
DeprecationWarning: The celeryd_concurrency option in [celery] has been r Apr 
02 13:10:14 airflow-scheduler bash[523]: return int(self.get(section, key)) Apr 
02 13:10:14 airflow-scheduler bash[523]: 
/data/venvs/airflow/lib/python3.5/site-packages/airflow/bin/cli.py:1610: 
DeprecationWarning: The celeryd_concurrency option in [celery] has been rename 
Apr 02 13:10:14 airflow-scheduler bash[523]: default=conf.get('celery', 
'worker_concurrency')), Apr 02 13:10:18 airflow-scheduler bash[523]: Traceback 
(most recent call last): Apr 02 13:10:18 airflow-scheduler bash[523]: File 
"/data/venvs/airflow/bin/airflow", line 32, in <module> Apr 02 13:10:18 
airflow-scheduler bash[523]: args.func(args) Apr 02 13:10:18 airflow-scheduler 
bash[523]: File 
"/data/venvs/airflow/lib/python3.5/site-packages/airflow/utils/cli.py", line 
74, in wrapper Apr 02 13:10:18 airflow-scheduler bash[523]: return f(*args, 
**kwargs) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
"/data/venvs/airflow/lib/python3.5/site-packages/airflow/bin/cli.py", line 928, 
in scheduler Apr 02 13:10:18 airflow-scheduler bash[523]: job.run() Apr 02 
13:10:18 airflow-scheduler bash[523]: File 
"/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 203, in 
run Apr 02 13:10:18 airflow-scheduler bash[523]: self._execute() Apr 02 
13:10:18 airflow-scheduler bash[523]: File 
"/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 1588, 
in _execute Apr 02 13:10:18 airflow-scheduler bash[523]: 
self._execute_helper(processor_manager) Apr 02 13:10:18 airflow-scheduler 
bash[523]: File 
"/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 1709, 
in _execute_helper Apr 02 13:10:18 airflow-scheduler bash[523]: 
(State.SCHEDULED,)) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
"/data/venvs/airflow/lib/python3.5/site-packages/airflow/utils/db.py", line 74, 
in wrapper Apr 02 13:10:18 airflow-scheduler bash[523]: return func(*args, 
**kwargs) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
"/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 1383, 
in _execute_task_instances Apr 02 13:10:18 airflow-scheduler bash[523]: 
session=session) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
"/data/venvs/airflow/lib/python3.5/site-packages/airflow/utils/db.py", line 70, 
in wrapper Apr 02 13:10:18 airflow-scheduler bash[523]: return func(*args, 
**kwargs) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
"/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 1182, 
in _find_executable_task_instances Apr 02 13:10:18 airflow-scheduler bash[523]: 
if current_task_concurrency >= task_concurrency_limit: Apr 02 13:10:18 
airflow-scheduler bash[523]: TypeError: unorderable types: int() >= str() Apr 
02 13:10:18 airflow-scheduler systemd[1]: airflow-scheduler.service: Main 
process exited, code=exited, status=1/FAILURE Apr 02 13:10:18 airflow-scheduler 
systemd[1]: airflow-scheduler.service: Unit entered failed state. Apr 02 
13:10:18 airflow-scheduler systemd[1]: airflow-scheduler.service: Failed with 
result 'exit-code'.
{code}

  was:
python 3 does not handle some cross type comparisons.

 

python2.7
  
{code:java}
>>> foo = 10
>>> bar = "20"
>>> foo > bar
False
>>>
{code}
python3.5
{code:java}
>>> foo = 10
>>> bar = "10"
>>> foo >= bar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unorderable types: int() >= str()
>>>
{code}
python3.7
{code:java}
>>> foo = 10
>>> bar = 10
>>> bar = "10"
>>> foo >= bar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: '>=' not supported between instances of 'int' and 'str'
>>>
{code}
within airflow 1.10.1
 * jobs.py:1182
 * and models.py:3586

within airflow 1.10.2
 * jobs.py:1179
 * models.py:3705

No clue so far


> TypeError: unorderable types: int() >= str()
> --------------------------------------------
>
>                 Key: AIRFLOW-4224
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4224
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: models
>    Affects Versions: 1.10.1, 1.10.2
>         Environment: debian stretch/python35 airflow 1.10.2 1.10.1/celery
>            Reporter: Vianney FOUCAULT
>            Priority: Major
>              Labels: easyfix
>             Fix For: 1.10.3
>
>
> python 3 does not handle some cross type comparisons.
>  
> python2.7
>   
> {code:java}
> >>> foo = 10
> >>> bar = "20"
> >>> foo > bar
> False
> >>>
> {code}
> python3.5
> {code:java}
> >>> foo = 10
> >>> bar = "10"
> >>> foo >= bar
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: unorderable types: int() >= str()
> >>>
> {code}
> python3.7
> {code:java}
> >>> foo = 10
> >>> bar = 10
> >>> bar = "10"
> >>> foo >= bar
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: '>=' not supported between instances of 'int' and 'str'
> >>>
> {code}
> within airflow 1.10.1
>  * jobs.py:1182
>  * and models.py:3586
> within airflow 1.10.2
>  * jobs.py:1179
>  * models.py:3705
> No clue so far
>  
> {code:java}
> Apr 02 13:10:11 airflow-scheduler systemd[1]: Started Airflow scheduler 
> daemon. Apr 02 13:10:14 airflow-scheduler bash[523]: 
> /data/venvs/airflow/lib/python3.5/site-packages/airflow/configuration.py:276: 
> DeprecationWarning: The celeryd_concurrency option in [celery] has been r Apr 
> 02 13:10:14 airflow-scheduler bash[523]: return int(self.get(section, key)) 
> Apr 02 13:10:14 airflow-scheduler bash[523]: 
> /data/venvs/airflow/lib/python3.5/site-packages/airflow/bin/cli.py:1610: 
> DeprecationWarning: The celeryd_concurrency option in [celery] has been 
> rename Apr 02 13:10:14 airflow-scheduler bash[523]: 
> default=conf.get('celery', 'worker_concurrency')), Apr 02 13:10:18 
> airflow-scheduler bash[523]: Traceback (most recent call last): Apr 02 
> 13:10:18 airflow-scheduler bash[523]: File "/data/venvs/airflow/bin/airflow", 
> line 32, in <module> Apr 02 13:10:18 airflow-scheduler bash[523]: 
> args.func(args) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
> "/data/venvs/airflow/lib/python3.5/site-packages/airflow/utils/cli.py", line 
> 74, in wrapper Apr 02 13:10:18 airflow-scheduler bash[523]: return f(*args, 
> **kwargs) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
> "/data/venvs/airflow/lib/python3.5/site-packages/airflow/bin/cli.py", line 
> 928, in scheduler Apr 02 13:10:18 airflow-scheduler bash[523]: job.run() Apr 
> 02 13:10:18 airflow-scheduler bash[523]: File 
> "/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 203, 
> in run Apr 02 13:10:18 airflow-scheduler bash[523]: self._execute() Apr 02 
> 13:10:18 airflow-scheduler bash[523]: File 
> "/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 1588, 
> in _execute Apr 02 13:10:18 airflow-scheduler bash[523]: 
> self._execute_helper(processor_manager) Apr 02 13:10:18 airflow-scheduler 
> bash[523]: File 
> "/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 1709, 
> in _execute_helper Apr 02 13:10:18 airflow-scheduler bash[523]: 
> (State.SCHEDULED,)) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
> "/data/venvs/airflow/lib/python3.5/site-packages/airflow/utils/db.py", line 
> 74, in wrapper Apr 02 13:10:18 airflow-scheduler bash[523]: return 
> func(*args, **kwargs) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
> "/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 1383, 
> in _execute_task_instances Apr 02 13:10:18 airflow-scheduler bash[523]: 
> session=session) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
> "/data/venvs/airflow/lib/python3.5/site-packages/airflow/utils/db.py", line 
> 70, in wrapper Apr 02 13:10:18 airflow-scheduler bash[523]: return 
> func(*args, **kwargs) Apr 02 13:10:18 airflow-scheduler bash[523]: File 
> "/data/venvs/airflow/lib/python3.5/site-packages/airflow/jobs.py", line 1182, 
> in _find_executable_task_instances Apr 02 13:10:18 airflow-scheduler 
> bash[523]: if current_task_concurrency >= task_concurrency_limit: Apr 02 
> 13:10:18 airflow-scheduler bash[523]: TypeError: unorderable types: int() >= 
> str() Apr 02 13:10:18 airflow-scheduler systemd[1]: 
> airflow-scheduler.service: Main process exited, code=exited, status=1/FAILURE 
> Apr 02 13:10:18 airflow-scheduler systemd[1]: airflow-scheduler.service: Unit 
> entered failed state. Apr 02 13:10:18 airflow-scheduler systemd[1]: 
> airflow-scheduler.service: Failed with result 'exit-code'.
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to