Optional personal namespace
What does this MR do and why?
Currently every user must have a personal namespace, but this MR will remove this requirement at the ActiveRecord model layer. This will make the user's personal namespace an optional association.
The specs currently assume a user always has a personal namespace. The MR invalidates this assumption and the specs need to adjust accordingly. Many times the user's personal namespace is used within specs because it's convenient, such as for a place to build projects. However other times the personal namespace is an important part of the feature being tested, such as testing which projects are visible to a user. This MR maintains a list of spec files that fail when a personal namespace is not present. The MR maintains legacy behavior with a temporary shim that ensures a personal namespace exists for a user within that spec file.
A follow up issue has been created to remove these exceptions from the spec suite. This MR is behind a feature flag that can not be enabled until all spec exceptions are removed from the spec suite, including the shim itself.
The shims file is created with the help of the following tooling script:
tooling/bin/failed_spec_files -t <API TOKEN> -p 278964 -l <PIPELINE ID> -o /tmp/out.yml -d && cat /tmp/out.yml >> spec/support/helpers/user_with_namespace_shim.yml
The PIPELINE ID
is the ID of the last pipeline to produce failing tests. Note that when a large number of specs fail, it might be necessary to push shim updates, and re-run the script for the most recent pipeline.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #427730