Commit Graph

228 Commits

Author SHA1 Message Date
Sean McGivern aff5c9f3e5 Add table for merge request commits
This is an ID-less table with just three columns: an association to the merge
request diff the commit belongs to, the relative order of the commit within the
merge request diff, and the commit SHA itself.

Previously we stored much more information about the commits, so that we could
display them even when they were deleted from the repo. Since 8.0, we ensure
that those commits are kept around for as long as the target repo itself is, so
we don't need to duplicate that data in the database.
2017-07-06 17:36:10 +01:00
Adam Niedzielski 0eb3d18c56 Store merge request ref_fetched status in the database
Closes #34052
2017-06-26 17:36:09 +02:00
Sean McGivern 9a73b634ab Add table for files in merge request diffs
This adds an ID-less table containing one row per file, per merge request
diff. It has a column for each attribute on Gitlab::Git::Diff that is serialised
currently, with the advantage that we can easily query the attributes of this
new table.

It does not migrate existing data, so we have fallback code when the legacy
st_diffs column is present instead. For a merge request diff to be valid, it
should have at most one of:

* Rows in this new table, with the correct merge_request_diff_id.
* A non-NULL st_diffs column.

It may have neither, if the diff is empty.
2017-06-16 18:30:01 +01:00
Grzegorz Bizon 3801a0df80 Export pipeline stages in import/export feature 2017-06-05 12:46:57 +02:00
James Lopez 1a5e84febe Merge branch 'fix/gl-project-id' into 'master'
Omit gl_project_id from Import/Export

Closes #29813

See merge request !11032
2017-05-08 06:52:01 +00:00
Zeger-Jan van de Weg 8df3997a92 Add Pipeline Schedules that supersedes experimental Trigger Schedule 2017-05-07 22:35:56 +00:00
Stan Hu 58166f03b9 Merge branch 'fix/fork-spec-mysql' into 'master'
Fix fork_spec failure to do with mySQL

Closes #31870

See merge request !11121
2017-05-06 02:02:42 +00:00
James Lopez cc826c0469 workaround spec failure for mySQL invalid date issue 2017-05-05 16:45:46 +02:00
blackst0ne cca09bbb18 Update Import/Export files 2017-05-05 16:39:26 +11:00
James Lopez cf3990cfbf Fix project tree saver and fork spec failures 2017-05-03 16:36:01 +00:00
James Lopez 2174e37845 Include missing project attributes to Import/Export 2017-05-03 10:12:32 +00:00
James Lopez 702b291f81 remove gl_project_id for I/E version update 2017-05-02 14:55:32 +02:00
blackst0ne 11aff97d88 Remove the User#is_admin? method 2017-04-09 13:20:57 +11:00
Kushal Pandya 8a5ca1121b Merge branch 'master' into '18471-restrict-tag-pushes-protected-tags'
# Conflicts:
#   spec/lib/gitlab/import_export/all_models.yml
2017-04-06 21:12:16 +00:00
James Edwards-Jones 7d17fcea84 Fix projected import failing on missing relations 2017-04-06 15:48:20 +01:00
Shinya Maeda a67aff6d39 Add Import/Export Setting for trigger_schedule. Remove ref validation. 2017-04-06 23:46:58 +09:00
Shinya Maeda 01cea0d59d Suppress Import/Export function warnings. Add comment for confirmation. 2017-04-06 23:46:58 +09:00
Kushal Pandya 18506d4b8b Merge branch 'master' into '18471-restrict-tag-pushes-protected-tags'
# Conflicts:
#   app/assets/javascripts/dispatcher.js
#   app/assets/stylesheets/pages/projects.scss
2017-04-06 09:46:50 +00:00
James Lopez 22d7ae8002 Fix issues importing forked projects 2017-04-04 16:34:19 +00:00
James Edwards-Jones 07d7d8e659 Renamed ProtectedTag push_access_levels to create_access_levels 2017-04-04 03:38:58 +01:00
James Edwards-Jones 3bb3a6886f Attempt to fix import/export of push_access_levels for protected tags 2017-04-04 02:19:04 +01:00
James Edwards-Jones 9f4b8dba80 Clean up non TODO rubocop errors 2017-04-03 20:06:06 +01:00
Kamil Trzciński 12dd5ac221 All CI offline migrations 2017-03-17 23:06:11 +00:00
Dmitriy Zaporozhets 5b52adcedb
Fix group members method for project import/export
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-03-09 13:40:57 +02:00
Sean McGivern 811e598f60 Enable and autocorrect the CustomErrorClass cop 2017-03-01 15:28:10 +00:00
Rémy Coutable d8752015b3 Merge branch 'fix/import-hooks' into 'master'
Fix import webhooks performance issue

Closes #27958

See merge request !9197
2017-02-16 15:00:40 +00:00
James Lopez b3fb5b4f26 Use gitlab shell import instead of manually creating the webhooks
Also update repo restorer to use project wiki method.
2017-02-16 10:02:26 +01:00
Dmitriy Zaporozhets 6676b4f0dd
Use Namespace#full_path instead of Namespace#path
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-14 18:38:20 +02:00
James Lopez 8409340b3b Add missing group members to export for I/E 2017-02-07 11:06:05 +01:00
James Lopez 8ea1dafe83 use destroy_all 2017-01-31 19:20:35 +01:00
James Lopez 918eaba0c3 remove old project members from project 2017-01-31 16:32:26 +01:00
James Lopez 017a5068f6 fix spec failure 2017-01-30 14:26:32 +01:00
James Lopez 1a2d13c821 programmatically remove encrypted attributes. Added relevant spec. 2017-01-30 12:34:32 +01:00
James Lopez eeb13c16d1 rename method and added note to export file spec about new encrypted attributes 2017-01-30 12:34:32 +01:00
James Lopez 6a2b976c66 fix typo 2017-01-30 12:34:32 +01:00
James Lopez e589c7e848 Ignore encrypted attributes in Import/Export
* Regenerates tokens for all models that have them
* Remove variables, since they are basically just storing encrypted data
* Bumped version up to 0.1.6
* Updated related docs
2017-01-30 12:34:32 +01:00
Rémy Coutable 4af1f18639 Merge branch 'fix/import-users' into 'master'
Fix import no longer mapping users as admin

Closes #25346

See merge request !8625
2017-01-20 16:03:44 +00:00
James Lopez e8396d8e73 fix member mapper spec 2017-01-20 14:37:52 +01:00
James Lopez e8a9682bc9 fix typo 2017-01-19 09:44:20 +01:00
James Lopez 17c099161e fix and refactor note user mapping 2017-01-18 17:40:24 +01:00
James Lopez b3bb8dc46f added spec replicating the problem 2017-01-18 15:46:54 +01:00
James Lopez 35442766cf do not map usersat all unless admin 2017-01-18 14:13:01 +01:00
Ruben Davila 17196a2ff3 Backport backend work for time tracking. 2017-01-15 11:10:04 -05:00
James Lopez 5452747729 Fix error importing label priorities and added relevant spec 2016-12-21 10:33:20 +01:00
Rémy Coutable 8c8c4f8c5a Merge branch 'fix/import-export-mr-error' into 'master'
Fix import/export merge requests error

When MWBS is set and the MR exported/imported an error gets thrown. We should ignore this so it can succeed as the merge user may no longer exist in the target instance.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24009 and https://gitlab.com/gitlab-com/support-forum/issues/1345

See merge request !8134
2016-12-19 18:03:06 +00:00
James Lopez 0631c7bcdc Fix MR issue to do with merge user 2016-12-19 16:52:38 +01:00
James Lopez 786457ca3e
Fix for missing service when importing from EE to CE
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-19 16:32:26 +01:00
James Lopez d6edecdeec Fix duplicated build token problem and added relevant spec 2016-12-19 11:26:57 +01:00
Douwe Maan dc9b3db8b0 Merge branch 'fix/import-export-symlink-vulnerability' into 'security'
Fix symlink vulnerability in Import/Export

Replaces https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2018 made by @james

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23822

See merge request !2022

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-03 16:04:18 +01:00
Douwe Maan cfb511ea69 Merge branch 'fix/import-projectmember-security' into 'security'
Fix Import/Export foreign key issue to do with project members

Cleans-up any foreign keys in `ProjectMember` - same as we do with the rest of the models when importing.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23837 and https://gitlab.com/gitlab-org/gitlab-ce/issues/23739

See merge request !2020

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-03 16:04:18 +01:00