500 upon login due to undefined method `company_form_type'

Summary

When logging into GitLab.com, a user is seeing a 500 error on any view they visit.

This seems to be related with this recent change.

Steps to reproduce

I'm unable to reproduce this, I believe it may be related to the way an account was first provisioned.

What is the current bug behavior?

A 500 is shown upon successful login.

What is the expected correct behavior?

The user can freely navigate GitLab once logged in.

Relevant logs and/or screenshots

Sentry issue

"ee/app/presenters/ee/onboarding/status_presenter.rb:14:in `company_form_type'",
 "ee/app/helpers/registrations/company_helper.rb:11:in `create_company_form_data'",
 "ee/app/views/registrations/company/new.html.haml:13",
 "app/controllers/application_controller.rb:156:in `render'",
 "lib/gitlab/ip_address_state.rb:11:in `with'",
 "ee/app/controllers/ee/application_controller.rb:45:in `set_current_ip_address'",
 "app/controllers/application_controller.rb:505:in `set_current_admin'",

Output of checks

This bug happens on GitLab.com

Fix

See #508393 (comment 2254498970)

  • Provide immediate fix - Provide a workaround for users that do not have... (!176195 - merged)
  • spawn issue for Longterm fix/backfill - handling in #510316 (closed)
    1. see if we can identify the user accounts that have no onboarding_status_registration_type and are on the company url(will need to be a fuzzy match as it could have url params) in the onboarding_status_step_url.
    2. If we can identify those records, then update onboarding_status_step_url only with the group/project creation url.
Edited by Doug Stull