You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dstandish (via GitHub)" <gi...@apache.org> on 2025/03/26 17:35:49 UTC

[I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

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

   ### Body
   
   As part of the AIP-83 amendment process we decided to make logical_date nullable, and to make it default null for manually triggered dags.
   
   We got some feedback that this will suck for users.
   
   So we want to keep the airlfow 2 behavior where logical_date is `now()` by default, but the users can optionally select null.
   
   **NOTE: This will have a UI component!!!** 
   
   We will need to update the UI date picker so that user can optionally choose null.
   
   ### Committer
   
   - [x] I acknowledge that I am a maintainer/committer of the Apache Airflow project.


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2764638041

   Currently, for `TriggerDagRunOperator`, logical_date defaults to None if not provided. Do we want to change this to datetime.now() as the default?


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "vatsrahul1001 (via GitHub)" <gi...@apache.org>.
vatsrahul1001 commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2764634697

   @dstandish / @cmarteepants Currently, logical_rate is a required field in the API request; however, the user can pass it as null.
   
   Do we want to make logical_date optional, defaulting to datetime.now() if not provided, while respecting any value explicitly passed?
   > Triggering Dag Run via API
   > try to make it so if not supplied then it will be timezone.now() but if supplied we respect it. if this causes trouble and is more or less impossible to support (1), then we can keep it required 


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "cmarteepants (via GitHub)" <gi...@apache.org>.
cmarteepants commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2769469797

   I feel strongly about TriggerDagRunOperator and the UI, and glad we're on the same page. If that's all we update, I can live with that. 
   
   For the API, I'm relying on feedback from DevRel that we are underestimating API usage and concern about the quantity of things that need to be changed (even if most of the changes are easy). I agree with you that if you are starting fresh, it's awkward to replace "now" with None though, if you fall in that category. 


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2775639325

   > UI: [#48690](https://github.com/apache/airflow/pull/48690)
   
   Thanks @bbovenzi 


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2770822355

   Is it too early in the major version lifetime to have a config for this? 😛 


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "phanikumv (via GitHub)" <gi...@apache.org>.
phanikumv commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2768326524

   cc @uranusjr 


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "uranusjr (via GitHub)" <gi...@apache.org>.
uranusjr commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2768417164

   I think it makes the most sense for TriggerDagRunOperator to default to `now()` if nothing is explicitly supplied. This is the current behaviour, and anyone using the operator is likely already OK with it. If the possibility of supplying *None* benefits some, they can opt into it explicitly.
   
   “Not supplying a value” does not *technically* apply to the UI since the date field is always there and always included in the request by the frontend. A more technically correct way to put it is what initial value we present to the user in the form. As long as there is an easy way to set the value to “now” or “empty” (instead of needing to manually click through the datetimepicker, which is a lot of work), either default should be fine. Personally I lean a little toward None, but defaulting to now is not a big deal either since the possibility of a conflict should be next to none (pun unintended).
   
   Personally I feel the API should not have a default at all, but this opinion was not received well when I proposed in Slack. If we must have a default, it should be now to match TriggerDagRunOperator. I want to state again that I still think not having a default is the correct way to go since the number of users relying on the API should be relatively low, and supplying a “now” value in the API is comparatively easy. But if the goal is to break as few people as possible _at any cost_, now is the correct default.


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2772839545

   UI: https://github.com/apache/airflow/pull/48690


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2758154998

   @vatsrahul1001 talk to me / constance to confirm requirements i was going to review the slack thread 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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed issue #48412: Manually triggered dags should have default logical_date and run_after of "right now"
URL: https://github.com/apache/airflow/issues/48412


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "cmarteepants (via GitHub)" <gi...@apache.org>.
cmarteepants commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2755540155

   Three scenarios we need to account for are:
   1. Manually triggering DAG Run via UI
   2. Triggering Dag Run via API
   3. Trigger Dag Run Operator usage


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "cmarteepants (via GitHub)" <gi...@apache.org>.
cmarteepants commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2783966074

   Bumping up to high now that lazy consensus has passed. Now that UI is done, priority is DagRunTrigger Operator. We can leave the API with the current `None` default. 


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "cmarteepants (via GitHub)" <gi...@apache.org>.
cmarteepants commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-2764687036

   Just started a lazy consensus vote: https://lists.apache.org/list.html?dev@airflow.apache.org


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


Re: [I] Manually triggered dags should have default logical_date and run_after of "right now" [airflow]

Posted by "sai3563 (via GitHub)" <gi...@apache.org>.
sai3563 commented on issue #48412:
URL: https://github.com/apache/airflow/issues/48412#issuecomment-4518167410

   Hello,
   
   It seems `logical_date` is still a required field in the API, None is accepted but not the default.
   
   I'm working on migration from Airflow 2 --> 3 for a large org & this change (logical_date mandatory) has become quite an issue for API migration.
   
   If there is consensus for the default to be now() (similar to UI & TriggerDagRunOperator), can we contribute code to make logical_date optional with default behaviour now()?


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