Skip to content

Resolve "Appearance uploader fields and description HTML are missing in cached version"

What does this MR do?

This reverts to caching the AR object in CacheableAttributes since caching the attributes as JSON and manually instantiating the record ended-up very complex since the edge-cases such as upload fields, serialized fields, and fields with custom accessors had to be handled.

I first tried a few different strategies and even managed to have a green pipeline but I wasn't very:

Reverting back to caching the AR object instead put us back in a known state since that's what we were doing before https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18754.

Are there points in the code the reviewer needs to double check?

To ensure 3 points out of 4 are checked from https://gitlab.com/gitlab-org/gitlab-ce/issues/45175 we now include the Rails version in the cache key.

Why was this MR needed?

Because https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18754 introduced a few regressions.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #46913 (closed)

Edited by Rémy Coutable

Merge request reports