Markdown caching for reference extraction is broken in 8.3.0-rc1
For 8.3, we refactored most of the logic for Markdown rendering (comments, issue/MR descriptions) and reference extraction (#123
issues, !123
merge requests, @username
users etc.), in order to be easier to understand and allow us to cache the references that were found in a specific comment or issue description so that the entire text did not have to parsed again every time its references are requested.
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1602 for the implementation.
Unfortunately, after we deployed 8.3rc1 to GitLab.com, we started seeing a number of weird issues:
- People were getting notification emails for issues/comments they were not participating in.
- Issues were getting automatic
mentioned in group/project#123
comments even though issue 123 in group/project did not actually mention the issue in question. - MRs were not showing
Accepting this merge request will close issue #123
even though they did includeCloses #123
in their description.
One thing all of these features have in common is that they rely on reference extraction, to get participating users, mentioned issues in a comment and a MR's issues to close.
We did extract references, but the references were not the right ones, so they had to have come from somewhere. Thus, the working theory is that Markdown caching for reference extraction is broken, with reference extraction sometimes returning the references for another comment or issue description than the one intended.
Note that we were not seeing problems with issue description or comment rendering in the web interface, which we would expect if Markdown caching were completely broken.
We're still not completely sure where the problem lies, but as a temporary measure we have disabled Markdown caching altogether. This means reference extraction will no longer use a cached list of references, but instead parse the comment or issue description again every time its references are requested, like it did with 8.2. This way, it should no longer be able to accidentally return the references for another comment or issue than the one intended.
We hope to get Markdown caching working properly as the 8.3 release date nears, or we'll have to postpone it for 8.4.
cc @rspeicher