Rename semantic of container in Wiki
Summary
Recently more repository features require decoupling of the concept of project
. One piece of code can now be used for both a project or "record x". we started to use the word container
to represent these situations. However its meaning gradually diverged in different part of the codebase, especially in wiki.
The meaning of container
means the active record object where one repository can be located with. For project wiki repository, it would be Project
. For project snippet repo it would be Snippet
.
However many instance of container
in wiki now are related to ProjectWiki
, which is not an ActiveRecord
. The different semantics has lead to conflicting mental model and some buggy code.
Improvements
Rename usages of container
which returns ProjectWiki
to something else.
Risks
This is a minor refactoring so should be have too much risk
Involved components
-
container
accessor:app/models/wiki.rb
app/models/wiki_page.rb
app/models/project_wiki.rb
ee/app/models/group_wiki.rb
lib/gitlab/git_access_wiki.rb
Wiki.for_container
Wiki#update_container_activity