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 2021/12/30 05:39:14 UTC

[GitHub] [airflow] gbonazzoli opened a new issue #20579: Airflow 2.2.3 : "airflow dags trigger" command gets "Calling `DAG.create_dagrun()` without an explicit data interval is deprecated"

gbonazzoli opened a new issue #20579:
URL: https://github.com/apache/airflow/issues/20579


   ### Apache Airflow version
   
   2.2.3 (latest released)
   
   ### What happened
   
   When issuing the following command:
   
   `airflow dags trigger 'VMWARE_BACKUP'  --conf '{"VM_NAME":"psfiplb1"}'`
   
   the system replays with:
   
   ```
   /usr/local/lib/python3.8/dist-packages/airflow/api/common/experimental/trigger_dag.py:85 DeprecationWarning: Calling `DAG.create_dagrun()` without an explicit data interval is deprecated
   Created <DagRun VMWARE_BACKUP @ 2021-12-31T00:00:00+00:00: manual__2021-12-31T00:00:00+00:00, externally triggered: True>
   ```
   
   ### What you expected to happen
   
   I have no other switch parameter to choose for avoiding the deprecation warning.
   
   My concern is about what will happen to the command when the deprecation will transforms itself in an error.
   
   ### How to reproduce
   
   _No response_
   
   ### Operating System
   
   Ubuntu 20.04.3 LTS
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-celery==2.1.0
   apache-airflow-providers-ftp==2.0.1
   apache-airflow-providers-http==2.0.1
   apache-airflow-providers-imap==2.0.1
   apache-airflow-providers-microsoft-mssql==2.0.1
   apache-airflow-providers-microsoft-winrm==2.0.1
   apache-airflow-providers-openfaas==2.0.0
   apache-airflow-providers-oracle==2.0.1
   apache-airflow-providers-samba==3.0.1
   apache-airflow-providers-sftp==2.3.0
   apache-airflow-providers-sqlite==2.0.1
   apache-airflow-providers-ssh==2.3.0
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   Airflow inside an LXD continer
   
   ### 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

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



[GitHub] [airflow] uranusjr commented on issue #20579: Airflow 2.2.3 : "airflow dags trigger" command gets "Calling `DAG.create_dagrun()` without an explicit data interval is deprecated"

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


   The entire experiemental API is deprecated anyway so I’m not going to bother fixing this. Feel free to submit a PR if you are bothered by it. The fix is easy; just pass `data_interval=(execution_date, execution_date)` to `create_dagrun()`.


-- 
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] mingshi-wang commented on issue #20579: Airflow 2.2.3 : "airflow dags trigger" command gets "Calling `DAG.create_dagrun()` without an explicit data interval is deprecated"

Posted by GitBox <gi...@apache.org>.
mingshi-wang commented on issue #20579:
URL: https://github.com/apache/airflow/issues/20579#issuecomment-1008583047


   @uranusjr @eladkal I'd like to work on this issue as a warmup contribution. 


-- 
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] potiuk commented on issue #20579: Airflow 2.2.3 : "airflow dags trigger" command gets "Calling `DAG.create_dagrun()` without an explicit data interval is deprecated"

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


   I think we need to take a  close look and also fix the CLI (and execution date as parameter does not properly reflect the curent logical_date approach)


-- 
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] gbonazzoli commented on issue #20579: Airflow 2.2.3 : "airflow dags trigger" command gets "Calling `DAG.create_dagrun()` without an explicit data interval is deprecated"

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


   I've tried. But the deprecation warning is still there.
   
   ```
   root@new-airflow:~# airflow dags trigger 'VMWARE_BACKUP' -e 2021-12-31T13:00:00+00:00 --conf '{"VM_NAME":"psfiplb1"}'
   [2021-12-30 13:01:48,002] {__init__.py:38} INFO - Loaded API auth backend: <module 'airflow.api.auth.backend.basic_auth' from '/usr/local/lib/python3.8/dist-packages/airflow/api/auth/backend/basic_auth.py'>
   /usr/local/lib/python3.8/dist-packages/airflow/api/common/experimental/trigger_dag.py:85 DeprecationWarning: Calling `DAG.create_dagrun()` without an explicit data interval is deprecated
   Created <DagRun VMWARE_BACKUP @ 2021-12-31T13:00:00+00:00: manual__2021-12-31T13:00:00+00:00, externally triggered: True>
   
   ```


-- 
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] potiuk closed issue #20579: Airflow 2.2.3 : "airflow dags trigger" command gets "Calling `DAG.create_dagrun()` without an explicit data interval is deprecated"

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #20579:
URL: https://github.com/apache/airflow/issues/20579


   


-- 
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] potiuk commented on issue #20579: Airflow 2.2.3 : "airflow dags trigger" command gets "Calling `DAG.create_dagrun()` without an explicit data interval is deprecated"

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


   Try "execution-date" ? 
   
   ````
   usage: airflow dags trigger [-h] [-c CONF] [-e EXEC_DATE] [-r RUN_ID]
                               [-S SUBDIR]
                               dag_id
   
   Trigger a DAG run
   
   positional arguments:
     dag_id                The id of the dag
   
   optional arguments:
     -h, --help            show this help message and exit
     -c CONF, --conf CONF  JSON string that gets pickled into the DagRun's conf attribute
     -e EXEC_DATE, --exec-date EXEC_DATE
                           The execution date of the DAG
     -r RUN_ID, --run-id RUN_ID
                           Helps to identify this run
     -S SUBDIR, --subdir SUBDIR
                           File location or directory from which to look for the dag. Defaults to '[AIRFLOW_HOME]/dags' where [AIRFLOW_HOME] is the value you set for 'AIRFLOW_HOME' config you set in 'airflow.cfg' 
   ```
   
   


-- 
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] potiuk closed issue #20579: Airflow 2.2.3 : "airflow dags trigger" command gets "Calling `DAG.create_dagrun()` without an explicit data interval is deprecated"

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #20579:
URL: https://github.com/apache/airflow/issues/20579


   


-- 
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 #20579: Airflow 2.2.3 : "airflow dags trigger" command gets "Calling `DAG.create_dagrun()` without an explicit data interval is deprecated"

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


   Feel free!


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