Skip to content

Diffs do not render for non-logged in users in certain circumstances

Summary

In certain very specific circumstances, GitLab will fail to render a commit diff for non-logged in users. The diff still renders for any logged in user.

Steps to reproduce

  1. Ensure you are not logged into the GitLab instance
  2. View commit bf6e262b3ad26eab97380b64b89e0da74fc4d4b4 and notice it is missing (invent.kde.org/utilities/krusader or gitlab.com/bcooksley/krusader)

It is unclear what is special about this commit.

Example Project

bcooksley/krusader@db9cbdea

What is the current bug behavior?

Commit diff is initially collapsed, on expanding you will be offered the option to expand it. Clicking this does nothing.

What is the expected correct behavior?

Diff should be shown as it is for logged in users.

Relevant logs and/or screenshots

Not relevant

Output of checks

This bug happens on GitLab.com (but also our installed from source instance at invent.kde.org)

Results of GitLab environment info

Not relevant - issue occurs on GitLab.com

Results of GitLab application Check

Not relevant - issue occurs on GitLab.com

Possible fixes

It is unclear what is causing this.

It does not appear to be related to line length issues as the diff is pretty ordinary aside from it being on a file that is very long.

The same number of queries to Gitaly are being generated whether logged in or not.

Edited by 🤖 GitLab Bot 🤖