Undefined method `group_runners' when navigating to a group's audit events page
Summary
When navigating to a group's audit events page, some users are seeing a 500 error on the page.
On checking the logs, the exception raised is:
undefined method `group_runners' for #<Module:0x000079c7723bb9c0>
This has come up in an zendesk ticket - internal only
The error seems to be coming from this line: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/audit/ci_runner_token_author.rb?ref_type=heads#L36
Steps to reproduce
Navigate to a group Audit Event's page (Secure
> Audit Events
).
Example Project
What is the current bug behavior?
500 Error when you visit a group's Audit Events page.
What is the expected correct behavior?
The Audit Events page should be viewable with no errors/exceptions should be handled correctly
Relevant logs and/or screenshots
Kibana Logs: https://log.gprd.gitlab.net/app/r/s/RxW4a (internal only)
Snippet of backtrace:
"lib/gitlab/audit/ci_runner_token_author.rb:36:in `full_path'",
"ee/app/presenters/audit_event_presenter.rb:12:in `author_url'",
"ee/app/serializers/audit_event_entity.rb:10:in `block in <class:AuditEventEntity>'",
"app/serializers/base_serializer.rb:16:in `represent'",
"ee/app/controllers/groups/audit_events_controller.rb:30:in `index'",
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)