404 when requesting build trace
Summary
When trying to view the running build output of a public project (gitlab-ce) all ajax requests to get the updated trace result in a 404. The trace shouldn't 404 if I can already see part of the logs.
Steps to reproduce
- Navigate to gitlab-ce as a user who's not part of the org or as an unauthenticated guest
- Find a running build and click on it (https://gitlab.com/gitlab-org/gitlab-ce/builds?scope=running)
- Wait for the
Something went wrong on our end
error
Expected behavior
Should get build trace updates and autoscroll
Actual behavior
Trace requests 404 and no new build output is appended to the screen
Relevant logs and/or screenshots
Video: https://cl.ly/1t3s2C3c2R1y
Output of checks
NA - gitlab.com
Results of GitLab application Check
NA - gitlab.com
Results of GitLab environment info
NA - gitlab.com
Possible fixes
Could be related to authorize_read_build!
in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/controllers/projects/builds_controller.rb#L3