User details can be stale when discussion is cached
Summary
@engwan reported in https://gitlab.com/gitlab-org/gitlab/-/issues/336204#note_627467878 that it is possible that user details (name, username, status) can be stale when discussion is already cached when viewing a MR.
Steps to reproduce
- User A commented on a MR.
- User B views the MR so the discussions are cached for user B.
- User A changes their name.
- User B views the MR again. Outdated User A name will be displayed on the comment.
Proposal
- Look into including cache key of authors in
Discussion#cache_key
. - Or something else...
Edited by Patrick Bajao