Problem with issues when html rendering has not been generated yet
Symptoms
The general symptom is an issue displaying several error banners (in red), such as "Something went wrong while setting issue notifications." or "Response not successful: Received status code 500". These are currently displayed on tryton/tryton#7907
Here is a corresponding backtrace (from production_json.log
):
"exception.class": "NoMethodError",
"exception.message": "undefined method `match?' for nil:NilClass",
"exception.backtrace": [
"app/models/note.rb:705:in `note_html'",
"app/models/concerns/cache_markdown_field.rb:108:in `cached_html_for'",
"app/models/concerns/cache_markdown_field.rb:85:in `cached_html_up_to_date?'",
"app/models/concerns/cache_markdown_field.rb:235:in `block in cache_markdown_field'",
"app/models/concerns/cache_markdown_field.rb:101:in `attribute_invalidated?'",
"app/models/concerns/cache_markdown_field.rb:116:in `updated_cached_html_for'",
Analysis
In order to change the treatment of some system notes, upstream overrode (48b17810afb0) the note
and note_html
fields accessor, using a regular expression match?
condition to identify those related to task completion. But they forgot to treat the nil
case, and this prevents successful generation of the html version, which would precisely have made note_html
not nil.
This regression was itnroduced in the 15.3 developement cycle, hence affects Heptapod 0.35.0 only. It was solved during the GitLab 15.5 development cycle (see 83fb80a9b7d3), and was not backported to v15.4.6.
Backport should be straightforward