You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Nidhs01 (via GitHub)" <gi...@apache.org> on 2026/03/21 08:10:55 UTC
[PR] Add exception handling tests for GenAI CountTokens operator [airflow]
Nidhs01 opened a new pull request, #64027:
URL: https://github.com/apache/airflow/pull/64027
### What does this PR do?
Adds unit tests for `GenAICountTokensOperator` to verify correct execution behavior and proper exception propagation.
### Why is this change needed?
Currently, there is no explicit test ensuring that `ClientError` exceptions raised from the underlying hook are properly propagated by the operator. This PR improves test coverage and ensures robustness of error handling.
### What changes were made?
- Added unit test for successful execution of `GenAICountTokensOperator`
- Added unit test to verify that `ClientError` is raised correctly when the hook fails
- Used mocking to isolate operator behavior
### Does this PR introduce any user-facing changes?
No.
### How was this tested?
- Ran pytest locally:
- ### What does this PR do?
Adds unit tests for `GenAICountTokensOperator` to verify correct execution behavior and proper exception propagation.
### Why is this change needed?
Currently, there is no explicit test ensuring that `ClientError` exceptions raised from the underlying hook are properly propagated by the operator. This PR improves test coverage and ensures robustness of error handling.
### What changes were made?
- Added unit test for successful execution of `GenAICountTokensOperator`
- Added unit test to verify that `ClientError` is raised correctly when the hook fails
- Used mocking to isolate operator behavior
### Does this PR introduce any user-facing changes?
No.
### How was this tested?
- Ran pytest locally:
### What does this PR do?
Adds unit tests for `GenAICountTokensOperator` to verify correct execution behavior and proper exception propagation.
### Why is this change needed?
Currently, there is no explicit test ensuring that `ClientError` exceptions raised from the underlying hook are properly propagated by the operator. This PR improves test coverage and ensures robustness of error handling.
### What changes were made?
- Added unit test for successful execution of `GenAICountTokensOperator`
- Added unit test to verify that `ClientError` is raised correctly when the hook fails
- Used mocking to isolate operator behavior
### Does this PR introduce any user-facing changes?
No.
### How was this tested?
- Ran pytest locally: pytest airflow/providers/google/cloud/tests/unit/google/cloud/operators/test_gen_ai.py
- - All tests passed successfully
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add exception handling tests for GenAI CountTokens operator [airflow]
Posted by "Nidhs01 (via GitHub)" <gi...@apache.org>.
Nidhs01 closed pull request #64027: Add exception handling tests for GenAI CountTokens operator
URL: https://github.com/apache/airflow/pull/64027
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add exception handling tests for GenAI CountTokens operator [airflow]
Posted by "gopidesupavan (via GitHub)" <gi...@apache.org>.
gopidesupavan commented on PR #64027:
URL: https://github.com/apache/airflow/pull/64027#issuecomment-4102856192
@Nidhs01 this has alot of unnecessary changes please fix them before making ready for review, am converting to draft
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add exception handling tests for GenAI CountTokens operator [airflow]
Posted by "Nidhs01 (via GitHub)" <gi...@apache.org>.
Nidhs01 commented on PR #64027:
URL: https://github.com/apache/airflow/pull/64027#issuecomment-4140650572
Hi,
I’ve addressed the previous feedback and marked the PR as ready for review. Please let me know if any further improvements are needed. Thanks!
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add exception handling tests for GenAI CountTokens operator [airflow]
Posted by "Nidhs01 (via GitHub)" <gi...@apache.org>.
Nidhs01 commented on PR #64027:
URL: https://github.com/apache/airflow/pull/64027#issuecomment-4147989881
Hi,
Thanks for your feedback on this PR — I realized it still contained unrelated changes, which made it unsuitable for proper review.
To address this, I’ve created a new clean PR that includes only the relevant test updates:
https://github.com/apache/airflow/pull/64360
This should make the changes easier to review and aligned with the project’s contribution standards.
I’ll go ahead and close this PR to avoid confusion.
Really appreciate your guidance here — it helped me improve the quality of the contribution.
Thanks!
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add exception handling tests for GenAI CountTokens operator [airflow]
Posted by "Nidhs01 (via GitHub)" <gi...@apache.org>.
Nidhs01 commented on PR #64027:
URL: https://github.com/apache/airflow/pull/64027#issuecomment-4110951014
> @Nidhs01 this has alot of unnecessary changes please fix them before making ready for review, am converting to draft
Thanks for the feedback! I've cleaned up the PR and ensured only relevant tests are included. Please let me know if anything else needs improvement.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add exception handling tests for GenAI CountTokens operator [airflow]
Posted by "Nidhs01 (via GitHub)" <gi...@apache.org>.
Nidhs01 commented on PR #64027:
URL: https://github.com/apache/airflow/pull/64027#issuecomment-4135979030
Hi,
Just checking if this PR could be reviewed when possible.
Happy to make any changes. Thanks!
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add exception handling tests for GenAI CountTokens operator [airflow]
Posted by "jscheffl (via GitHub)" <gi...@apache.org>.
jscheffl commented on PR #64027:
URL: https://github.com/apache/airflow/pull/64027#issuecomment-4147729178
Please remove all unrelated changed, in this way the PR is not acceptable.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org