Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Error "NumericValueOutOfRange integer out of range" in scheduler, task_insance.priority_weight column overflow #22781

Closed
1 of 2 tasks
kosteev opened this issue Apr 6, 2022 · 0 comments
Labels
area:core kind:bug This is a clearly a bug

Comments

@kosteev
Copy link
Contributor

kosteev commented Apr 6, 2022

Apache Airflow version

2.2.3

What happened

Scheduler fails with following exception in case of priority_weight_total method returning out of integer range value.

"Original exception was: (psycopg2.errors.NumericValueOutOfRange) integer out of range"

What you think should happen instead

No response

How to reproduce

DAG to reproduce issue.

import airflow
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from datetime import timedelta

default_args = {
    'start_date': airflow.utils.dates.days_ago(0),
    'retries': 1,
    'retry_delay': timedelta(minutes=5)
}

dag = DAG(
    'monitoring_sched',
    default_args=default_args,
    description='liveness monitoring dag',
    schedule_interval='*/20 * * * *',
    dagrun_timeout=timedelta(minutes=120))

# priority_weight has type int in Airflow DB, uses the maximum.

# priority_weight has type int in Airflow DB, uses the maximum.
t1 = BashOperator(
    task_id='echo',
    bash_command='echo test',
    dag=dag,
    queue='kubernetes',
    depends_on_past=False,
    priority_weight=2**31-1)

# priority_weight has type int in Airflow DB, uses the maximum.
t2 = BashOperator(
    task_id='sleep',
    bash_command='sleep 1900',
    queue='kubernetes',
    dag=dag,
    depends_on_past=False,
    priority_weight=2**31-1)


# priority_weight has type int in Airflow DB, uses the maximum.
t3 = BashOperator(
    task_id='ech2o',
    bash_command='echo done',
    dag=dag,
    queue='kubernetes',
    depends_on_past=False,
    priority_weight=2**31-1)

t1 >> t2 >> t3

Operating System

Composer

Versions of Apache Airflow Providers

No response

Deployment

Composer

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@kosteev kosteev added area:core kind:bug This is a clearly a bug labels Apr 6, 2022
@apache apache locked and limited conversation to collaborators Apr 12, 2022
@potiuk potiuk converted this issue into discussion #22957 Apr 12, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area:core kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant