Commit Graph

77 Commits

Author SHA1 Message Date
Stan Hu 583c12acf4 Use persistent Redis cluster for Workhorse pub/sub notifications
Previously, in Omnibus, Workhorse expected to listen via the Redis
shared state cluster for the `workhorse:notifications` publish/subscribe
channel, but the Rails code was using the Sidekiq queue cluster for
this. To fix this inconsistency, we make the Rails code use the
persistent cluster, since we don't want Workhorse to be looking at
anything Sidekiq-related.
2019-07-22 10:23:07 -07:00
Nick Thomas 4d52131dcf
Add a feature flag for subdirectory archives 2019-04-16 15:16:23 +01:00
Nick Thomas 670b2c1af5
JSON-encoded binary fields should use Base64::encode64
It is not interoperable to use Base64::urlsafe_encode64 for fields in
JSON that contain binary (as opposed to UTF8-safe) data. For instance,
the Golang JSON decoder (which is what gitlab-workhorse uses) insists
upon the standard base64 encoding.
2019-04-16 15:16:23 +01:00
Nick Thomas 2845e8d973
Revert "Revert "Merge branch '24704-download-repository-path' into 'master'""
This reverts commit 171818df0a.
2019-04-16 15:16:23 +01:00
Patrick Bajao 171818df0a Revert "Merge branch '24704-download-repository-path' into 'master'"
This reverts commit 6c75bd015c, reversing
changes made to 1be7f5aaa3.
2019-04-11 15:49:53 +08:00
Francisco Javier López 8a134f4c65 Renamed terminal_specification to channel_specification
We're moving from using terminology related to terminals when
we refer to Websockets connections in Workhorse.
It's more appropiate a concept like channel.
2019-04-04 18:32:02 +00:00
Patrick Bajao 6766a0a144 Download a folder from repository
Add `GetArchiveRequest` to git-archive params.

Modifies `Git::Repository#archive_metadata` to append `path`
to `ArchivePrefix` so it'll not hit the cache of repository archive
when it already exists.
2019-04-02 22:07:16 +08:00
Bob Van Landuyt d36415b754 Allow multiple repositories per project
This changes the repository type from a binary `wiki?` to a type. So
we can have more than 2 repository types.

Now everywhere we called `.wiki?` and expected a boolean, we check
that type.
2019-03-26 13:21:03 +01:00
Nick Thomas 0ce7c29fb7
Update GitLab Workhorse to v8.0.0 2018-12-11 16:23:23 +00:00
Rubén Dávila 007b81b8e2 Add receive_max_input_size setting to Application settings
If user has configure the setting then it will be passed to gitlab-shell
and gitlab-workhorse
2018-09-07 12:27:35 -05:00
Jacob Vosmaer 723f74d49d Remove last flags from Blob and Workhorse 2018-07-11 12:59:15 +02:00
Douwe Maan 937d916b5f Merge branch 'gitaly-mandatory-20180709-jv' into 'master'
Use Gitaly for fetches and creating bundles

Closes gitaly#387, gitaly#874, gitaly#750, and gitaly#665

See merge request gitlab-org/gitlab-ce!20490
2018-07-10 10:22:05 +00:00
Lin Jen-Shin 9286f5b934 Use stable gitlab-styles and eliminate offenses 2018-07-09 21:13:08 +08:00
Jacob Vosmaer a4e75e7a83 Use Gitaly for fetches and creating bundles 2018-07-09 12:50:17 +02:00
Jacob Vosmaer (GitLab) 3082b7d1c2 Make blob and other RPC's mandatory 2018-07-09 10:02:02 +00:00
Jacob Vosmaer b012abee8b Make all Gitaly diff flags mandatory 2018-07-06 12:01:15 +02:00
Zeger-Jan van de Weg 94b209b32c
Move git archives downloading to Gitaly 2018-05-17 09:31:50 +02:00
Nick Thomas 672733aa66
Add an API endpoint to download git repository snapshots 2018-04-19 17:25:01 +01:00
James Ramsay 07f517d441 Add new repository archive route
Repository archives are always named `<project>-<ref>-<sha>` even if
the ref is a commit. A consequence of always including the sha even
for tags is that packaging a release is more difficult because both
the ref and sha must be known by the packager.

- add `<project>/-/archive/<ref>/<filename>.<format>` route using the
`-` separator to prevent namespace collisions. If the filename is
`<project>-<ref>` or the ref is a sha, the sha will be omitted,
otherwise the default filename will be used.
- deprecate previous archive route `repository/<ref>/archive`
2018-04-06 08:45:17 -04:00
Jacob Vosmaer (GitLab) e5e4cd96cf Gitlab-workhorse still needs RepoPath on Git HTTP 2018-03-29 08:35:33 +00:00
Jacob Vosmaer 23936ff20d Make all workhorse gitaly calls opt-out, take 2 2018-03-28 14:13:06 +02:00
Sean McGivern 06afa5a3ff Revert "Merge branch 'workhorse-gitaly-mandatory' into 'master'"
This reverts merge request !18002
2018-03-28 09:53:42 +00:00
Jacob Vosmaer (GitLab) c43e18fc49 Remove some easy cases of 'path_to_repo' use 2018-03-28 09:21:32 +00:00
Jacob Vosmaer (GitLab) f432fb9a4f Make all workhorse gitaly calls opt-out 2018-03-27 10:47:15 +00:00
Nick Thomas 6b0c6e69e1
Use hashed storage in the specs 2018-02-07 13:40:46 +00:00
Kamil Trzciński 11f882ca43 Upgrade GitLab Workhorse to v3.6.0 2018-02-06 15:34:44 +01:00
Jacob Vosmaer d805cd3606 Add option to disable git archive caching in workhorse 2018-01-09 16:59:46 +01:00
Nick Thomas 527f87dfdb
Support show-all-refs for git over HTTP 2017-10-30 15:20:36 +00:00
Ahmad Sherif 03f3cee0c7 Fix a liniting error introduced by !14652 2017-10-10 14:58:31 +02:00
Robert Speicher 377c10b493 Merge branch 'feature/migrate-workhorse-send-git-diff-patch-to-gitaly' into 'master'
Migrate Workhorse Send{Diff,Patch} to Gitaly

See merge request gitlab-org/gitlab-ce!14652
2017-10-10 11:02:25 +00:00
Ahmad Sherif 618dd9e4b2 Migrate Workhorse Send{Diff,Patch} to Gitaly 2017-10-09 14:18:05 +02:00
Jacopo 0ce6785851 Replaces `tag: true` into `:tag` in the specs
Replaces all the explicit include metadata syntax in the specs (tag:
true) into the implicit one (:tag).
Added a cop to prevent future errors and handle autocorrection.
2017-10-07 13:57:54 +02:00
Alejandro Rodríguez 40060b18c7 [ci skip] Fix archive spec descrptions 2017-10-02 15:33:31 -03: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 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
Alejandro Rodríguez 16f850033f Populate `Gitlay::Repository`'s `gl_repository` field 2017-09-30 00:58:56 -03: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
Jacob Vosmaer e5fecc3a37 Create repositories via Gitaly 2017-09-29 18:27:06 +02:00
Ahmad Sherif 3944e16b4b Migrate Git::Repository#rm_tag to Gitaly
Closes gitaly#562
2017-09-28 23:36:40 +02:00
Jacob Vosmaer (GitLab) 35acc4cbbe Make Gitaly PostUploadPack mandatory 2017-09-01 08:45:19 +00:00
Douwe Maan 97b768508c Merge branch 'workhorse-deprecate-gitaly-address' into 'master'
Remove deprecated field from workhorse API responses

See merge request !13567
2017-08-15 15:56:02 +00:00
Jacob Vosmaer 4405c8e393 Remove deprecated field from workhorse API responses 2017-08-15 16:39:31 +02:00
Ahmad Sherif daa0137b41 Migrate force push check to Gitaly 2017-08-11 19:42:17 +02:00
Rémy Coutable cddc5cacfb Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Jacob Vosmaer a78306e7fa Enable gitaly_post_upload_pack by default 2017-07-25 15:23:41 +02:00
Ahmad Sherif 1300736850 Use a unique feature name for Workhorse send blob migration 2017-07-24 07:07:20 +02:00
Robert Speicher 9bfe49c2b1 Merge branch 'migrate-workhorse-send-blob-to-gitaly' into 'master'
Migrate Workhorse SendBlob to Gitaly

Closes gitaly#356

See merge request !12313
2017-07-12 16:57:57 +00:00
Ahmad Sherif 08ce213c41 Migrate Workhorse SendBlob to Gitaly 2017-07-11 16:55:00 +02:00
Paul Charlton cb3b4a15e6 Support multiple Redis instances based on queue type 2017-07-11 03:35:47 +00:00