eladkal commented on a change in pull request #5998: [AIRFLOW-5398] Update
contrib example DAGs to context manager
URL: https://github.com/apache/airflow/pull/5998#discussion_r321721827
##########
File path: airflow/contrib/example_dags/example_azure_cosmosdb_sensor.py
##########
@@ -41,24 +41,25 @@
'email_on_retry': False
}
-dag = DAG('example_azure_cosmosdb_sensor', default_args=default_args)
+with DAG(
+ dag_id='example_azure_cosmosdb_sensor',
+ default_args=default_args
+) as dag:
Review comment:
I followed GCP examples :
https://github.com/apache/airflow/blob/master/airflow/gcp/example_dags/example_cloud_sql.py#L186
https://github.com/apache/airflow/blob/master/airflow/gcp/example_dags/example_dataproc.py#L53
I removed `dag.doc` as it doesn't appear in all examples and I think it
should be consistent.
There are many optional settings that can be defined but in my point of view
example should be simple and to the point. If something isn't required for the
behavior/usage you want to show then it shouldn't be there.
WDYT?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services