Add unit tests for Gen AI operator exception handling.#61790
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
c194650 to
b74a1ba
Compare
SameerMesiah97
left a comment
There was a problem hiding this comment.
Looks fine (conditional on CI passing). I have left a few comments to refine the PR.
There is one general point I wanted to raise. It seems like for each test, you are asserting a different exception type. For some it's ClientError, but for others it's AirflowException or RuntimeError. If this reflects variations in the underlying semantics of the different operators, then it is perfectly fine. But if this is accidental, I would try to address this as well.
shahar1
left a comment
There was a problem hiding this comment.
It seems that you accidentally added unrelated commits to this PR - please fix.
1d645ba to
2fdece7
Compare
95f0be9 to
053b99d
Compare
pierrejeambrun
left a comment
There was a problem hiding this comment.
IT just needs a tiny bit adjustment to fix the CI if you don't mind.
053b99d to
ab4ab76
Compare
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
* Add unit tests for Gen AI operator exception handling. * Remove strict match assertions from Gen AI operator unit tests. * Fix ClientError instantiation. * Fix ClientError exception for lowest-direct-dependencies test.
* Add unit tests for Gen AI operator exception handling. * Remove strict match assertions from Gen AI operator unit tests. * Fix ClientError instantiation. * Fix ClientError exception for lowest-direct-dependencies test.
* Add unit tests for Gen AI operator exception handling. * Remove strict match assertions from Gen AI operator unit tests. * Fix ClientError instantiation. * Fix ClientError exception for lowest-direct-dependencies test.
This PR adds unit tests for exception handling for all relevant Gen AI operators as part of #61261.
GenAIGenerateContentOperator,GenAIGeminiListBatchJobsOperator,GenAICountTokensOperator(Handled in Add unit tests for exceptions in GCP gen. ai operators #61261 by other contributors).