question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show DAG parse error if 'timetable' and 'schedule_interval' are set together

See original GitHub issue

Apache Airflow version

2.2.5 (latest released)

What happened

In the UI I see 1 day, 00:00:00 under Schedule instead of the summary I’ve defined in my timetable:

    @property
    def summary(self) -> str:
        return "Daily (DailyTimetable)"

What you think should happen instead

According to the docs, overriding summary should change how the timetable is represented in the UI: https://airflow.apache.org/docs/apache-airflow/stable/howto/timetable.html#timetable-display-in-ui

How to reproduce

from airflow.timetables.base import DagRunInfo, DataInterval, TimeRestriction, Timetable


class DailyTimetable(Timetable):

    @property
    def summary(self) -> str:
        return "Daily (DailyTimetable)"

I can’t share our implementation of this timetable, but I added the relevant code for the summary that is deployed.

Operating System

docker image apache/airflow:2.2.5-python3.9

Versions of Apache Airflow Providers

Apache Airflow 2.2.5

Deployment

Official Apache Airflow Helm Chart

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Apr 19, 2022

Let me add an error for this so you don’t stumble on it again.

0reactions
uranusjrcommented, Apr 20, 2022

Modifying a DAG after it’s declared is not recommended or actively supported, so you should avoid that anyway. I’ll still add something to guard this, but don’t count for the validation to be fool-proof.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Status of testing of Apache Airflow 2.3.3rc3 #24863 - GitHub
Show DAG parse error if 'timetable' and 'schedule_interval' are set together (#23087) · Allow for LOGGING_LEVEL=DEBUG (#23360): @GApfel
Read more >
DAG scheduling and timetables in Airflow - Astronomer Docs
In Airflow 2.3 and earlier, the schedule_interval is used instead of the schedule parameter and it only accepts cron expressions or timedelta objects....
Read more >
Airflow webserver gives cron error for dags with None as ...
Try this: Set your schedule_interval to None without the '' , or simply do not specify schedule_interval in your DAG . It is...
Read more >
DAGs — Airflow Documentation
A DAG (Directed Acyclic Graph) is the core concept of Airflow, ... when the DAG is being automatically scheduled, with certain schedule interval...
Read more >
The Ultimate Guide on Airflow Scheduler - Learn - Hevo Data
Each of your DAG runs has a “schedule_interval” or repeat frequency that can be defined using a cron expression as an “str”, or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found