Skip to content

Conversation

@dabla
Copy link
Contributor

@dabla dabla commented Sep 27, 2024

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.

@dabla dabla marked this pull request as draft September 27, 2024 09:25
@dabla dabla marked this pull request as ready for review September 29, 2024 11:19
@potiuk
Copy link
Member

potiuk commented Oct 7, 2024

(It might also be transitive / accidental side effect)

@dabla
Copy link
Contributor Author

dabla commented Oct 8, 2024

(It might also be transitive / accidental side effect)

Apparently it was, it failed for days even after updates now it passes :)

@potiuk
Copy link
Member

potiuk commented Oct 14, 2024

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
@dabla
Copy link
Contributor Author

dabla commented Oct 14, 2024

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 ?

Resolved conflicts, will see how the build behaves.

@dabla
Copy link
Contributor Author

dabla commented Oct 14, 2024

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 ?

Everything is fine now after update and conflict resolution

@potiuk potiuk merged commit 2b101e2 into apache:main Oct 15, 2024
@potiuk
Copy link
Member

potiuk commented Oct 15, 2024

Woooohooo!

@dabla dabla deleted the feature/msgraph-event-handler branch October 15, 2024 07:35
R7L208 pushed a commit to R7L208/airflow that referenced this pull request Oct 17, 2024
…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 <david.blain@infrabel.be>
harjeevanmaan pushed a commit to harjeevanmaan/airflow that referenced this pull request Oct 23, 2024
…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 <david.blain@infrabel.be>
PaulKobow7536 pushed a commit to PaulKobow7536/airflow that referenced this pull request Oct 24, 2024
…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 <david.blain@infrabel.be>
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
…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 <david.blain@infrabel.be>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants