Skip to content

Comments

AIP-47 - Migrate arangodb DAG to new design#25529

Closed
chethanuk wants to merge 1 commit intoapache:mainfrom
chethanuk:AIP-arangodb
Closed

AIP-47 - Migrate arangodb DAG to new design#25529
chethanuk wants to merge 1 commit intoapache:mainfrom
chethanuk:AIP-arangodb

Conversation

@chethanuk
Copy link
Contributor


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
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.

Copy link
Contributor

@josh-fell josh-fell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, these system tests should be self-contained. The DAG that will be run references ArangoDB documents and data that aren't created or available as part of the test in a resources/ directory as well as missing SQL files.

I would suggest taking a look at the Postgres provider system tests. Tables are created, inserted into, dropped all within the same test, and all SQL is available so it can be executed straight away as written.

Side note, it looks like the other __init__ files for the other providers are unrelated and not needed.

.. 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]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:start-after: [START howto_aql_operator_template_file_arangodb]
: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.

.. 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]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:start-after: [START howto_aql_sensor_arangodb]
:dedent: 4
:start-after: [START howto_aql_sensor_arangodb]

.. 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]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:start-after: [START howto_aql_sensor_template_file_arangodb]
:dedent: 4
:start-after: [START howto_aql_sensor_template_file_arangodb]

.. 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]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:start-after: [START howto_aql_operator_arangodb]
:dedent: 4
:start-after: [START howto_aql_operator_arangodb]

with DAG(
DAG_ID,
start_date=datetime(2021, 1, 1),
tags=['example'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tags=['example'],
schedule_interval='@once',
tags=['example'],

Looks like this parameter is explicitly needed based on the AIP docs.

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Sep 19, 2022
@github-actions github-actions bot closed this Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers area:system-tests kind:documentation stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants