Skip to content

Fix encoding detection for nil diffs

Nick Thomas requested to merge fix-encoding-for-nil-diff-files into master

What does this MR do?

While migrating diffs to object storage on GitLab.com, I came across a curious issue affecting 6 (out of ~72M) diffs: an associated MergeRequestDiffFile where diff: nil: gitlab-com/gl-infra/production#1851 (closed)

I'm not sure what situation creates these, but it's easy enough to harden the migration process to permit them to be migrated. I remedied them manually on .com, but we should merge the fix for completeness.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • 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
Edited by Nick Thomas

Merge request reports