Skip to content

Some "eligible_approvers" cannot be mapped to members as they're not part of roulette.json

As can be seen in https://gitlab.com/gitlab-org/gitlab/-/jobs/2606540238, some eligible_approvers' usernames aren't part of https://gitlab-org.gitlab.io/gitlab-roulette/roulette.json, so that find_member(username) returns nil in https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles/blob/master/lib/danger/plugins/roulette.rb#L167.

This in turn ends up triggering an undefined method username' for nil:NilClass` here: https://gitlab.com/gitlab-org/ruby/gems/gitlab-dangerfiles/blob/master/lib/danger/plugins/roulette.rb#L128

In this example, m_gill and mksionek are in eligible_approvers but not in https://gitlab-org.gitlab.io/gitlab-roulette/roulette.json.

Solutions

I see two potential solutions:

  • Ignore nil members, i.e. ignore "eligible approvers" that aren't part of the roulette
  • Create members directly in #spin_for_approver with something like Gitlab::Dangerfiles::Teammate.new(approver)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information