Fix storing messages for summarizing reviews
What does this MR do and why?
Issue: #420870 (closed)
Fix storing messages for summarizing reviews
This should have been fixed with !127511 (merged) already.
We fixed this before by setting skip_cache: true
by default in
ExecuteMethodService
. However, SummarizeSubmittedReviewService
was
not going through the ExecuteMethodService
.
As we only want to store messages from the chat
action, and to fix
this for the future, the logic is now reversed and it's required to set
cache_response: true
explicitly.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Enable AI features https://docs.gitlab.com/ee/development/ai_features.html#test-ai-features-locally
Feature.enable(:gitlab_duo, true)
- Perform a merge request review
- Refresh the browser and Open the GitLab Duo chat
- This is a necessity to test the feature, because right now, the chat listens on the AiCompletionResponseSubscription - and adds it to the chat, regardless of the action performed. This is another problem that needs to be tackled, also see #413600 (comment 1485444913)
- Before: You'd see the answer from the AI in the chat, Now: You no longer see the response because we don't store the message for the chat.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Nicolas Dular