Skip to content

Conversation

@josh-fell
Copy link
Contributor

There is an ongoing effort to enhance example DAGs by setting static values for start_date (already complete for core example DAGs), cleaning up and/or implementing useful default_args, and removing/limiting the use of redundant, default connection ID values.

This PR mainly addresses these 3 cleanup areas in example DAGs across Microsoft providers. There are other small docs updates.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.

default_args={"container_name": AZURE_CONTAINER_NAME, "blob_name": BLOB_NAME},
) as dag:

# [START how_to_wait_for_blob]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this tag as it was not being used in any documentation.

},
schedule_interval=timedelta(1),
default_args={'retries': 1},
schedule_interval=timedelta(days=1),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated schedule_interval to use keyword args to be more explicit.

catchup=False,
) as dag:

cmd = 'ls -l'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed unused variable in DAG.


To get information about jobs within a Azure Blob Storage use:
:class:`~airflow.providers.microsoft.azure.transfers.azure_blob_to_gcs.AzureBlobStorageToGCSOperator`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Space added for better formatting.

Copy link
Contributor

@ephraimbuddy ephraimbuddy left a comment

Choose a reason for hiding this comment

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

LGTM

Some of these examples are used in system tests. Can you verify them by executing the system tests in https://github.com/apache/airflow/tree/main/tests/providers/microsoft/azure/transfers.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Oct 20, 2021
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@ephraimbuddy ephraimbuddy merged commit ceb2b53 into apache:main Oct 20, 2021
@josh-fell
Copy link
Contributor Author

@ephraimbuddy FYI - I've confirmed Azure system tests pass locally.

image

@josh-fell josh-fell deleted the microsoft-providers-default-args-start-date-cleanup branch October 21, 2021 18:33
sharon2719 pushed a commit to sharon2719/airflow that referenced this pull request Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers kind:documentation okay to merge It's ok to merge this PR as it does not require more tests provider:microsoft-azure Azure-related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants