Skip to content

Custom timetable generate_run_id function no longer used for manually triggered dag runs #55908

Closed

Description

@NilsJPWerner

Apache Airflow version

3.0.6

If "Other Airflow 2 version" selected, which one?

No response

What happened?

In airflow 2.X the generate_run_id method of a custom timetable was used for both scheduled and manually triggered dags. In airflow 3 custom generate_run_id is still used for scheduled dag runs but is not used for manual triggers

Before:

    run_id = run_id or dag.timetable.generate_run_id(
        run_type=DagRunType.MANUAL, logical_date=logical_date, data_interval=data_interval
    )

After

    run_id = run_id or DagRun.generate_run_id(
        run_type=DagRunType.MANUAL,
        logical_date=coerced_logical_date,
        run_after=timezone.coerce_datetime(run_after),
    )

035060d#diff-98bce8c9085a1f92608314c673762bddd0031441b3d1fd933f2deaeb3fcee132

cc @sunank200 @uranusjr

What you think should happen instead?

No response

How to reproduce

Use this timetable and trigger a dag with it

class CustomTimetable(CronDataIntervalTimetable):
    def generate_run_id(
        self,
        *,
        data_interval: DataInterval,
        **kwargs,
    ) -> str:
        return data_interval.start.strftime("%Y%m%d%H%M%S")

Operating System

Debian

Versions of Apache Airflow Providers

No response

Deployment

Astronomer

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

Activity

  1. added
    kind:bug
    needs-triage
    on Sep 19, 2025
  2. NilsJPWerner commented on Oct 2, 2025

    @NilsJPWerner
    ContributorAuthor

    I'd be happy to take a crack at this if it is actually deemed a bug.

  3. added a commit that references this issue on Oct 14, 2025
    5d7eef9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corekind:bugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions