| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
| |
By default, we hide certain refs (e.g. keep-around/XXX) to save user
download time. We need to preserve these references on secondary Geo
nodes to have a true copy.
|
| |
|
|
|
|
|
|
|
| |
'86-follow-up-from-use-gl_repository-if-present-when-enqueing-sidekiq-postreceive-jobs' into 'master'"
This reverts commit fa6343515ba65423e9de4c98c6005facc6059938, reversing
changes made to 62af7f6af72728cecb98c5275d8b7aeb3953e564.
|
|\
| |
| |
| | |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
| | |
|
|/
|
|
|
|
|
| |
In the main Rails app we use exactly the same code for
/api/v3/internal and /api/v4/internal
This means that we can move gitlab-shell to V4 in preparation
for sunsetting V3
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Workaround for a bug in the HTTPUNIX client.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Starting version 2.11, git changed the way the pre-receive flow works.
- Previously, the new potential objects would be added to the main repo. If the
pre-receive passes, the new objects stay in the repo but are linked up. If
the pre-receive fails, the new objects stay orphaned in the repo, and are
cleaned up during the next `git gc`.
- In 2.11, the new potential objects are added to a temporary "alternate object
directory", that git creates for this purpose. If the pre-receive passes, the
objects from the alternate object directory are migrated to the main repo. If
the pre-receive fails the alternate object directory is simply deleted.
2. In our workflow, the pre-recieve script calls the `/allowed` endpoint on the
rails server. This `/allowed` endpoint calls out directly to git to perform
various checks. These direct calls to git do _not_ have the necessary
environment variables set which allow access to the "alternate object
directory" (explained above). Therefore these calls to git are not able to
access any of the new potential objects to be added during this push.
3. We fix this by passing the relevant environment variables
(GIT_ALTERNATE_OBJECT_DIRECTORIES, GIT_OBJECT_DIRECTORY, and
GIT_QUARANTINE_PATH) to the `/allowed` endpoint, which will then include
these environment variables while calling out to git.
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
| |
|
|
|
|
| |
- Required changes to GitLab Shell include the actual handling of the `git-lfs-authenticate` command and the retrieval of the correct credentials.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
update spec
different text for new and existing merge request
update spec
fix style
switch order of messages
enhance message appearance
remove extra spaces
|
|
|
|
| |
fallback value
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
`make update-redis` will clone the library and adjust the paths properly
|
|
|
|
| |
Closes gitlab-org/gitlab-ce#17329
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This provides the integration point to the internal API to get the
ssh key from the internal API.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is well known that UNIX sockets are faster than TCP over loopback.
E.g. on my machine according to lmbench[1] they have ~ 2 times
lower latency and ~ 2-3 times more throughput compared to TCP over
loopback:
*Local* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host OS 2p/0K Pipe AF UDP RPC/ TCP RPC/ TCP
ctxsw UNIX UDP TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
teco Linux 4.2.0-1 13.8 29.2 26.8 45.0 47.9 48.5 55.5 45.
*Local* Communication bandwidths in MB/s - bigger is better
-----------------------------------------------------------------------------
Host OS Pipe AF TCP File Mmap Bcopy Bcopy Mem Mem
UNIX reread reread (libc) (hand) read write
--------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
teco Linux 4.2.0-1 1084 4353 1493 2329.1 3720.7 1613.8 1109.2 3402 1404.
The same ratio usually holds for servers.
Also UNIX sockets, since they reside on filesystem, besides being faster with
less latency, have one another nice property: access permissions to them are
managed the same way access to files is.
Because of lower latencies and higher throughput - for performance reasons, and
for easier security, it makes sense to interconnect services on one machine via
UNIX sockets and talk via TCP only to outside world.
All internal services inside GitLab can talk to each other via UNIX socket
already and only gitlab-shell was missing support to talk to Unicorn via UNIX
socket.
Let's teach gitlab-shell to talk via UNIX sockets.
[1] http://www.bitmover.com/lmbench/
~~~~
In this patch we
- add URI::HTTPUNIX to handle http+unix:// URI scheme
- add Net::HTTPUNIX to handle "connect via unix socket and then talk http"
- adjust GitlabNet#http_client_for() accordingly
- adjust documentation in config.yml.example
The http+unix:// scheme is not reinvented anew: the idea about its structure is
quite logical an was already established at least in requests-unixsocket python
package:
http://fixall.online/theres-no-need-to-reinvent-the-wheelhttpsgithubcommsabramorequests-unixsocketurl/241810/
https://github.com/msabramo/requests-unixsocket
|
|\
| |
| | |
Allow to configure location of the secret file
|
| | |
|
| |
| |
| |
| |
| | |
Expect broadcast message API endpoint to return 200 with empty JSON if
no broadcast messages available
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this 'require' statement, you get the following error:
```
$ git ls-remote origin
/home/git/gitlab-shell/lib/gitlab_net.rb:30:in `check_access':
uninitialized constant GitlabNet::GitAccessStatus (NameError)
from /home/git/gitlab-shell/lib/gitlab_shell.rb:63:in `validate_access'
from /home/git/gitlab-shell/lib/gitlab_shell.rb:24:in `exec'
from /home/git/gitlab-shell/bin/gitlab-shell:16:in `<main>'
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
|
|
|
|
| |
This reverts commit f8453da5868dd7a23d0f2f3da7a45e33c441d1db.
|