#gitlab #gitlab-ce
#gitlab #gitlab-ce
Вопрос:
Недавно я обновил версию GitLab с 11.11.8 до 13.2.6.
После обновления я вижу проблему (500) при переходе на главную страницу группы, сведения о группе или страницу участника группы. Другие страницы в разделе «Поиск работы группы».
вот журнал из production.log
Я очень новичок в GitLab и Ruby. Приветствуются любые комментарии.
ActionView::Template::Error (PG::UndefinedTable: ERROR: relation "group_group_links" does not exist
LINE 8: WHERE a.attrelid = '"group_group_links"'::regclass
^
):
1: - model_name = source.model_name.to_s.downcase
2:
3: - if can?(current_user, :"destroy_#{model_name}_member", source.members.find_by(user_id: current_user.id)) # rubocop: disable CodeReuse/ActiveRecord
4: - link_text = source.is_a?(Group) ? _('Leave group') : _('Leave project')
5: = link_to link_text, polymorphic_path([:leave, source, :members]),
6: method: :delete,
app/models/group.rb:601:in `members_from_self_and_ancestor_group_shares'
app/models/group.rb:345:in `members_with_parents'
app/models/group.rb:274:in `has_owner?'
app/models/group.rb:289:in `last_owner?'
app/policies/group_member_policy.rb:7:in `block in <class:GroupMemberPolicy>'
lib/declarative_policy/condition.rb:23:in `instance_eval'
lib/declarative_policy/condition.rb:23:in `compute'
lib/declarative_policy/condition.rb:44:in `block in pass?'
lib/declarative_policy/base.rb:303:in `cache'
lib/declarative_policy/condition.rb:44:in `pass?'
lib/declarative_policy/rule.rb:81:in `pass?'
lib/declarative_policy/step.rb:81:in `pass?'
lib/declarative_policy/runner.rb:101:in `block in run'
lib/declarative_policy/runner.rb:180:in `block in steps_by_score'
lib/declarative_policy/runner.rb:149:in `loop'
lib/declarative_policy/runner.rb:149:in `steps_by_score'
lib/declarative_policy/runner.rb:82:in `run'
lib/declarative_policy/runner.rb:60:in `pass?'
lib/declarative_policy/base.rb:234:in `block in allowed?'
lib/declarative_policy/base.rb:234:in `all?'
lib/declarative_policy/base.rb:234:in `allowed?'
lib/declarative_policy/base.rb:226:in `can?'
app/models/ability.rb:72:in `allowed?'
app/controllers/application_controller.rb:200:in `can?'
app/views/shared/members/_access_request_links.html.haml:3
app/views/groups/_home_panel.html.haml:21
app/views/groups/show.html.haml:13
app/controllers/application_controller.rb:134:in `render'
app/controllers/groups_controller.rb:174:in `render_show_html'
app/controllers/groups_controller.rb:81:in `block (2 levels) in show'
app/controllers/groups_controller.rb:76:in `show'
app/controllers/application_controller.rb:491:in `set_current_admin'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:482:in `set_session_storage'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:476:in `set_locale'
lib/gitlab/error_tracking.rb:50:in `with_context'
app/controllers/application_controller.rb:541:in `sentry_context'
app/controllers/application_controller.rb:469:in `block in set_current_context'
lib/gitlab/application_context.rb:52:in `block in use'
lib/gitlab/application_context.rb:52:in `use'
lib/gitlab/application_context.rb:20:in `with_context'
app/controllers/application_controller.rb:462:in `set_current_context'
lib/gitlab/request_profiler/middleware.rb:17:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/multipart.rb:140:in `call'
lib/gitlab/middleware/read_only/controller.rb:51:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/same_site_cookies.rb:27:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'
lib/gitlab/middleware/request_context.rb:23:in `call'
config/initializers/fix_local_cache_middleware.rb:9:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:60:in `call'
lib/gitlab/middleware/release_env.rb:12:in `call'
Ответ №1:
Удалось устранить проблему — https://gitlab.com/gitlab-org/gitlab/-/issues/241664
Проблема теперь решена после размещения 20180902070406_create_group_group_links.rb файла в db / migrate / затем запустить
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production