Skip to content

Avoid creating repository when calling Wiki#empty?

What does this MR do?

In this MR we modify the Wiki#empty? method to avoid creating the wiki repository if it doesn't exist.

We have realized that there are methods querying wikis (like the SearchController#count in https://sentry.gitlab.net/gitlab/gitlabcom/issues/2478544/) and one of the main things they do is to call Wiki.empty?. This call will automatically trigger the creation of the repository, which is not really optimum because it can make the request last longer, and it can have unexpected results.

Does this MR meet the acceptance criteria?

Conformity

Related to #321376 (closed)

Merge request reports