Skip to content

Conversation

@utkarsharma2
Copy link
Contributor

@utkarsharma2 utkarsharma2 commented Jun 24, 2023

Currently, there are CLI commands that are failing when passing a custom timetable. Following the example in the tutorial - https://airflow.apache.org/docs/apache-airflow/stable/howto/timetable.html and running the following commands will result in an error - ValueError: Not a valid timetable: <workday.AfterWorkdayTimetable object at 0x7f50f9cd1700>

  1. airflow dags backfill <dag_id> -s -e --dry-run (works fine without --dry-run)
  2. airflow dags test <dag_id> [date]
  3. airflow tasks render <dag_id> <task_id> (works fine if you pass a valid run_id instead of an execution_date)

The failure is due to missing data_interval when creating the DagRun object. The PR aims at adding data_interval when we are creating DagRun.

@utkarsharma2 utkarsharma2 marked this pull request as draft June 24, 2023 18:32
@utkarsharma2
Copy link
Contributor Author

utkarsharma2 commented Jun 24, 2023

@uranusjr please check, I'm yet to add test cases for these changes. But I just wanted to confirm there are no side effects of these changes :)

@uranusjr
Copy link
Member

Other changes look correct to me.

@uranusjr uranusjr force-pushed the FixCustomTimetable branch from f076a05 to 58f7810 Compare July 3, 2023 09:31
@utkarsharma2 utkarsharma2 marked this pull request as ready for review July 10, 2023 06:16
@utkarsharma2 utkarsharma2 requested a review from uranusjr July 10, 2023 06:59
@uranusjr
Copy link
Member

Check failures are unrelated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:CLI type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Timetable breaks a handful of CLI commands

4 participants