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 2022/08/04 09:19:23 UTC

[GitHub] [airflow] chethanuk-plutoflume opened a new pull request, #25529: AIP-47 - Migrate arangodb DAG to new design

chethanuk-plutoflume opened a new pull request, #25529:
URL: https://github.com/apache/airflow/pull/25529

   <!--
   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: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ 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 changes, an 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 a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
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] closed pull request #25529: AIP-47 - Migrate arangodb DAG to new design

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #25529: AIP-47 - Migrate arangodb DAG to new design
URL: https://github.com/apache/airflow/pull/25529


-- 
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 diff in pull request #25529: AIP-47 - Migrate arangodb DAG to new design

Posted by GitBox <gi...@apache.org>.
josh-fell commented on code in PR #25529:
URL: https://github.com/apache/airflow/pull/25529#discussion_r937862132


##########
tests/system/providers/arangodb/example_arangodb.py:
##########
@@ -0,0 +1,80 @@
+# 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.
+from datetime import datetime
+
+from airflow.models.dag import DAG
+from airflow.providers.arangodb.operators.arangodb import AQLOperator
+from airflow.providers.arangodb.sensors.arangodb import AQLSensor
+from tests.system.utils import get_test_env_id
+
+ENV_ID = get_test_env_id()
+DAG_ID = "example_arangodb_operator"
+
+with DAG(
+    DAG_ID,
+    start_date=datetime(2021, 1, 1),
+    tags=['example'],

Review Comment:
   ```suggestion
       schedule_interval='@once',
       tags=['example'],
   ```
   Looks like [this parameter is explicitly needed](https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-47+New+design+of+Airflow+System+Tests#:~:text=Make%20sure%20to%20include%20these%20parameters%20into%20DAG%20call%3A) based on the AIP docs.



##########
docs/apache-airflow-providers-arangodb/operators/index.rst:
##########
@@ -53,14 +53,14 @@ AQL query in `ArangoDB <https://www.arangodb.com/>`__.
 
 An example for waiting a document in **students** collection with student name **judy** can be implemented as following:
 
-.. exampleinclude:: /../../airflow/providers/arangodb/example_dags/example_arangodb.py
+.. exampleinclude:: /../../tests/system/providers/arangodb/example_arangodb.py
     :language: python
     :start-after: [START howto_aql_sensor_arangodb]

Review Comment:
   ```suggestion
       :dedent: 4
       :start-after: [START howto_aql_sensor_arangodb]
   ```



##########
docs/apache-airflow-providers-arangodb/operators/index.rst:
##########
@@ -32,15 +32,15 @@ further process the result using **result_processor** Callable as you like.
 
 An example of Listing all Documents in **students** collection can be implemented as following:
 
-.. exampleinclude:: /../../airflow/providers/arangodb/example_dags/example_arangodb.py
+.. exampleinclude:: /../../tests/system/providers/arangodb/example_arangodb.py
     :language: python
     :start-after: [START howto_aql_operator_arangodb]

Review Comment:
   ```suggestion
       :dedent: 4
       :start-after: [START howto_aql_operator_arangodb]
   ```



##########
docs/apache-airflow-providers-arangodb/operators/index.rst:
##########
@@ -53,14 +53,14 @@ AQL query in `ArangoDB <https://www.arangodb.com/>`__.
 
 An example for waiting a document in **students** collection with student name **judy** can be implemented as following:
 
-.. exampleinclude:: /../../airflow/providers/arangodb/example_dags/example_arangodb.py
+.. exampleinclude:: /../../tests/system/providers/arangodb/example_arangodb.py
     :language: python
     :start-after: [START howto_aql_sensor_arangodb]
     :end-before: [END howto_aql_sensor_arangodb]
 
 Similar to **AQLOperator**, You can also provide file template to load query -
 
-.. exampleinclude:: /../../airflow/providers/arangodb/example_dags/example_arangodb.py
+.. exampleinclude:: /../../tests/system/providers/arangodb/example_arangodb.py
     :language: python
     :start-after: [START howto_aql_sensor_template_file_arangodb]

Review Comment:
   ```suggestion
       :dedent: 4
       :start-after: [START howto_aql_sensor_template_file_arangodb]
   ```



##########
docs/apache-airflow-providers-arangodb/operators/index.rst:
##########
@@ -32,15 +32,15 @@ further process the result using **result_processor** Callable as you like.
 
 An example of Listing all Documents in **students** collection can be implemented as following:
 
-.. exampleinclude:: /../../airflow/providers/arangodb/example_dags/example_arangodb.py
+.. exampleinclude:: /../../tests/system/providers/arangodb/example_arangodb.py
     :language: python
     :start-after: [START howto_aql_operator_arangodb]
     :end-before: [END howto_aql_operator_arangodb]
 
 You can also provide file template (.sql) to load query, remember path is relative to **dags/** folder, if you want to provide any other path
 please provide **template_searchpath** while creating **DAG** object,
 
-.. exampleinclude:: /../../airflow/providers/arangodb/example_dags/example_arangodb.py
+.. exampleinclude:: /../../tests/system/providers/arangodb/example_arangodb.py
     :language: python
     :start-after: [START howto_aql_operator_template_file_arangodb]

Review Comment:
   ```suggestion
       :dedent: 4
       :start-after: [START howto_aql_operator_template_file_arangodb]
   ```
   Now that the `START/END` markers have been indented in the system test example DAG, this option should be added to the `exampleinclude::` directives in the docs so the code snippets are rendered properly.



-- 
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 #25529: AIP-47 - Migrate arangodb DAG to new design

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

   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