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/11/16 02:46:47 UTC

[GitHub] [airflow] josh-fell opened a new pull request #19607: Clean up dynamic `start_date` values from docs

josh-fell opened a new pull request #19607:
URL: https://github.com/apache/airflow/pull/19607


   This PR attempts to remove the remaining instances of uses dynamic values for `start_date` across the existing docs and added `catchup=False` where applicable as it is the latest best practice for examples (see thread [here](https://github.com/apache/airflow/pull/19237#discussion_r737875169)).
   
   Also included some trivial `default_args` cleanup that was missing earlier example DAG updates.
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.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] josh-fell commented on a change in pull request #19607: Clean up dynamic `start_date` values from docs

Posted by GitBox <gi...@apache.org>.
josh-fell commented on a change in pull request #19607:
URL: https://github.com/apache/airflow/pull/19607#discussion_r749861142



##########
File path: airflow/example_dags/example_subdag_operator.py
##########
@@ -19,29 +19,29 @@
 """Example DAG demonstrating the usage of the SubDagOperator."""
 
 # [START example_subdag_operator]
+from datetime import datetime
+
 from airflow import DAG
 from airflow.example_dags.subdags.subdag import subdag
 from airflow.operators.dummy import DummyOperator
 from airflow.operators.subdag import SubDagOperator
-from airflow.utils.dates import days_ago
 
 DAG_NAME = 'example_subdag_operator'
 
-args = {

Review comment:
       Update this to a more relevant example/use of `default_args` other than `owner`. Some could argue setting `owner` _might_ be irrelevant with RBAC and has been removed where applicable in previous example DAG cleanup PRs.




-- 
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] github-actions[bot] commented on pull request #19607: Clean up dynamic `start_date` values from docs

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #19607:
URL: https://github.com/apache/airflow/pull/19607#issuecomment-969888004


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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] josh-fell commented on a change in pull request #19607: Clean up dynamic `start_date` values from docs

Posted by GitBox <gi...@apache.org>.
josh-fell commented on a change in pull request #19607:
URL: https://github.com/apache/airflow/pull/19607#discussion_r749861142



##########
File path: airflow/example_dags/example_subdag_operator.py
##########
@@ -19,29 +19,29 @@
 """Example DAG demonstrating the usage of the SubDagOperator."""
 
 # [START example_subdag_operator]
+from datetime import datetime
+
 from airflow import DAG
 from airflow.example_dags.subdags.subdag import subdag
 from airflow.operators.dummy import DummyOperator
 from airflow.operators.subdag import SubDagOperator
-from airflow.utils.dates import days_ago
 
 DAG_NAME = 'example_subdag_operator'
 
-args = {

Review comment:
       Update this to a more relevant example/use of `default_args` other than `owner`. (Some could argue setting `owner` _might_ be irrelevant with RBAC.)




-- 
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 pull request #19607: Clean up dynamic `start_date` values from docs

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #19607:
URL: https://github.com/apache/airflow/pull/19607#issuecomment-971835806


   There are warnings in "test providers" but those were already fixed in main and the rest of the examples import well. The other errors are unrelated.


-- 
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] josh-fell commented on a change in pull request #19607: Clean up dynamic `start_date` values from docs

Posted by GitBox <gi...@apache.org>.
josh-fell commented on a change in pull request #19607:
URL: https://github.com/apache/airflow/pull/19607#discussion_r749861858



##########
File path: UPDATING.md
##########
@@ -165,8 +165,9 @@ Similarly, `DAG.concurrency` has been renamed to `DAG.max_active_tasks`.
 ```python
 dag = DAG(
     dag_id="example_dag",
+    start_date=datetime(2021, 1, 1),
+    catchup=False,
     concurrency=3,
-    start_date=days_ago(2),

Review comment:
       Seeing as this doc is meant to keep users up-to-date on any backwards compat, this was added for completeness but let me know if this is unnecessary.




-- 
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 merged pull request #19607: Clean up dynamic `start_date` values from docs

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #19607:
URL: https://github.com/apache/airflow/pull/19607


   


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