Unauthenticated user receive "Error loading burndown chart data" when viewing milestones of public group/project
Summary
When an unauthenticated user accesses the milestones page for a public group or project, the burndown chart is not displayed and message Error loading burndown chart data
is displayed.
The burndown_events
call for the page is returning a 401.
Steps to reproduce
- Create a public group or project
- Create a milestone
- Access the milestone page as an unauthenticated user.
Example Project
This can be reproduced using %10.0
What is the current bug behavior?
Unauthenticated users cannot view burndown charts of public groups/projects.
What is the expected correct behavior?
Unauthenticated users are able to view all elements of a public milestones page.
Relevant logs and/or screenshots
{ "time": "2020-10-12T14:10:45.857Z", "severity": "INFO", "duration_s": 0.00438, "db_duration_s": 0, "view_duration_s": 0.00438, "status": 401, "method": "GET", "path": "/api/v4/groups/38/milestones/35/burndown_events", "params": [], "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.123 Safari/537.36", "route": "/api/:version/groups/:id/milestones/:milestone_id/burndown_events", "queue_duration_s": 0.023886, "redis_calls": 1, "redis_duration_s": 0.000308, "redis_read_bytes": 74, "redis_write_bytes": 85, "redis_shared_state_calls": 1, "redis_shared_state_duration_s": 0.000308, "redis_shared_state_read_bytes": 74, "redis_shared_state_write_bytes": 85, "correlation_id": "6EfN2JTPKU4", "meta.caller_id": "/api/:version/groups/:id/milestones/:milestone_id/burndown_events" }
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 10 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.6p146 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.9 Git Version: 2.28.0 Sidekiq Version:5.2.9 Go Version: unknown GitLab information Version: 13.4.3-ee Revision: fd96f779e9d Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 11.9 Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.7.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories - branch-test: /var/opt/gitlab/git-data/repositories - second-storage: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.7.0 ? ... OK (13.7.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK branch-test ... OK second-storage ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 1/1 ... yes 1/2 ... yes 1/3 ... yes 1/4 ... yes 1/5 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.6) Git version >= 2.24.0 ? ... yes (2.28.0) Git user has default SSH configuration? ... yes Active users: ... 6 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 6.x - 7.x? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
Error appears to be caused by authorize! being run before the milestones are fetched.