Error 500 when browsing artifacts on Geo secondary
When the artifacts aren't on the object store used by the secondary yet, this error occurs:
Started GET "/testme/test-ci/-/jobs/5/artifacts/browse" for 81.83.195.177 at 2018-01-30 17:17:42 +0000
Processing by Projects::ArtifactsController#browse as HTML
Parameters: {"namespace_id"=>"testme", "project_id"=>"test-ci", "job_id"=>"5"}
Completed 500 Internal Server Error in 100ms (ActiveRecord: 3.7ms | Elasticsearch: 0.0ms)
NoMethodError (undefined method `body' for nil:NilClass):
app/models/ci/build.rb:373:in `artifacts_metadata_entry'
app/controllers/projects/artifacts_controller.rb:20:in `browse'
lib/gitlab/i18n.rb:47:in `with_locale'
lib/gitlab/i18n.rb:53:in `with_user_locale'
app/controllers/application_controller.rb:334:in `set_locale'
lib/gitlab/middleware/multipart.rb:95:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/jira/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:18:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only.rb:31:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
This happens when the secondary uses a different object store than the primary.
Possible solution
Maybe we can hide the "Job artifacts" section in the sidebar if the artifacts aren't on the object store yet, but I'm afraid this would slow down the UI too much:
With | Without |
---|---|
Alternatively we could use the object store of the primary, but I'm not sure how we would configure that.
Edited by 🤖 GitLab Bot 🤖