bbovenzi commented on code in PR #75223:
URL: https://github.com/apache/airflow/pull/75223#discussion_r4328377273


##########
airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:
##########
@@ -204,6 +230,9 @@ const TriggerDAGForm = ({
                 </Field.Root>
               )}
             />
+            {outsideDagDatesWarning === undefined ? undefined : (
+              <Alert status="warning">{outsideDagDatesWarning}</Alert>
+            )}

Review Comment:
   I need to update our design standards, but let's try to avoid adding alerts 
that will push the page content down. 
   
   For example: https://www.chakra-ui.com/docs/components/field#error-text



##########
airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:
##########
@@ -165,6 +174,23 @@ const TriggerDAGForm = ({
 
   const resetDateError = () => setErrors((prev) => ({ ...prev, date: undefined 
}));
 
+  // Every task's start and end dates are bounded by the Dag's, so a run 
outside them creates no
+  // task instances and is marked successful without running anything.
+  const logicalDate = watch("logicalDate");
+  const startDate = dagDetails?.start_date;
+  const endDate = dagDetails?.end_date;
+  let outsideDagDatesWarning: string | undefined;
+
+  if (Boolean(logicalDate) && typeof startDate === "string" && 
dayjs(logicalDate).isBefore(startDate)) {

Review Comment:
   Does the `isBefore` and `isAfter` comparison need a timezone check?



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