Closed keegansmith21 closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.94%. Comparing base (
be36e85
) to head (8bfccf1
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Create a custom Airflow timetable for the Onix Workflow. This makes the workflow run every week on Monday and also on the 5th of every month.
This required the creation of the class, which inherits from Airflow's Timetable base class. We add in the logic for start and end date determination for both scheduled and manual runs. We are also required to register the timetable as a plugin. We do this with the plugin class and also adding the classes to the plugins folder. Weirdly, any DAG that uses the plugin MUST import it relative to the plugin folder. This means that the plugin folder itself must be added to the PYTHONPATH. See this issue for a full explanation.
Testing this with the sandbox environment required an update to the sandbox's create_dag_run function as it was unable to handle custom timetables. See this PR. Naturally, this means that this PR is dependent on the observatory platform's PR.