MR Commits Tab Sometimes Not Updating After Applying Suggestion
Summary
Occasionally, when applying a suggested change to an MR, the commits tab does not update to contain the commit with the suggested change.
This has been observed in our E2E tests intermittently and can cause qa/qa/specs/features/browser_ui/3_create/merge_request/suggestions/custom_commit_suggestion_spec.rb
to fail:
Failure in browser_ui/3_create/merge_request/su... (#355694 - closed)
An example can be seen in the screenshot below. We can see the GraphQL query getState
for retrieving merge request data returns 3 commits, with the latest commit "Apply suggestion 3" returned as expected. However, on the UI, this commit fails to show:
As a workaround, refreshing the page will display the commit as expected.
Steps to reproduce
On GDK:
- Login as admin and create a new project
- Push a change to the project and open an MR with that change
- Add a new member to the project as a developer, then login as the developer
- Go to the MR the admin opened and click on the "Changes" tab
- Highlight any line in the diff and open up the comment dialog for it
- Click on the "Insert suggestion" button in the comment's toolbar
- Make a suggested change, then click "Add comment now"
- Log out as the developer, then log back in as the admin
- Go back to the MR, and click the "Apply suggestion" dropdown on the comment, fill out the commit message field and click "Apply"
- Wait for the suggestion to be applied, and click on the "Commits" tab of the MR
What is the current bug behavior?
The suggested change commit sometimes does not display under the "Commits" tab
What is the expected correct behavior?
The suggested change commit should display under the "Commits" tab consistently