Markdown cache is not correctly invalidated when files are migrated to object storage
The following discussion from gitlab-ee!3867 should be addressed: - [ ] @nick.thomas started a [discussion](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3867#note_55934489): (+1 comment) > Here's an interesting bug. > > If we update, say, `issues.description` this way, then `issues.description_html` *won't* be updated and we'll continue to serve the wrong link. > > How much of a bug is this? Can we solve it in a follow-up issue? I'm not clear right now on where this code is used.It looks expensive, though. The bug is in https://gitlab.com/gitlab-org/gitlab-ee/blob/master/app/uploaders/file_mover.rb#L23 ```ruby def update_markdown updated_text = model.read_attribute(update_field).gsub(temp_file_uploader.to_markdown, uploader.to_markdown) model.update_attribute(update_field, updated_text) true rescue revert false end ``` At the very least, if the text has changed then we should clear `"#{update_field}_html"` if it exists. /cc @mbergeron @smcgivern
issue