You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/19 14:49:46 UTC

[GitHub] [airflow] sdebruyn opened a new issue, #23087: Airflow UI doesn't show timetable summary

sdebruyn opened a new issue, #23087:
URL: https://github.com/apache/airflow/issues/23087

   ### 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:
   
   ```py
       @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
   
   ```py
   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
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] sdebruyn closed issue #23087: Airflow UI doesn't show timetable summary

Posted by GitBox <gi...@apache.org>.
sdebruyn closed issue #23087: Airflow UI doesn't show timetable summary
URL: https://github.com/apache/airflow/issues/23087


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on issue #23087: Show DAG parse error if 'timetable' and 'schedule_interval' are set together

Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #23087:
URL: https://github.com/apache/airflow/issues/23087#issuecomment-1103279536

   Actually it seems like we already have an exception?
   
   ```pycon
   >>> from airflow import DAG
   >>> from airflow.timetables.simple import NullTimetable
   >>> DAG("my-dag", schedule_interval="@once", timetable=NullTimetable())
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/opt/airflow/airflow/models/dag.py", line 426, in __init__
       raise TypeError("cannot specify both 'schedule_interval' and 'timetable'")
   TypeError: cannot specify both 'schedule_interval' and 'timetable'
   ```


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] sdebruyn commented on issue #23087: Airflow UI doesn't show timetable summary

Posted by GitBox <gi...@apache.org>.
sdebruyn commented on issue #23087:
URL: https://github.com/apache/airflow/issues/23087#issuecomment-1102852663

   My bad, I accidentally set the schedule interval as well


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr closed issue #23087: Show DAG parse error if 'timetable' and 'schedule_interval' are set together

Posted by GitBox <gi...@apache.org>.
uranusjr closed issue #23087: Show DAG parse error if 'timetable' and 'schedule_interval' are set together
URL: https://github.com/apache/airflow/issues/23087


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on issue #23087: Airflow UI doesn't show timetable summary

Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #23087:
URL: https://github.com/apache/airflow/issues/23087#issuecomment-1102932552

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


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] sdebruyn commented on issue #23087: Show DAG parse error if 'timetable' and 'schedule_interval' are set together

Posted by GitBox <gi...@apache.org>.
sdebruyn commented on issue #23087:
URL: https://github.com/apache/airflow/issues/23087#issuecomment-1103481128

   It wasn't triggered for me since I set the timetable after the __init__


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on issue #23087: Show DAG parse error if 'timetable' and 'schedule_interval' are set together

Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #23087:
URL: https://github.com/apache/airflow/issues/23087#issuecomment-1103587416

   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.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org