nil is not a known state value

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Hi,

I just upgraded my GitLab instance to version 16.1.1 from 16.0.2 and encountered several problems that appear to be caused by the same issue.

Firstly, the sign-in functionality was broken, resulting in error code 500 for all users. I found a related issue here, which suggested a fix by changing the user_type value for all users from Nil to 0. Applying this fix resolved the login problem.

However, I'm still facing issues when accessing certain pages, such as admin/users?filter=two_factor_disabled, which also results in error code 500. The specific error message I encountered is as follows:

ActionView::Template::Error (DEPRECATED in ruby 3.0: nil is not a known state value):
    65:         = label_tag s_('AdminUsers|Sort by')
    66:         = gl_redirect_listbox_tag admin_users_sort_options(filter: params[:filter], search_query: params[:search_query]), @sort, data: { placement: 'right' }
    67:
    68: #js-admin-users-app{ data: admin_users_data_attributes(@users) }
    69:   = render Pajamas::SpinnerComponent.new(size: :lg, class: 'gl-my-7')
    70:
    71: = paginate_collection @users

It seems that there are still some Nil fields remaining in the database, which are causing the error codes to be returned as 500.

Edited by 🤖 GitLab Bot 🤖