Skip to content

Conversation

@dabla
Copy link
Contributor

@dabla dabla commented Apr 24, 2024

Moved the logic which calls the MSGraph endpoint from MSGraphTrigger to the run-method of the KiotaRequestAdapterHook. That way we have the same approach as with the HttpHook and HttpOperator as in the future the dream would be that both could become one. This is also in line with the wanted approach in Airflow to have less operators (e.g. thus more generic one) which can use interchangeable hooks to achieve the same goal but with less operators (and thus more specialized hooks).

The Hook will also handle HTTP statuc codes from the response, if not valid the corresponding AirflowException will be thrown.

^ 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 changed the title Moved low-level logic to call endpoint from trigger to run method hook MSGraph Implement run-method on KiotaRequestAdapterHook and move logic away from triggerer to hook Apr 24, 2024
@potiuk
Copy link
Member

potiuk commented Apr 25, 2024

Nice. Indeed this way is much more in-line with the general approach of Airflow.

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