summaryrefslogtreecommitdiff
path: root/internal/command/shared
Commit message (Collapse)AuthorAgeFilesLines
* Perform HTTP request to primary on Geo pushIgor Drozdov2023-03-031-0/+3
| | | | | | | | | Currently, we perform a request to Gitlab Rails that proxies the request to primary However, it causes timeouts on big pushes and consumes large amount of memory. We can perform an HTTP request directly from Gitlab Shell instead and stream the response to the user
* go: Bump major version to v14Patrick Steinhardt2022-07-054-20/+20
| | | | | | | | | | | | | While gitlab-shell currently has a major version of v14, the module path it exposes is not using that major version like it is required by the Go standard. This makes it impossible for dependents to import gitlab-shell as a dependency without using a commit as version. Fix this by changing the module path of gitlab-shell to instead be `gitlab.com/gitlab-org/gitlab-shell/v14` and adjust all imports accordingly. Changelog: fixed
* Improve logging for non-git commands499-log-non-git-commandsNick Thomas2021-10-131-8/+10
| | | | | | | | | Several of our commands only touch the internal API, and go nowhere near Gitaly. Improve logging for each of these in a single MR. In general, we want to be able to tell what happened in the execution of each command, and to track failures down to a specific line of code. Changelog: added
* Add context fields to loggingid-context-fieldsIgor Drozdov2021-09-151-1/+1
| | | | It adds correlation ids wherever possible
* refactor: move away from ioutil (deprecated)feistel2021-08-192-7/+7
|
* Switch to labkit/log for logging functionalityIgor Drozdov2021-07-221-1/+2
|
* Fix the Geo SSH push proxy hangingValery Sizov2021-07-012-5/+27
| | | | | | | | | | Geo SSH proxy push currently impossible when the only action that happens is branch removal. This fix works in a way that it waits for flush packet from git and then checks pkt lines to determine is pack data is expected. The thing is that git doesnt send pack data when only branch removal happens. Explanation is in https://gitlab.com/gitlab-org/gitlab/-/issues/330494
* Replace cleanup functions with t.CleanupIgor Drozdov2021-03-172-11/+7
| | | | | In this case we don't need to propagate cleanup function. It simplifies the code.
* Make it possible to propagate correlation ID across processesStan Hu2020-09-204-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, gitlab-shell did not pass a context through the application. Correlation IDs were generated down the call stack instead of passed around from the start execution. This has several potential downsides: 1. It's easier for programming mistakes to be made in future that lead to multiple correlation IDs being generated for a single request. 2. Correlation IDs cannot be passed in from upstream requests 3. Other advantages of context passing, such as distributed tracing is not possible. This commit changes the behavior: 1. Extract the correlation ID from the environment at the start of the application. 2. If no correlation ID exists, generate a random one. 3. Pass the correlation ID to the GitLabNet API requests. This change also enables other clients of GitLabNet (e.g. Gitaly) to pass along the correlation ID in the internal API requests (https://gitlab.com/gitlab-org/gitaly/-/issues/2725). Fixes https://gitlab.com/gitlab-org/gitlab-shell/-/issues/474
* Move gitlabnet client to client packagejc-refactor-gitlabnet-clientJohn Cai2020-05-043-3/+5
|
* Geo Pull custom action supportAsh McKenzie2020-04-172-8/+121
|
* Extract customaction into a separate moduleid-extract-custom-action-in-separate-moduleIgor Drozdov2020-04-142-0/+180
| | | | We'll reuse this module for uploadpack in the future
* More consistent console messages (golang)Ash McKenzie2019-10-233-6/+4
|
* Rename import pathsNick Thomas2019-10-182-9/+9
|
* Move go code up one levelNick Thomas2019-10-183-0/+134