Skip to content

First scheduling issue after schedule interval change #21594

@wanlce

Description

@wanlce

Apache Airflow version

main (development)

What happened

New version of the timetables issue

eg:
At first I had a scheduling time of 30 * * * * *
After running it twice, I changed it to 32 * * * *
The actual first run time after the change is fine, but because the data interval starts from the end of the previous interval, it has already been determined and not refreshed, so the displayed execution_date is incorrect. This can cause problems with Cross-dag dependencies.

2022-02-15_23-34 2022-02-15_23-36

Correct:

2022-02-15_23-26 2022-02-15_23-27

start = last_automated_data_interval.end
if restriction.latest is not None and start > restriction.latest:
return None
end = self._get_next(start)
return DagRunInfo.interval(start=start, end=end)

My current solution is to add start = self._get_prev(end) below end = self._get_next(start) to reset data_interval_start.
I'm not sure if this is appropriate
Looking forward to new ideas

What you expected to happen

No response

How to reproduce

No response

Operating System

ubuntu21.10

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions