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
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
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
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
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
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
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
Robert Speicher
d0606b5ff4
Merge branch 'dm-bitbucket-import-truncated-shas' into 'master'
...
Fix bug that caused merge requests with diff notes imported from Bitbucket to raise errors
Closes #38100
See merge request gitlab-org/gitlab-ce!14438
2017-09-26 14:16:46 +00:00
Grzegorz Bizon
835bdcb88e
Add specs for pipeline chain builder sequence class
2017-09-26 14:24:40 +02:00
Grzegorz Bizon
f6bd832f3f
Fix some code style offenses in pipeline chain classes
2017-09-26 14:15:05 +02:00
Grzegorz Bizon
53cad50043
Add missing tests for pipeline chain access validator
2017-09-26 14:13:08 +02:00
Grzegorz Bizon
6a9cfdde02
Add specs for pipeline builder that validates config
2017-09-26 14:04:28 +02:00
Grzegorz Bizon
39f05fd85e
Add specs for pipeline builder repository validator
2017-09-26 13:40:37 +02:00
Grzegorz Bizon
652ecff91b
Add specs for builder chain that persist a pipeline
2017-09-26 13:34:53 +02:00
Grzegorz Bizon
2432d5bd9e
Add specs for builder chain step that skipps pipelines
2017-09-26 13:22:28 +02:00
Grzegorz Bizon
da15b38850
Add specs for pipeline builder abilities validator
2017-09-26 13:00:29 +02:00
Grzegorz Bizon
fa3fb23fb1
Move pipeline builder validation chain to a module
2017-09-26 11:53:50 +02:00
Grzegorz Bizon
609fa45f0e
Split pipeline chain builder validation class
2017-09-26 11:50:47 +02:00
Douwe Maan
c19030332c
Add specs
2017-09-25 16:56:14 +02:00
Grzegorz Bizon
8f47d484da
Extract pipeline chain builder classes from service
2017-09-25 16:22:00 +02:00
Grzegorz Bizon
1209f4f671
Move related pipeline class to new pipeline module
2017-09-25 13:22:04 +02:00
Kim "BKC" Carlbäcker
9c16958c30
Migrate Gitlab::Git::Repository#log to Gitaly
2017-09-25 11:34:10 +02:00
Douwe Maan
7cf8e0981a
Merge branch '36549-circuit-breaker-handles-missing-storages' into 'master'
...
Allow the git circuit breaker to correctly handle missing repository storages
Closes #36549
See merge request gitlab-org/gitlab-ce!14417
2017-09-22 20:24:22 +00:00
Rémy Coutable
41eea4fd6a
Merge branch '33328-usage-ping-for-gitlab-features-and-components' into 'master'
...
Adds gitlab features and components to usage ping data.
Closes #33328
See merge request gitlab-org/gitlab-ce!14305
2017-09-22 11:06:02 +00:00
Douwe Maan
408c595292
Merge branch 'sh-blob-raw-check' into 'master'
...
Ensure that Blob.raw returns always returns a valid blob object
See merge request gitlab-org/gitlab-ce!14412
2017-09-22 10:40:27 +00:00
Nick Thomas
ba0ebbb510
Allow the git circuit breaker to correctly handle missing repository storages
2017-09-22 10:05:28 +01:00
Rémy Coutable
d2d5549d2a
Merge branch 'fix-multi-line-hook-output' into 'master'
...
Display full pre-receive and post-receive hook output in GitLab UI
Closes #25214
See merge request gitlab-org/gitlab-ce!14222
2017-09-22 06:12:58 +00:00
Stan Hu
794b4c5579
Ensure that Blob.raw returns always returns a valid blob object
...
In gitlab-org/gitlab-ee!2976 , we saw that a given OID could point
to a commit, which would cause the delta size check to fail.
Gitaly already returns nil if the OID isn't a blob, so this change
makes the Rugged implementation consistent.
2017-09-21 14:49:51 -04:00
Robert Speicher
6c026c3670
Merge branch 'dm-closing-issue-urls' into 'master'
...
Correctly detect multiple issue URLs after 'Closes...' in MR descriptions
Closes #33745
See merge request gitlab-org/gitlab-ce!14411
2017-09-21 17:26:41 +00:00
Tiago Botelho
25932308c0
Adds gitlab features and components to usage ping data.
2017-09-21 14:47:35 +01:00
Robin Bobbitt
fbe205f92f
Display full pre-receive and post-receive hook output in GitLab UI
2017-09-21 09:13:00 -04:00
Tiago Botelho
4c5acddaa7
Adds EE tag detection to remove_old in gitlab backup.
2017-09-21 13:00:58 +01:00
Douwe Maan
a3d5c82f53
Correctly detect multiple issue URLs after 'Closes...' in MR descriptions
2017-09-21 12:42:25 +02:00
Douwe Maan
70dc7e9a99
Merge branch 'gitlab-git-popen' into 'master'
...
Use Gitlab::Git's Popen on that module's code
Closes gitaly#597
See merge request gitlab-org/gitlab-ce!14237
2017-09-20 15:15:53 +00:00
Rémy Coutable
2ce49b53b9
Merge branch '32796-tighten-up-remove-old-while-backing-up-gitlab' into 'master'
...
Tighten up remove_old regex from gitlab backup manager.
Closes #32796
See merge request gitlab-org/gitlab-ce!14333
2017-09-20 15:15:39 +00:00
Alejandro Rodríguez
34eeac6108
Use Gitlab::Git's Popen on that module's code
...
This allows the current Gitaly migration to depend on less code outside
of the Gitlab::Git module
2017-09-20 13:21:54 +02:00
Tiago Botelho
0a60698892
Tighten up remove_old regex from gitlab backup manager.
2017-09-20 12:11:14 +01:00
Grzegorz Bizon
b49bd4d3bb
Fix rewriting issue references with group milestones
2017-09-20 09:55:54 +00:00
Robert Speicher
8aac719fd6
Merge branch 'fix/gitaly-commit-diff-rpc-encoding-error' into 'master'
...
Encode paths properly for Gitaly Commit{Diff,Delta}
Closes gitaly#589
See merge request gitlab-org/gitlab-ce!14361
2017-09-20 00:32:58 +00:00
Kamil Trzciński
c60bdf9189
Merge branch 'backstage/gb/jobs-triggering-policy-specifications' into 'master'
...
Implement job policy specifications
Closes #37280
See merge request gitlab-org/gitlab-ce!14265
2017-09-19 15:45:44 +00:00
Ahmad Sherif
28d95e10a4
Encode paths properly for Gitaly Commit{Diff,Delta}
...
Fixes gitaly#589
2017-09-19 13:35:22 +02:00
Andrew Newdigate
64d7ec0a9e
Detect n+1 issues involving Gitaly
2017-09-19 10:55:37 +00:00
Grzegorz Bizon
14966419e3
Fix closing braces in YAML processor specs
2017-09-19 10:35:18 +02:00
Rémy Coutable
ce5abaae80
Merge branch '37789-followup-for-read-registry-change' into 'master'
...
Clean up read_registry scope changes
Closes #37789
See merge request gitlab-org/gitlab-ce!14307
2017-09-18 14:42:37 +00:00
Grzegorz Bizon
f028718641
Raise exception when initializing unknown policy
2017-09-18 14:39:42 +02:00