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 2020/03/30 00:30:11 UTC

[GitHub] [airflow] dimberman opened a new issue #7996: Assigning operator to DAG via bitwise composition does not pickup default args

dimberman opened a new issue #7996: Assigning operator to DAG via bitwise composition does not pickup default args
URL: https://github.com/apache/airflow/issues/7996
 
 
   
   
   Ticket was created 17/Feb/17 02:58
   
   **Description**
   
   This is only the case when the operator does not specify dag=dag and is not initialized within a DAG's context manager (due to https://github.com/apache/incubator-airflow/blob/fb0c5775cda4f84c07d8d5c0e6277fc387c172e6/airflow/utils/decorators.py#L50)
   
   Example:
   
   
   default_args = {
       'owner': 'airflow', 
       'start_date': datetime(2017, 2, 1)
   }
   dag = DAG('my_dag', default_args=default_args)
   dummy = DummyOperator(task_id='dummy')
   
   dag >> dummy
   
   
   
   This will raise a Task is missing the start_date parameter. I think this should probably be allowed because I assume the purpose of supporting dag >> op was to allow delayed assignment of an operator to a DAG. 
   
   I believe to fix this, on assignment, we would need to go back and go through dag.default_args to see if any of those attrs weren't explicitly set on task...not the cleanest.
   
   **Use case / motivation**
   
   **Related Issues**
   
   Moved here from https://issues.apache.org/jira/browse/AIRFLOW-883

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] mik-laj commented on issue #7996: Assigning operator to DAG via bitwise composition does not pickup default args

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #7996: Assigning operator to DAG via bitwise composition does not pickup default args
URL: https://github.com/apache/airflow/issues/7996#issuecomment-605731324
 
 
   @ashb Haven't you ever fixed 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] ashb commented on issue #7996: Assigning operator to DAG via bitwise composition does not pickup default args

Posted by GitBox <gi...@apache.org>.
ashb commented on issue #7996: Assigning operator to DAG via bitwise composition does not pickup default args
URL: https://github.com/apache/airflow/issues/7996#issuecomment-605880078
 
 
   @mik-laj I had most of a solution in #5598, the question was if we want to support it at all or drop bitshifting dags in 2.0. I think that was what we decided on instead?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services