yash1thsa opened a new pull request, #56416:
URL: https://github.com/apache/airflow/pull/56416
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE - #55747 - https://github.com/apache/airflow/issues/55747
Root cause : Synchronous calls triggered underneath async functions. Main
issue is in Triggerer code that calls the hook. Triggerer is async by default.
But when it hits the hook, the error happens during the initialization itself.
Alternatives tried:
1. Create a asynchronous path in trigerrer - get_request_url_header_params,
get_connection, get_header etc. But this still did not stop the async to sync
issue.
2. Decouple hook from trigger. Handle the hook completely in operator class
itself.
Option#2 is cleaner and worked fine. Code has been tested in airflow UI and
corresponding test cases are added for both happy path and exceptions
<!-- Please keep an empty line above the dashes. -->
---
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]