Skip to content

Markdown cache of `nil` breaks migrations [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Brett Walker requested to merge 337543-fix-markdown-cache into master

What does this MR do?

When either cached_markdown_version or cached_markdown_version_in_database is nil, which can happen in mention migrations, then we get a #<ArgumentError: comparison of Integer with nil failed> error.

Now force cached_markdown_version and cached_markdown_version_in_database to an integer to allow comparison to work.

Screenshots or Screencasts (strongly suggested)

How to setup and validate locally (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #337543 (closed) and #337542 (closed)

Edited by Brett Walker

Merge request reports