dstandish commented on code in PR #25141:
URL: https://github.com/apache/airflow/pull/25141#discussion_r923893323


##########
airflow/www/utils.py:
##########
@@ -745,3 +747,25 @@ def should_show(self, securitymanager) -> bool:
             if not user_roles.intersection(set(self.roles)):
                 return False
         return True
+
+
+def get_dataset_triggered_next_run_info(dag_ids: List[str], session: Session) 
-> Dict[str, Tuple[int, int]]:

Review Comment:
   i am wary of adding public function here... because so new and i think it's 
pretty likely we'll want to change / move / remove...
   
   what do you think about making protected?  also seems maybe better to keep 
it in views.py since it's really specific to that and not more generally useful.



##########
airflow/www/views.py:
##########
@@ -852,6 +852,11 @@ def index(self):
                 permissions.RESOURCE_DAG,
             ) in user_permissions
 
+            dataset_triggered_dag_ids = {dag.dag_id for dag in dags if 
dag.schedule_interval == "Dataset"}

Review Comment:
   this evaluation, `dag.schedule_interval == "Dataset"` i see we do a lot here.
   
   it's probably easier to do `if dag.schedule_on`.
   
   could also consider adding a property like `is_dataset_triggered`?



-- 
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]

Reply via email to