Commit Graph

9963 Commits

Author SHA1 Message Date
Kamil Trzciński b8e47d7263 Merge branch 'fix-kubectl-180' into 'master'
Fix broken certificate-authority-data with kubectl >= 1.8.0

Closes #38685

See merge request gitlab-org/gitlab-ce!14635
2017-10-03 08:57:12 +00:00
Andrew Newdigate 27cc1c2b28 Fix for Gitaly nil encoding issue 2017-10-03 08:03:19 +00:00
Douwe Maan d14230dd6b Merge branch 'gitaly-get-archive' into 'master'
Send extra Gitaly params for `send_git_archive` if needed

See merge request gitlab-org/gitlab-ce!14605
2017-10-03 07:40:20 +00:00
Alessio Caiazza 40c6128b39
Fix broken certificate-authority-data with kubectl >= 1.8.0 2017-10-03 09:10:40 +02:00
Douwe Maan bdc50ed779 Merge branch '38635-fix-gitlab-check-git-ssh-config' into 'master'
Whitelist authorized_keys.lock in the gitlab:check rake task

Closes #38635

See merge request gitlab-org/gitlab-ce!14624
2017-10-03 06:51:14 +00:00
Robert Speicher 95f613837d Merge branch 'sh-fix-import-repos' into 'master'
Fix gitlab-rake gitlab:import:repos task

Closes #37682

See merge request gitlab-org/gitlab-ce!14597
2017-10-02 17:34:08 +00:00
Stan Hu bac2916030 Fix gitlab-rake gitlab:import:repos task
Because of a change in GitLab 9.5.4 to prevent users from assuming control of
a repository already on disk, the import task broke. Imports would fail with
the message, "There is already a repository with that name on disk".

This change skips the validation when the import is done from the
command-line.

Closes #37682
2017-10-02 08:51:37 -07:00
Alejandro Rodríguez fce708c154 Send extra Gitaly params for `send_git_archive` if needed 2017-10-02 12:39:42 -03:00
Sean McGivern 1440342fcf Merge branch 'log-update-ref-errors' into 'master'
Log update-ref errors in OperationService

See merge request gitlab-org/gitlab-ce!14627
2017-10-02 15:32:59 +00:00
Robert Speicher 8bd9d0963b Merge branch 'sh-thread-safe-markdown' into 'master'
Make Redcarpet Markdown renderer thread-safe

Closes #36637

See merge request gitlab-org/gitlab-ce!14604
2017-10-02 15:30:10 +00:00
Douwe Maan b40192a946 Merge branch '33493-attempt-to-link-saml-users-to-ldap-by-email' into 'master'
Attempt to link saml users to ldap by email

Closes #33493

See merge request gitlab-org/gitlab-ce!14216
2017-10-02 15:24:48 +00:00
Douwe Maan 4716e81f9d Merge branch 'revert-configurable-size-limits' into 'master'
Revert "Increase diff limits to 100 KB for collapse and 200 KB overall"

See merge request gitlab-org/gitlab-ce!14628
2017-10-02 14:39:55 +00:00
Stan Hu 15bebda7f8 Make Redcarpet Markdown renderer thread-safe
The Redcarpet library is not thread-safe as described in
https://github.com/vmg/redcarpet/issues/570. Since we instantiate
the Redcarpet renderer in a class variable, multiple Sidekiq threads
can access the work buffer and corrupt the state. We work around
this issue by memoizing the renderer on a thread basis.

Closes #36637
2017-10-02 07:16:00 -07:00
Sean McGivern a5d47bb063 Revert "Increase diff limits to 100 KB for collapse and 200 KB overall"
This reverts commit 1d3c33b57e.
2017-10-02 13:54:40 +01:00
Jacob Vosmaer 581272f6d4 Log update-ref errors in OperationService 2017-10-02 14:39:09 +02:00
Tiago Botelho 011c168bff Refactors SAML identity creation in gl_user. 2017-10-02 11:35:09 +01:00
Nick Thomas 43c712f5dd
Whitelist authorized_keys.lock in the gitlab:check rake task 2017-10-02 11:25:02 +01:00
Sean McGivern 42d7d35580 Merge branch 'sh-restore-all-refs-backup' into 'master'
Ensure all refs are restored on a backup/restore

Closes #38352

See merge request gitlab-org/gitlab-ce!14595
2017-10-02 09:52:35 +00:00
Sean McGivern 0a69abdb28 Merge branch 'gitaly-add-branch' into 'master'
Implement OperationService.UserAddBranch Gitaly RPC

Closes gitaly#544

See merge request gitlab-org/gitlab-ce!14522
2017-10-02 09:27:23 +00:00
Sean McGivern 664cd27faa Merge branch '38571-fix-exception-in-raven-report' into 'master'
Ensure no exception is raised when Raven tries to get the current user in API context

Closes #38571

See merge request gitlab-org/gitlab-ce!14580
2017-10-02 08:35:12 +00:00
Douwe Maan a030dc4199 Merge branch 'remote_user' into 'master'
Add GL_USERNAME environment variable for hooks

See merge request gitlab-org/gitlab-ce!13264
2017-10-02 07:16:22 +00:00
Andrew Newdigate 2146d6253f Add environment variable to bypass n+1 2017-09-30 16:26:23 +00:00
Alejandro Rodríguez fa5f0164eb Implement OperationService.UserAddBranch Gitaly RPC 2017-09-30 00:58:56 -03:00
Alejandro Rodríguez 16f850033f Populate `Gitlay::Repository`'s `gl_repository` field 2017-09-30 00:58:56 -03:00
Stan Hu f3f304dc06 Ensure all refs are restored on a restore from backup
To restore all refs from a bundle, we need to use the --mirror option to
ensure that all refs are properly restored. Without this, refs such as
`refs/merge-requests/X` and `refs/keep-around/Y` would be omitted, which
exposed a bug as described in https://gitlab.com/gitlab-org/gitlab-ce/issues/38319#note_41648608.

Closes #38352
2017-09-29 15:17:05 -07:00
David Turner 01ce58bde4 add username to authorized result, so that gitlab-shell can pass it to hooks 2017-09-29 18:16:55 -04:00
David Turner dbcf48af8b Add username as GL_USERNAME in hooks (http)
When calling pre-receive, post-receive, and update hooks, add the GitLab
username as the GL_USERNAME environment variable.

This patch only handles cases where pushes are over http, or via
the web interface.  Later, we will address the ssh case.
2017-09-29 18:12:03 -04:00
David Turner 999b7e553b remove unused from_gitaly method 2017-09-29 18:12:02 -04:00
Rémy Coutable 3040b994df
Ensure no exception is raised when Raven tries to get the current user in API context
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-09-29 18:57:22 +02:00
Jacob Vosmaer e5fecc3a37 Create repositories via Gitaly 2017-09-29 18:27:06 +02: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 Vosmaer (GitLab) 403712f06e Make Repository#has_visible_content more efficient 2017-09-29 13:08:44 +00:00
Lin Jen-Shin (godfat) 8bac6e41ef Fix notes type created from import 2017-09-29 11:18:58 +00: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
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
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
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
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
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
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
Sean McGivern e03bad12bf Merge branch 'zj-repo-gitaly' into 'master'
RepositoryExists is always called with #gitaly_migration

Closes #38333

See merge request gitlab-org/gitlab-ce!14513
2017-09-28 08:56:02 +00: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 9621dd0c9d refactor services to match EE signature 2017-09-28 08:46:39 +02:00
Andrew Newdigate 121057c52b Rolling back change to n+1 detection 2017-09-27 19:28:36 +01:00