EE constant lookup conflicts
Ruby constants and Rails autoloading don't seem to go well together.
Having classes for which an existing class name is a suffix is problematic. e.g. Both ::B and A::B resolve to the same class.
We ran into this in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14011 where ::Gitlab::Ci::Config::Stage was resolved to EE::Gitlab::Ci::Config::Stage causing a plethora of failures.
One of the possible solutions (suggested by @stanhu) is to consider changing our EE naming scheme: instead of EE::Gitlab::MyClass we should have something like EE::Gitlab::MyClassEE.
Related reading: https://makandracards.com/makandra/20633-ruby-constant-lookup-the-good-the-bad-and-the-ugly
Edited by 🤖 GitLab Bot 🤖