create_delta_data_intervals is never read - timedelta/relativedelta schedules check create_cron_data_intervals instead

Open Beginner friendly
#69,868 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python

Research direction

Start in task-sdk/src/airflow/sdk/definitions/dag.py at _create_timetable() and compare the timedelta/relativedelta branch with the create_delta_data_intervals entry in airflow-core/src/airflow/config_templates/config.yml. Reproduce the behavior using the issue's configuration steps and inspect the timetable type; done means the delta setting controls delta schedules independently of create_cron_data_intervals.

Written by the indexing model from the issue text.

Description

area:core kind:bug needs-triage
Under which category would you file this issue?

Task SDK

Apache Airflow version

3.3.0 (bug confirmed present via source review; also reproduced hands-on on 3.2.2, and confirmed present on main as of 2026-07-14)

What happened and how to reproduce it?

airflow.cfg's [scheduler] create_delta_data_intervals setting is never read anywhere in the codebase - it has no effect. Meanwhile [scheduler] create_cron_data_intervals silently controls timetable selection for both cron-string schedules (documented) and timedelta/relativedelta schedules (undocumented, and contradicts config.yml's own description of what create_delta_data_intervals is supposed to do).

Root cause is in _create_timetable() in task-sdk/src/airflow/sdk/definitions/dag.py (lines 148–169 on main / 3.3.0):

if isinstance(interval, timedelta | relativedelta):
    if airflow_conf.getboolean("scheduler", "create_cron_data_intervals"):   # <-- should be create_delta_data_intervals
        return DeltaDataIntervalTimetable(interval)
    return DeltaTriggerTimetable(interval)
if isinstance(interval, str):
    if airflow_conf.getboolean("scheduler", "create_cron_data_intervals"):
        return CronDataIntervalTimetable(interval, timezone)
    return CronTriggerTimetable(interval, timezone=timezone)

Both branches check the same config key, create_cron_data_intervals. The timedelta/relativedelta branch should check create_delta_data_intervals instead, per config.yml's own description of that setting (airflow-core/src/airflow/config_templates/config.yml, create_delta_data_intervals entry).

Steps to reproduce

  1. Use any DAG scheduled with a plain timedelta, e.g. the stock tutorial DAG:
    schedule=timedelta(days=1)
    
  2. In airflow.cfg, set:
    [scheduler]
    create_delta_data_intervals = True
    
  3. Confirm the config is actually being read:
    from airflow.configuration import conf
    print(conf.getboolean("scheduler", "create_delta_data_intervals"))  # prints True
    
  4. Load the DAG and inspect its timetable:
    from airflow.models import DagBag
    dag = DagBag().get_dag("tutorial")
    print(type(dag.timetable))
    
    Result: still DeltaTriggerTimetable - create_delta_data_intervals=True had no effect.
  5. Now instead set create_cron_data_intervals = True (leaving create_delta_data_intervals at its default) and rerun step 4.
    Result: dag.timetable becomes DeltaDataIntervalTimetable, even though the DAG's schedule is a timedelta, not a cron string - proving the wrong config key is being consulted.
What you think should happen instead?

The timedelta | relativedelta branch of _create_timetable() should check create_delta_data_intervals, matching what config.yml documents for that setting and keeping it independent from create_cron_data_intervals (which should only affect the str/cron branch). The fix is a one-line change:

if isinstance(interval, timedelta | relativedelta):
    if airflow_conf.getboolean("scheduler", "create_delta_data_intervals"):
        return DeltaDataIntervalTimetable(interval)
    return DeltaTriggerTimetable(interval)
Operating System

Windows 11 / WSL2 (Ubuntu), reproduced via a local virtualenv install

Deployment

Virtualenv installation

Apache Airflow Provider(s)

No response

Versions of Apache Airflow Providers

N/A

Official Helm Chart version

Not Applicable

Kubernetes Version

No response

Helm Chart configuration

No response

Docker Image customizations

No response

Anything else?

Confirmed by reading source directly (not just local install):

  • Installed venv (Airflow 3.2.2): venv/lib/python3.12/site-packages/airflow/sdk/definitions/dag.py
  • github.com/apache/airflow tag 3.2.2: same code
  • github.com/apache/airflow tag 3.3.0: same code, lines 148–169
  • github.com/apache/airflow branch main: same code, unchanged

Also confirmed create_delta_data_intervals is referenced nowhere else in the codebase except:

  • airflow-core/src/airflow/cli/commands/config_command.py (CLI config-list metadata only)
  • config_templates/config.yml (docs only)
  • config_templates/unit_tests.cfg (sets it true for test fixtures, but no code path reads it for this purpose)

This makes create_delta_data_intervals fully dead config as of at least 3.2.2 through main.

Are you willing to submit PR?
  • Yes I am willing to submit a PR!
Code of Conduct
Dominant language
Python
Stars
46.9k
Forks
17.9k
Avg merge
2d 5h
Merged PRs (30d)
480

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/airflow

All issues in apache/airflow

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.