-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Feature: Added event_handler parameter in MSGraphAsyncOperator #42539
Conversation
… default event_handler
…so error messages get handled correctly in RequestAdapter
…ndulum dependency issues for backward compatibility
Dunno why following tests keeps failing, it succeeds locally:
|
Did you try reproducing it with upgraded boto: If you unfold the failed output you will see this: Upgrading boto3, botocore to latest version to run Amazon tests with them
Uninstalled 4 packages in 395ms
- aiobotocore==2.15.1
- opensearch-py==2.7.1
- s3fs==2024.9.0
- yandexcloud==0.320.0
+ uv pip install --python /usr/local/bin/python --upgrade boto3 botocore 'oss2>=2.14.0' 'cryptography<43.0.0' 'requests!=2.32.*,<3.0.0,>=2.24.0'
Resolved 19 packages in 2.87s
Prepared 3 packages in 438ms
Uninstalled 3 packages in 882ms
Installed 3 packages in 139ms
- boto3==1.35.23
+ boto3==1.35.34
- botocore==1.35.23
+ botocore==1.35.34
- requests==2.32.3
+ requests==2.31.0 Which can be locally reproduced with:
And then rerunning the tests. |
(It might also be transitive / accidental side effect) |
Apparently it was, it failed for days even after updates now it passes :) |
…nto feature/msgraph-event-handler
It looks that there were some changes in looker/kiota packages recently. Can you please rebase again and resolve conflicts and see where it is and ping me if you still see errors ? |
# Conflicts: # generated/provider_dependencies.json # providers/src/airflow/providers/microsoft/azure/provider.yaml
Resolved conflicts, will see how the build behaves. |
Everything is fine now after update and conflict resolution |
Woooohooo! |
…e#42539) * refactor: Added parameter in MSGraphAsyncOperator to allow overriding default event_handler * docs: Added docstring for event_handler parameter in MSGraphAsyncOperator * refactor: Fixed TestMSGraphAsyncOperator * refactor: Check if event is not None * refactor: Register the TextParseNodeFactory and JsonParseNodeFactory so error messages get handled correctly in RequestAdapter * refactor: Reorganized import for TestMSGraphAsyncOperator * refactor: Added missing kiota-serialization packages in azure provider * refactor: Updated provider dependencies * refactor: Reorganized import of TestKiotaRequestAdapterHook * refactor: Downgraded version of json kiota serialization * refactor: Updated provider dependencies * refactor: Put import of Context in TYPE_CHECKING block * refactor: Fixed lookup of tenant-id * refactor: Fixed kiota serialization dependencies to 1.0.0 to avoid pendulum dependency issues for backward compatibility * refactor: Updated provider dependencies * refactored: Fixed import of test_utils in test_dag_run --------- Co-authored-by: David Blain <[email protected]>
Added an event_handler parameter in MSGraphAsyncOperator which allows you to override the default implementation when needed. This can be handy when you want to handle certain failed event types returned by the triggerer. Also added a unit test for this new feature and updated docstring.
^ 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.