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

[PR] Make `logical_date` optional in TriggerDAGRunPostBody schema [airflow]

jpizquierdo opened a new pull request, #52652:
URL: https://github.com/apache/airflow/pull/52652

   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #52627
   related: #52627
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   To fix #52627, `logical_date` is not anymore mandatory, it is optional
   


-- 
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: [PR] Make `logical_date` optional in TriggerDAGRunPostBody schema [airflow]

Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on PR #52652:
URL: https://github.com/apache/airflow/pull/52652#issuecomment-3025047580

   i think the point was that in airflow 2 you didn't have to provide a value and we didn't want to surprise people
   
   better to force them to choose rather than to leave it null by default
   
   but it's something that could be changed in a minor release.  


-- 
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: [PR] Make `logical_date` optional in TriggerDAGRunPostBody schema [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #52652:
URL: https://github.com/apache/airflow/pull/52652#issuecomment-3024987898

   Actually I think it was intentional to make it required. Let me try to find that conversation


-- 
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: [PR] Make `logical_date` optional in TriggerDAGRunPostBody schema [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #52652:
URL: https://github.com/apache/airflow/pull/52652#issuecomment-3024993404

   https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=337676722#Option2clarificationdocWIP-Resolutionofquestions
   
   ```
   Question 1b: triggering through REST API
   
   legacy connexion API will be removed and will not be changed as part of this
   in new API, when triggering a run logical date will be required field, and user may choose NULL
   
   


-- 
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: [PR] Make `logical_date` optional in TriggerDAGRunPostBody schema [airflow]

Posted by "pierrejeambrun (via GitHub)" <gi...@apache.org>.
pierrejeambrun commented on PR #52652:
URL: https://github.com/apache/airflow/pull/52652#issuecomment-3032436574

   Yes I think this is why we enforced an explicit value. Since now it can be None we didn't want runs to end up with 'None' logical_date, while the user actually relied on the old behavior that used to autogenerate the `logical_date` for him. This was a way to break on purpose in this ambiguous situation and ask the user to explicitely chose what's expected.


-- 
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: [PR] Make `logical_date` optional in TriggerDAGRunPostBody schema [airflow]

Posted by "jpizquierdo (via GitHub)" <gi...@apache.org>.
jpizquierdo commented on PR #52652:
URL: https://github.com/apache/airflow/pull/52652#issuecomment-3031016586

   I opened the issue because it made sense to me when I started reading release notes here:
   
   [The behavior of the POST /dags/{dag_id}/dagRuns endpoint has changed. If a logical_date is not explicitly provided when triggering a DAG via the REST API, it now defaults to None.](https://airflow.apache.org/docs/apache-airflow/stable/release_notes.html#rest-api-dag-trigger-behavior-updated)
   
   But it is true that if you keep reading, it says that you could have problems if you relied in autogenerated logical_date (my case, because in my app I was not setting logical_dste before). I did interpret that it was optional and not fully understand the doc.
   
   I let you guys for sure discuss about it and decide whatever fits best for the project. For the end-users I think that sending a null every time should be easy, in my case just a pydantic model with that field optional and set to None by 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: [PR] Make `logical_date` optional in TriggerDAGRunPostBody schema [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #52652: Make `logical_date` optional in TriggerDAGRunPostBody schema
URL: https://github.com/apache/airflow/pull/52652


-- 
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: [PR] Make `logical_date` optional in TriggerDAGRunPostBody schema [airflow]

Posted by "jpizquierdo (via GitHub)" <gi...@apache.org>.
jpizquierdo commented on PR #52652:
URL: https://github.com/apache/airflow/pull/52652#issuecomment-3025037339

   Oh I see, and what's the point to force a null value to be sent instead of use a default value which is null? Because for example if you were not using it in airflow 2 API, it is not backwards compatible. And if you want to set something and it is optional, you just set it


-- 
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: [PR] Make `logical_date` optional in TriggerDAGRunPostBody schema [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #52652:
URL: https://github.com/apache/airflow/pull/52652#issuecomment-3194759014

   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.


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