Skip to content
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

Add optional data interval to CronTriggerTimetable #25503

Merged

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Aug 3, 2022

This allows the user to provide a (static) data interval for DAG runs to adopt. This should be useful for most cron usages and more natural to the old schedule_interval logic. If interval is not provided, the default behaviour is the same as implemented in #23662.

Also moved CronTriggerTimetable to its own module. The class living in interval is weird.

cc @mai-nakagawa

Copy link
Contributor

@mai-nakagawa mai-nakagawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads-up. The idea looks good to me. Let me share my feedback.

airflow/timetables/trigger.py Outdated Show resolved Hide resolved
airflow/timetables/_cron.py Outdated Show resolved Hide resolved
@uranusjr uranusjr force-pushed the cron-trigger-timetable-data-interval branch from a59f47e to ea15e3a Compare August 4, 2022 00:52
This allows the user to provide a (static) data interval for DAG runs to
adopt. This should be useful for most cron usages and more natural to
the old schedule_interval logic.

Also moved CronTriggerTimetable to its own module. The class living in
'interval' is weird.
@uranusjr uranusjr force-pushed the cron-trigger-timetable-data-interval branch from ea15e3a to 4b013e4 Compare August 4, 2022 05:54
Copy link
Contributor

@mai-nakagawa mai-nakagawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! By the way, I'm not offending you but curious why you always force-push your updates? It makes me a little bit harder to find what you update.

@uranusjr
Copy link
Member Author

uranusjr commented Aug 4, 2022

I prefer to do fixup commits for fixes that are not standalone to keep the history clean. I admit GitHub does not provide a very good UI for them, but the changes are still visible if you click on “force-pushed” in the message.

@mai-nakagawa
Copy link
Contributor

the changes are still visible if you click on “force-pushed” in the message.

Oh, I missed compare button on "force-pushed" messages. Thanks!

@uranusjr uranusjr merged commit 4ecaa9e into apache:main Aug 5, 2022
@uranusjr uranusjr deleted the cron-trigger-timetable-data-interval branch August 5, 2022 03:40
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Aug 15, 2022
@ephraimbuddy ephraimbuddy added this to the Airflow 2.4.0 milestone Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants