gitlab-org--gitlab-foss/spec/lib/gitlab
Douwe Maan 05efd19e89 Merge branch 'dz-nested-groups' into 'master'
Add nested groups support on data level

## What does this MR do?

- [x] Add  `parent_id` field to `Namespace`model. 
- [x] Create new database table `routes` that keeps information about full path to each group or project
- [x] Remove uniq index from `namespaces.path`
- [x] Add uniq index on `routes.path`
- [x] Fill routes table with path data from namespaces and projects
- [x] Change Namespace/Project URL lookup by routes table
- [x] Rename related routes (nested groups, projects) when parent path changes

This is solely backend preparation. UI, Permissions and API support will be added in separate merge request.   
 
## Are there points in the code the reviewer needs to double check?

migrations, Route model, Routable concern

Will require downtime. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7121#note_19490281 discussion

## Why was this MR needed?

One step further to full nested groups support

## Screenshots (if relevant)

No UI changes in this merge request so far

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added~~
- ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- ~~API support added~~
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/2772

See merge request !7121
2016-12-09 01:52:36 +00:00
..
backend Refine Git garbage collection 2016-11-04 14:30:11 +01:00
backup Fix Backup::Manager#remove_old 2016-12-07 13:27:44 +00:00
badge Fix pipeline fixtures and calls to removed method 2016-10-04 14:43:24 +02:00
bitbucket_import Fix spec to set import_url before attempting to create import_data 2016-07-17 20:57:11 -07:00
chat_commands Accept issue new as command to create an issue 2016-12-05 10:02:21 +01:00
checks Change the order of the access rules to check simpler first, and add specs 2016-08-12 18:27:42 -04:00
ci Code review 2016-12-07 19:30:14 +01:00
conflict Add blob_ace_mode to conflict content response 2016-10-13 14:16:35 -05:00
cycle_analytics Update effected tests 2016-12-04 17:32:33 +01:00
data_builder refactors tests because of gitlab-test repository changes 2016-10-11 16:33:06 +01:00
database fix 2016-09-15 21:59:59 -05:00
diff Fixes ActionView::Template::Error: undefined method text? for nil:NilClass 2016-12-02 14:03:30 +02:00
downtime_check Better formatting for downtime check messages 2016-08-17 12:15:20 +02:00
email fix rubocop failures 2016-11-17 11:59:44 +09:00
fogbugz_import Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
gfm Add shorthand support to gitlab markdown references 2016-12-02 19:18:17 -02:00
git Enable some Rubocop cops related to new lines 2016-08-03 12:02:41 +02:00
github_import Use :maximum instead of :within for length validators with a 0..N range 2016-12-06 10:23:17 +01:00
gitlab_import Fixed gitlab.com importer missing confidential attribute 2016-09-05 17:41:48 +02:00
google_code_import Reuse LabelsFinder on Issueable#add_labels_by_names 2016-10-19 14:58:25 -02:00
graphs
import_export Add nested groups support on data level 2016-12-08 11:47:16 +02:00
ldap Centralize LDAP config/filter logic 2016-11-11 15:58:33 -06:00
metrics Adds response mime type to transaction metric action when it's not HTML 2016-08-25 16:33:41 +02:00
middleware Use Gitlab.config.gitlab.host over 'localhost' 2016-11-18 20:17:10 +08:00
o_auth Omniauth auto link LDAP user falls back to find by DN when user cannot be found by uid 2016-11-10 15:47:40 -06:00
saml adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
sanitizers
sherlock
slash_commands Fix behavior around commands with optional arguments 2016-08-18 14:29:49 -05:00
sql
template Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
asciidoc_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
auth_spec.rb Handle LFS token creation and retrieval in the same method, and in the same Redis connection. 2016-09-28 12:13:48 -05:00
award_emoji_spec.rb Fix emoji paths in relative root configurations 2016-07-01 09:10:12 -07:00
blame_spec.rb
changes_list_spec.rb api for generating new merge request 2016-08-11 23:37:00 +07:00
chat_name_token_spec.rb More refactoring, push present to base command 2016-11-17 21:44:26 +01:00
closing_issue_extractor_spec.rb Merge branch 'issue_23548_dev' into 'master' 2016-11-09 12:25:17 +01:00
color_schemes_spec.rb
contributions_calendar_spec.rb Merge branch '23403-fix-events-for-private-project-features' into 'security' 2016-11-09 12:27:41 +01:00
current_settings_spec.rb Handle case when Redis cache returns an empty setting 2016-06-29 14:28:41 -07:00
database_spec.rb
downtime_check_spec.rb Added checks for migration downtime 2016-07-20 12:41:56 +02:00
exclusive_lease_spec.rb Refine Git garbage collection 2016-11-04 14:30:11 +01:00
file_detector_spec.rb Unify detecting of special repository files 2016-11-21 12:51:40 +01:00
git_access_spec.rb Merge branch 'fix-unathorized-cloning' into 'security' 2016-11-09 12:27:17 +01:00
git_access_wiki_spec.rb Improve Gitlab::GitAccessWiki spec with download access checks 2016-11-30 16:02:25 -02:00
git_spec.rb Add spec covering 'committer_hash' 2016-09-20 10:15:43 -07:00
highlight_spec.rb Fix specs 2016-08-01 13:24:06 +02:00
identifier_spec.rb Use Commit#author so we share logic and cache 2016-11-24 02:33:55 +08:00
incoming_email_spec.rb
key_fingerprint_spec.rb
lazy_spec.rb
lfs_token_spec.rb Handle LFS token creation and retrieval in the same method, and in the same Redis connection. 2016-09-28 12:13:48 -05:00
markup_helper_spec.rb
metrics_spec.rb Tracking of custom events 2016-08-17 10:04:04 +02:00
optimistic_locking_spec.rb Make retry_lock to not be infinite 2016-10-27 12:34:35 +01:00
popen_spec.rb Use 'git update-ref' for safer web commits 2016-09-02 11:49:40 +02:00
project_search_results_spec.rb Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' 2016-11-28 21:26:23 -03:00
redis_spec.rb Updated mail_room and added sentinel support to Reply by Email 2016-10-26 05:02:47 +02:00
reference_extractor_spec.rb Merge branch 'issue_23548_dev' into 'master' 2016-11-09 12:25:17 +01:00
regex_spec.rb
search_results_spec.rb Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security' 2016-12-08 21:42:07 -03:00
sidekiq_throttler_spec.rb Refactored Sidekiq Throttler and updated documentation 2016-11-11 11:14:58 -06:00
snippet_search_results_spec.rb Clean up search result classes 2016-09-06 10:12:55 +03:00
themes_spec.rb
upgrader_spec.rb adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
uploads_transfer_spec.rb
url_builder_spec.rb get rid of light url builder and fix wrong spec 2016-11-17 08:22:58 +01:00
url_sanitizer_spec.rb spec and fix for sanitize method 2016-07-11 09:01:09 +02:00
user_access_spec.rb changes default_branch_protection to allow devs_can_merge protection option aswell 2016-08-04 21:15:26 +01:00
utils_spec.rb Fix project features default values 2016-11-01 11:03:56 -02:00
version_info_spec.rb
workhorse_spec.rb Use base SHA for patches and diffs 2016-09-22 18:49:31 +01:00