uranusjr opened a new pull request #17414: URL: https://github.com/apache/airflow/pull/17414
To allow a custom `timetable` argument to work on a DAG, the existing `schedule_interval` attribute and the `normalized_schedule_interval` property are removed. All existing aceess to `schedule_interval` (the normalized property is not used anywhere) are all changed to use the DAG's `timetable` member. A couple of timetable-describing flags, `can_run` and `periodic`, are added to replace some usages that need to know about what the timetable is capable of doing. Serialization methods are added to timetable classes so the timetable can be saved to the meta database during DAG serialization. Since the `schedule_interval` attribute has been removed, the field on `DagModel` of the same name is also changed. Since we still need that information to display the timetable on the web UI, a field `timetable_summary` is added as its replacement. For convinience, this is actually implemented as a database field rename (so existing rows in the database may contain serialized `timedelta` and `relativetimedelta` values instead of a plain string), but all new `DagModel` rows from now on will only store string values in it. While we're at it, an extra field `timetable_description` is also added to implement cron expression explaination. This is not strictly related to the `schedule_interval` change, but I feel it is worthwhile to combine the changes into one migration instead of two. All web UI usages to `schedule_interval` now use `timetable_summary` instead. The UI part of `timetable_description` is *not* included since mixing those does not have the same benefit as merging db migrations. This will conflict with #16352 (both contains a database migration), so we need to get that merged in first. But this one is more or less ready on its own, so I'm posting it out for review. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
