Skip to content

Fix scheduler crash due to comparing Nullable value in query#47301

Merged
ephraimbuddy merged 1 commit into
apache:mainfrom
astronomer:fix-query-for-nullable-logical-date
Mar 3, 2025
Merged

Fix scheduler crash due to comparing Nullable value in query#47301
ephraimbuddy merged 1 commit into
apache:mainfrom
astronomer:fix-query-for-nullable-logical-date

Conversation

@ephraimbuddy

Copy link
Copy Markdown
Contributor

Before using < for DR.logical_date in query, check if logical_date is not null.

closes: #47296

Before using < for DR.logical_date in query, first check if logical_date
is not null.
Comment thread airflow/models/dagrun.py
@ephraimbuddy ephraimbuddy merged commit b215907 into apache:main Mar 3, 2025
@ephraimbuddy ephraimbuddy deleted the fix-query-for-nullable-logical-date branch March 3, 2025 14:05
@ashb

ashb commented Mar 3, 2025

Copy link
Copy Markdown
Member

@ephraimbuddy This fixes the crash, but is the behaviour in the scheduler correct?

@ephraimbuddy

Copy link
Copy Markdown
Contributor Author

@ephraimbuddy This fixes the crash, but is the behaviour in the scheduler correct?

I didn't check but now that I checked it's no longer working as expected and it's also confusing how it should work. I ran a task that raised an exception, triggered a new run, and it started and failed. I used logical date for consecutive runs but didn't feel the depends_on_past feature. It's also confusing how this should work now. Should it work for only runs with logical date or for every run...

shahar1 pushed a commit to shahar1/airflow that referenced this pull request Mar 5, 2025
…47301)

Before using < for DR.logical_date in query, first check if logical_date
is not null.
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
…47301)

Before using < for DR.logical_date in query, first check if logical_date
is not null.
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.

Scheduler Crashing || when depends_on_past used in DAG params

4 participants