Commit Graph

17976 Commits

Author SHA1 Message Date
Jacob Vosmaer e5fecc3a37 Create repositories via Gitaly 2017-09-29 18:27:06 +02:00
Filipa Lacerda c49d19a5dc Merge branch 'fork-btn-enabled-user-groups' into 'master'
Fix fork button being disabled for users who can fork to group

Closes #38462

See merge request gitlab-org/gitlab-ce!14551
2017-09-29 15:55:14 +00:00
Filipa Lacerda 49fdaf9ee8 Merge branch 'hash-mr-scroll-load' into 'master'
Fixed anchored content not being scrolled into view

Closes #38326

See merge request gitlab-org/gitlab-ce!14562
2017-09-29 15:14:22 +00:00
Rémy Coutable 05e9c9f77e Merge branch '36631-activerecord-statementinvalid-pg-querycanceled-error-canceling-statement-due-to-statement-timeout' into 'master'
Insert at most 1,000 rows at once in MR diff background migration

Closes #36631 et #37505

See merge request gitlab-org/gitlab-ce!13661
2017-09-29 13:43:28 +00:00
Jacob Schatz 5307844c9a Merge branch 'dm-json-page-title' into 'master'
Use backend-provided page title in repo editor

Closes #36029

See merge request gitlab-org/gitlab-ce!13763
2017-09-29 13:22:27 +00:00
Jacob Vosmaer (GitLab) 403712f06e Make Repository#has_visible_content more efficient 2017-09-29 13:08:44 +00:00
Tim Zallmann ef22b0dc81 Title has now its own test 2017-09-29 13:43:39 +02:00
Lin Jen-Shin (godfat) 8bac6e41ef Fix notes type created from import 2017-09-29 11:18:58 +00:00
Phil Hughes 93aa6d04c2
moved fork checks into policies 2017-09-29 12:14:39 +01:00
Sean McGivern 472be7fe61 Reschedule merge request diff background migration
The first attempt didn't migrate all rows on GitLab.com, due to a couple of
issues:

1. Some rows in merge_request_diffs had truly huge numbers of commits and diffs
   serialised - one in particular had 26,000 commits!
2. The jobs were sometimes on Sidekiq hosts with frequent OOM errors, leading to
   the job being lost.

The previous commit adds more logging, and a more robust insertion method. This
commit reschedules the jobs, with a generous pause between each.
2017-09-29 11:56:08 +01:00
Sean McGivern 1507ff8ab7 Make MR diff background migration less likely to time out
This version does not use transactions, but individual statements. As we have
unique constraints on the target tables for the inserts, we can just ignore
uniqueness violations there (as long as we always insert the same batch size, in
the same order).

This means the spec now must use truncation, not a transaction, as the
uniqueness violation means that the whole transaction for that spec would be
invalid, which isn't what we'd want. In real-world use, this isn't run in a
transaction anyway.

This commit also wraps unhandled exceptions, for easier finding in Sentry, and
logs with a consistent format, for easier searching.
2017-09-29 11:56:08 +01:00
Tim Zallmann 705a840d2e Not the Test will also work with other tests before 2017-09-29 12:02:43 +02:00
Sean McGivern 917194153f Insert at most 1,000 rows at once in MR diff background migration
We were hitting the statement timeout for very large MR diffs. Now we insert at
most 1,000 rows to `merge_request_diff_commits` in a single statement, or 100
rows to `merge_request_diff_files`.
2017-09-29 11:00:19 +01:00
Phil Hughes 8585ae61e7
Fix fork button being disabled for users who can fork to group
Previously the fork button was disabled for all users if they have
exceeded their project limit. This fixes that by changing the check
to see if the user can fork to a group instead of their own namespace.

This behaviour is already possible by visiting the new fork page
directly, so this just fixes the button being disabled.

Closes #38462
2017-09-29 10:51:26 +01:00
Tim Zallmann 0addef2e57 Merge branch 'breadcrumb-item-links' into 'master'
Fixed breadcrumb title not linking

Closes #38059

See merge request gitlab-org/gitlab-ce!14532
2017-09-29 08:46:05 +00:00
Phil Hughes d729aa7383
spec fix 2017-09-29 09:40:21 +01:00
Filipa Lacerda a481337b6a Merge branch 'remove-target-dd' into 'master'
Remove target dd

Closes #38485

See merge request gitlab-org/gitlab-ce!14558
2017-09-29 08:33:10 +00:00
Phil Hughes 333cb069af
Fixed anchored content not being scrolled into view
Correctly scrolls anchored content into view when the user loads the
page. This is most obvious when the user loads a link note in a
merge request & the page does not scroll down to the note.

Closes #38326
2017-09-29 09:24:56 +01:00
Tim Zallmann 0647484c61 Added Test for PageTitle / Removed Gitlab Part from TItle 2017-09-29 09:59:09 +02:00
Phil Hughes 5e850d5bae Merge branch '38528-build-url' into 'master'
Fixes data parameter not being sent in ajax request for jobs log

Closes #38528

See merge request gitlab-org/gitlab-ce!14564
2017-09-29 07:52:13 +00:00
Jacob Schatz 42218fcaa7 Fix karma test 2017-09-28 21:24:14 -04:00
Ahmad Sherif 4f5be9ec7b Migrate Gitlab::Git::Repository#add_tag to Gitaly
Closes gitaly#601
2017-09-29 00:53:49 +02:00
Robert Speicher 07c3112ef5 Merge branch 'feature/migrate-repository-rm-tag-to-gitaly' into 'master'
Migrate Git::Repository#rm_tag to Gitaly

Closes gitaly#562

See merge request gitlab-org/gitlab-ce!14388
2017-09-28 22:43:37 +00:00
Ahmad Sherif 3944e16b4b Migrate Git::Repository#rm_tag to Gitaly
Closes gitaly#562
2017-09-28 23:36:40 +02:00
Jacob Schatz 3d899a7d2e Merge branch 'acet-repo-editor-prevent-extra-request' into 'master'
RepoEditor: Prevent extra network call for already opened files.

Closes #38256

See merge request gitlab-org/gitlab-ce!14489
2017-09-28 19:52:36 +00:00
Robert Speicher ff7deb33ae Merge branch 'fix-mr-sidebar-counter-after-merge' into 'master'
Clear merge requests counter cache after merge

Closes gitlab-ee#3573 and #38344

See merge request gitlab-org/gitlab-ce!14563
2017-09-28 17:47:18 +00:00
Douwe Maan ae03a52f09 Merge branch 'hashed-storage-migration-path' into 'master'
Hashed storage migration path

Closes gitlab-ee#3118

See merge request gitlab-org/gitlab-ce!14067
2017-09-28 17:26:16 +00:00
Markus Koller e9eae3eb0d Support custom attributes on users 2017-09-28 16:49:42 +00:00
Filipa Lacerda 2b407b9140
Fixes data parameter not being sent in ajax request for jobs log 2017-09-28 17:24:24 +01:00
Sean McGivern dc32128de9 Clear merge requests counter cache after merge
Before this change, the MR counter in the sidebar would be wrong if an MR had
been merged since the last update, but not opened or closed, as merging did not
trigger a counter cache update.
2017-09-28 17:09:35 +01:00
Jacob Schatz cd5896ed7b Merge branch 'jramsay-spelling-occurred' into 'master'
Fix spelling of occurred

See merge request gitlab-org/gitlab-ce!14488
2017-09-28 15:56:38 +00:00
Gabriel Mazetto f4de14d71f
Add support to migrate existing projects to Hashed Storage async 2017-09-28 16:32:14 +01:00
Sean McGivern 3209c07140 Merge branch 'dm-api-unauthorized' into 'master'
Make sure API responds with 401 when invalid authentication info is provided

Closes #38438

See merge request gitlab-org/gitlab-ce!14525
2017-09-28 14:42:40 +00:00
Douwe Maan 576425f029 Merge branch '38319-nomethoderror-undefined-method-sha-for-nil-nilclass' into 'master'
Resolve "NoMethodError: undefined method `sha' for nil:NilClass"

Closes #38319

See merge request gitlab-org/gitlab-ce!14547
2017-09-28 13:12:45 +00:00
Gabriel Mazetto 38607b48b6
[Backported from EE] Readonly flag for Projects
This is used in EE for the storage migration, and we want to use this
in CE as well to be able to migrate projects to hashed_storage.
2017-09-28 13:20:11 +01:00
Douwe Maan b6c5a73c0b Make sure API responds with 401 when invalid authentication info is provided 2017-09-28 14:17:52 +02:00
Filipa Lacerda 023a61505c Merge branch 'commit-side-by-side-comment' into 'master'
Fixes commit comments in parallel diff view

Closes #38117

See merge request gitlab-org/gitlab-ce!14529
2017-09-28 10:11:12 +00:00
Sean McGivern b63e8d64c1 Handle error when fetching ref for MR with deleted source branch
If the ref doesn't exist, and the source branch is deleted, we can't get it back
easily. Previously, we ignored this error by shelling out, so replicate that
behaviour.
2017-09-28 11:11:10 +01:00
Grzegorz Bizon 355a1d8a6f Merge branch 'refactor-services' into 'master'
Refactor services to match EE signature

See merge request gitlab-org/gitlab-ce!14385
2017-09-28 08:52:00 +00:00
Sean McGivern 7e314d6180 Merge branch '38476-improve-merge-jid-cleanup-on-merge-process' into 'master'
Clean merge_jid whenever necessary on the merge process

Closes #38476

See merge request gitlab-org/gitlab-ce!14540
2017-09-28 08:45:31 +00:00
Phil Hughes d0737b1885
spec fixes 2017-09-28 09:30:33 +01:00
James Lopez 1dcb711110 refactor emails service 2017-09-28 08:46:39 +02:00
James Lopez 67d06dee30 refactor users update service 2017-09-28 08:46:39 +02:00
James Lopez f2e9ef1027 fix specs 2017-09-28 08:46:39 +02:00
Oswaldo Ferreira e38dc10c09 Clean merge_jid whenever necessary on the merge process
MergeRequest#merge_jid should be cleaned up whenever we hit a known error on MergeService#execute. This way we can keep track if the MR is really "ongoing" or "stuck"
2017-09-27 17:56:51 -03:00
Fatih Acet c25e83b536 RepoEditor: Prevent extra network call for already opened files. 2017-09-27 23:19:02 +03:00
Jacob Schatz e9f7d26f07 Merge branch 'acet-repo-editor-fix-link-linking' into 'master'
RepoEditor: Implement line and range linking.

Closes #38254

See merge request gitlab-org/gitlab-ce!14448
2017-09-27 17:23:16 +00:00
Phil Hughes 05844d8b47
Fixed breadcrumb title not linking
This fixes the breadcrumb titles not having links. This was a regression
in the updated breadcrumbs introduced in 10.0.

This introduces the link for all pages rather than selectively doing it.
This will cover issues, merge requests, pipelines, jobs etc.

Closes #38059
2017-09-27 17:06:24 +01:00
Kamil Trzciński 0bba522f74 Merge branch 'backstage/gb/refactor-pipeline-create-service' into 'master'
Refactor a service responsible for creating a pipeline

Closes #37563 and #34415

See merge request gitlab-org/gitlab-ce!14482
2017-09-27 14:44:28 +00:00
Phil Hughes fe24c0a875
Fixes commit comments in side-by-side diff view
This was caused by the `notes` global class not existing when the
`file_comment_button` code is run. The notes class was used to check
if the diff is currently in parallel view or not. To get around this
I've added a check into the `file_comment_button` JS to check if the
view is currently parallel or not.

Closes #38117
2017-09-27 15:38:13 +01:00