-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Refactor result_processor and event_handler signatures in MSGraphAsyncOperator #46637
Merged
Conversation
This file contains 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
…hat context is the last parameter
…nd make copy of context before expanding to avoid deprecation warnings
…KiotaRequestAdapterHook
# Conflicts: # providers/microsoft/azure/tests/unit/microsoft/azure/operators/test_msgraph.py # providers/microsoft/azure/tests/unit/microsoft/azure/sensors/test_msgraph.py
eladkal
approved these changes
Feb 19, 2025
ntr
pushed a commit
to ntr/airflow
that referenced
this pull request
Feb 20, 2025
…cOperator (apache#46637) * refactor: Refactor result_processor and event_handler signatures so that context is the last parameter * refactor: Reformatted TestMSGraphAsyncOperator * refactor: Ignore types * refactor: Ignore types * refactor: Changed types xcom helper methods * refactor: Fixed MSGraphSensor * refactor: Fixed TestMSGraphSensor * refactor: Changed type pull_xcom * refactor: Removed white line * refactor: Reduced timeout of sensor in tests to 5 seconds * refactor: Extracted common execute_callback method for the handlers and make copy of context before expanding to avoid deprecation warnings * refactor: Changed types of execute_callable * refactor: Changed func parameter type of execute_callable * refactor: Added test for execute_callable * refactor: Changed func type for execute_callable as it still fails * refactor: Added test for request_information with custom host in TestKiotaRequestAdapterHook * refactor: Ignore types in execute_callable * refactor: Reformatted test_request_information_with_custom_host * refactor: Reformatted test_execute_callable * refactor: Context should not be in type checking block * refactor: Ignore type event_handler * refactor: Context should be type checked just like in main * refactor: Fixed TestMSGraphAsyncOperator --------- Co-authored-by: David Blain <[email protected]> Co-authored-by: David Blain <[email protected]>
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.
This PR refactors the result_processor and event_handler signatures in MSGraphAsyncOperator so that the context parameter is always the latest parameter and acts like a kwargs, just like all other Airflow operators do like for example with the PythonOperator. The old signatures are still supported but will log a warning.
^ 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.