500 errors after upgrading 14.4.1 > 14.6.0

Zero downtime upgrade, no errors during installation/migration.

Unable to access any project main pages, although sub pages seem to be fine.

I get the following message in /var/log/gitlab/gitlab-rails/production.log:

Started GET "/internal/solutions/docs" for 217.155.64.88 at 2021-12-23 11:43:37 +0000
Processing by ProjectsController#show as HTML
  Parameters: {"namespace_id"=>"internal/solutions", "id"=>"docs"}
  Rendered layout layouts/project.html.haml (Duration: 44.8ms | Allocations: 12211)
Completed 500 Internal Server Error in 89ms (ActiveRecord: 11.5ms | Elasticsearch: 0.0ms | Allocations: 23149)

ActionView::Template::Error (undefined method `find_fork_of' for nil:NilClass):
    1: - unless @project.empty_repo?
    2:   - if current_user
    3:     .count-badge.btn-group
    4:       - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
    5:         = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: s_('ProjectOverview|Go to your fork'), class: 'gl-button btn btn-default btn-sm has-tooltip fork-btn' do
    6:           = sprite_icon('fork', css_class: 'icon')
    7:           %span= s_('ProjectOverview|Fork')

Anyone got any ideas?

I’d missed an error in the sudo gitlab-rake db:migrate step:

PG::UndefinedObject: ERROR:  index "index_for_resource_group" does not exist

Following the workaround steps here allowed the migrations to complete. All good now.

1 Like