NoMethodError: private method `open' called for nil:NilClass

https://sentry.gitlab.net/gitlab/gitlabcom/issues/1125946/

NoMethodError: private method `open' called for nil:NilClass
  ci/build.rb:676:in `artifacts_metadata_entry'
    artifacts_metadata.open do |metadata_stream|
  ci/find_exposed_artifacts_service.rb:51:in `block in first_2_metadata_entries_for_artifacts_paths'
    .map { |path| job.artifacts_metadata_entry(path, recursive: true) }
  ci/find_exposed_artifacts_service.rb:53:in `each'
    .first(2)
  ci/find_exposed_artifacts_service.rb:53:in `each'
    .first(2)
  ci/find_exposed_artifacts_service.rb:53:in `each'
    .first(2)
...
(95 additional frame(s) were not displayed)

NoMethodError: private method `open' called for nil:NilClass