Commit statistics graphs not displayed in some projects
Summary
In some projects, the Commit statistics section on the Repository analytics page is not rendered correctly and the graphs "Commits per day of month", "Commits per weekday" and "Commits per day hour (UTC)" are not displayed.
Steps to reproduce
- Open a project on gitlab.com (e.g. a public project as guest)
- Select Analyze -> Repository analytics in the navigation menu
- Observe whether the graphs are displayed or not.
Example Project
Example projects where this bug occurs:
- https://gitlab.com/gitlab-org/gitlab-foss/-/graphs/master/charts
- https://gitlab.com/gnachman/iterm2/-/graphs/master/charts
- https://gitlab.com/cryptsetup/cryptsetup/-/graphs/main/charts
Example projects where the graphs are displayed correctly:
- https://gitlab.com/gitlab-org/gitlab/-/graphs/master/charts
- https://gitlab.com/graphviz/graphviz/-/graphs/main/charts
- https://gitlab.com/dwt1/dotfiles/-/graphs/master/charts
What is the current bug behavior?
The graphs are not displayed.
The data for the graphs is actually available on the page (can be seen by looking at the page source code), but due to some error it is not rendered correctly in the browser. I tested with Firefox 115.3.0esr and Chromium 118.0.5993.70 on Debian GNU/Linux as well as Firefox 118.0.1 and Chrome 118.0.5993.71 on Windows so it is clearly not a browser issue.
We experience this problem also on our self-hosted instance running GitLab Enterprise Edition Ultimate Version 16.4.1. I have noticed that in some projects I can see the graphs as administrator but not as a guest. In some projects I cannot see them as admin either. Unfortunately I haven't been able to identify the common denominator of the projects where the graphs are failing.
What is the expected correct behavior?
The graphs are displayed (like they are in most projects).
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)