-
Notifications
You must be signed in to change notification settings - Fork 16.4k
refresh connection if an exception is caught in "AzureDataFactory" #32323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
potiuk
merged 8 commits into
apache:main
from
astronomer:refresh-conn-for-data-factory-operator
Jul 4, 2023
Merged
refresh connection if an exception is caught in "AzureDataFactory" #32323
potiuk
merged 8 commits into
apache:main
from
astronomer:refresh-conn-for-data-factory-operator
Jul 4, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26248fb to
36620f4
Compare
…zureDataFactoryAsyncHook
…lineRunStatusSensorTrigger
36620f4 to
42d81b7
Compare
phanikumv
reviewed
Jul 3, 2023
…FactoryAsyncHook get_pipeline_run and get_adf_pipeline_run_status These exception should be caught in the triggerer instead.
d6323f9 to
79195e7
Compare
…ht raise an exception
Adaverse
reviewed
Jul 4, 2023
pankajastro
reviewed
Jul 4, 2023
potiuk
approved these changes
Jul 4, 2023
69 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's the issue?
When waiting for a long-running data factory pipeline run, it's possible that the Azure connection is expired and will need to be refreshed. This happens in (AzureDataFactoryPipelineRunStatusSensor(..., deferrable=True), and AzureDataFactoryRunPipelineOperator which will need changes in the following code sections.
AzureDataFactoryPipelineRunStatusSensor(..., deferrable=True)
airflow/airflow/providers/microsoft/azure/triggers/data_factory.py
Lines 73 to 77 in 1f22db7
AzureDataFactoryRunPipelineOperator(..., deferrable=True)
airflow/airflow/providers/microsoft/azure/triggers/data_factory.py
Lines 145 to 149 in 1f22db7
AzureDataFactoryRunPipelineOperator(..., deferrable=False)
airflow/airflow/providers/microsoft/azure/hooks/data_factory.py
Line 831 in 1f22db7
What's changed?
Re-establish connection if an exception is caught in these sections, and set
executed_after_refresh_tokentoFalse. If the exception does not relate to connection refresh, then the next round of status checking will still raise an exception and won't refresh the toekn^ 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.rstor{issue_number}.significant.rst, in newsfragments.