Backend: Artifact include memoizes error message as its content sometimes

The following discussion from !113211 (merged) should be addressed:

  • @grzesiek started a discussion:

    TODO: this might be considered a bug (I encountered it while writing specs for includable artifact file). Perhaps we should address this separately in a separate issue.

/cc @dhershkovitch

              strong_memoize(:content) do
                Gitlab::Ci::ArtifactFileReader.new(artifact_job).read(location)
              rescue Gitlab::Ci::ArtifactFileReader::Error => error
                errors.push(error.message) # TODO this memoizes the error message as a content!
              end
Edited by Grzegorz Bizon