Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAP-33915: Use the new exception handler for the Chat view #1478

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Conversation

manstis
Copy link
Contributor

@manstis manstis commented Jan 3, 2025

Jira Issue: https://issues.redhat.com/browse/AAP-33915

Description

Internal refactoring of existing code.

Testing

N/A. Internal refactoring of existing code.

Steps to test

N/A. Internal refactoring of existing code.

Scenarios tested

N/A. Internal refactoring of existing code.

Production deployment

  • This code change is ready for production on its own
  • This code change requires the following considerations before going to production:

segment_events[0]["properties"]["exception"],
"An exception <class 'ansible_ai_connect.ai.api.exceptions."
"ChatbotInvalidResponseException'> occurred during a chat generation",
segment_events[0]["properties"]["problem"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change.

AACSAPIView uses Schema1Event.exception: bool to indicate whether an exception occurred. Schema1Event.problem contains the exception message. Is this going to cause Marty etc issues?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, well at least if he's using this field as for reports in Amplitude. Although this looks not a blocker, we just need to let him know in order to "refactor", if necessary, any query.

Also @manstis this is a good candidate to make the integration tests to fail :) I think we're doing assertions over this field, it worth checking too, IMO :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I knew the way we use this field is not always consistent depending on the view and I would like to converge to the new approach.

Feel free to object/cry/shout :-).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@romartin I could only find these tests. This seems to only be a basic sanity check. Do you know of any others?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh @manstis , correct! Sorry for the confusion.

Copy link
Contributor

@romartin romartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manstis code looks good to me, just tried to answer some of your Qs.

@manstis manstis marked this pull request as ready for review January 8, 2025 12:17
@manstis manstis requested review from goneri and romartin January 8, 2025 12:17
@manstis manstis changed the title [DRAFT] AAP-33915: Use the new exception handler for the Chat view AAP-33915: Use the new exception handler for the Chat view Jan 8, 2025
@manstis manstis merged commit 05fcb28 into main Jan 8, 2025
11 checks passed
@manstis manstis deleted the AAP-33915 branch January 8, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants