This project is mirrored from https://gitlab.com/gitlab-org/gitaly.git.
Pull mirroring updated .
- May 05, 2022
-
-
John Cai authored
-
Patrick Steinhardt authored
gitaly: Shorten maximum internal socket path length See merge request gitlab-org/gitaly!4523
-
Patrick Steinhardt authored
go.mod: Remove exclude directive See merge request gitlab-org/gitaly!4525
-
Patrick Steinhardt authored
With the migration to the new runtime directory, Gitaly has moved its internal socket directory as well. Unfortunately, this change resulted in an expansion of the internal socket path length, and because Unix systems put a limit on Unix socket paths this has caused Gitaly to not come up on some systems anymore. This problem is entirely fixable by the administrator by configuring a different runtime directory path that has a shorter prefix. But we can at least try to shorten the paths we generate a bit. Right now, Gitaly creates three different types of internal sockets: - The internal socket that is used e.g. by `gitaly-hooks` to connect back to Gitaly. This file is created as `internal_${PID}.sock`. Including the PID is not required anymore though: the runtime directory always contains `gitaly-${PID}` anyway. So we can easily shorten this to just `intern`. This leaves us with a socket name length of 6. - The Ruby worker sockets, which are created as `ruby.$N`. `$N` is the number of any worker, and typically shouldn't be larger than in the tens. This leaves us with a typical socket name length of 7. - The internal test socket that is created to verify whether we can create and connect to internal sockets. This is done as a sanity check to alert administrators early on in case the socket path length exceeds the system's limits. Right now it's created as `test-XXXX.sock`, but given that we're about to change the naming strategy we must only ensure that it's as long as the longest socket we're creating. Furthermore, we don't need to create it with a random part anymore given that the runtime directory is keyed by PID. We thus use `tsocket`, which has a socket name length of 7. With these changes in place we reduce the maximum socket name length from 19 characters to 7 characters, which gives us administrators 12 characters more room to play with.
-
Patrick Steinhardt authored
Danger: Exclude generated protobuf files in size See merge request gitlab-org/gitaly!4526
-
Patrick Steinhardt authored
limithandler: Return structured errors Closes #4197 See merge request gitlab-org/gitaly!4507
-
- May 04, 2022
-
-
John Cai authored
tests: Reduce usage of Git worktrees in service tests See merge request gitlab-org/gitaly!4519
-
GitLab Release Tools Bot authored
[ci skip]
-
GitLab Release Tools Bot authored
[ci skip]
-
Toon Claes authored
This change adds a lightly adjusted version of the changes_size rule. This version excludes the generated protobuf files *.pb.go and *_pb.rb.
-
John Cai authored
Remove the exlude directive that prevented us from pulling in a a buggy version of grpc/grpc-go. We don't use this package anymore, so there's no reason to keep this directive. Also, newer versions of grpc/grpc-go has fixed the bug that's mentioned as the reason for the exclude. Changelog: other
-
Toon Claes authored
Return correct error when repository has no up to date replicas See merge request gitlab-org/gitaly!4518
-
Patrick Steinhardt authored
There are no tests left which require a worktree for their test setup, and we don't want to encourage anybody adding such tests back in. After all, production never uses non-bare repositories, and thus we don't want to change any assumptions by using them in our tests. Drop the ability to create worktrees in these tests.
-
Patrick Steinhardt authored
Rewrite `ListConflictFiles()` tests to not use a worktree. Tests should instead use `gittest.WriteCommit()` and `gittest.WriteTree()` to set up the repository state, which both don't require a worktree.
-
Patrick Steinhardt authored
There are no tests left which require a worktree for their test setup, and we don't want to encourage anybody adding such tests back in. After all, production never uses non-bare repositories, and thus we don't want to change any assumptions by using them in our tests. Drop the ability to create worktrees in these tests.
-
Patrick Steinhardt authored
Rewrite `TreeEntries()` tests to not use a worktree. Tests should instead use `gittest.WriteCommit()` and `gittest.WriteTree()` to set up the repository state, which both don't require a worktree.
-
Patrick Steinhardt authored
Rewrite a `ListLastCommitsForTree()` test to not use a worktree. Tests should instead use `gittest.WriteCommit()` and `gittest.WriteTree()` to set up the repository state, which both don't require a worktree.
-
Patrick Steinhardt authored
Two tests in the `CommitService` code use worktrees without really needing them. Refactor them to not use worktrees.
-
Patrick Steinhardt authored
While we already have an option that allows writing a commit with a root tree generated from a set of tree entries, we don't have any to create a commit with a precomputed tree ID. Add a new option `WithTree()` to allow this usecase.
-
Patrick Steinhardt authored
Makefile: Install bundled Git v2.36.0.gl1 Closes #4190 See merge request gitlab-org/gitaly!4516
-
- May 03, 2022
-
-
John Cai authored
In order to alert upstream clients that Gitaly has reached capacity, return a structured error of gitalypb.LimitError that clients like workhorse, gitlab-shell, and rails can parse and take action on. These errors all have the gRPC status Unavailable. Changelog: changed
-
John Cai authored
proto: Add CherryPickError type for UserCherryPick structured errors See merge request gitlab-org/gitaly!4497
-
John Cai authored
In UserCherryPick, there are some error conditions where instead of returning an error, we return OK and embed the error in the response. Instead of doing this, we want to return structured errors. This change adds the proto definition for this error.
-
Sami Hiltunen authored
GetConsistentStorages retrieves the up to date replicas of a repository. If the repository has no up to date replicas, it returns a repository not found error. This is incorrect as the repository may still exist from Praefect's point of view, it's just that the replicas with the latest changes have been lost. This commit changes GetConsistentStorages to return a more descriptive error for this scenario instead of a repository not found error. Changelog: fixed
-
Sami Hiltunen authored
commit: Various fixes for `CheckObjectsExist()` See merge request gitlab-org/gitaly!4510
-
Sami Hiltunen authored
proto: Remove deprecated `PackObjectsHook()` RPC Closes #4138 See merge request gitlab-org/gitaly!4508
-
Patrick Steinhardt authored
The `PackObjectsHook()` RPC is deprecated and its implementation has been removed in 473e3540 (Deprecate PackObjectsHook, 2021-10-25). Now that v15.0 is close, let's also remove the Protobuf definitions. Changelog: removed
-
Patrick Steinhardt authored
Revisions cannot contain any whitespace characters, and this is an assumption that we make in many parts of our application. Let's make the enforcement of this stricter by also verifying that there are no tabs or newlines in revision names.
-
Patrick Steinhardt authored
Refactor revision-validation tests to be more conformant with our current coding style. Furthermore, extend these tests to also verify that `ValidateRevisionAllowEmpty()` behaves as expected.
-
Patrick Steinhardt authored
The logic to verify that revisions are valid revisions that can safely be passed to various Git components is hosted in a file `proto.go`. This is probably a historic artifact, but it doesn't make a lot of sense nowadays. Rename the file to `revision.go` to make it easier to find. While at it, this commit also moves related tests into `revision_test.go`.
-
Patrick Steinhardt authored
When we fail to parse the commit time in the `catfile` package, then we instead return a fallback time. While the `catfile` package is the only user of this value, it is currently contained in the `git` package as a public variable. Move it over into the `catfile` package to keep it close to its user.
-
Patrick Steinhardt authored
The sender we're using for chunked responses in `CheckObjectsExists()` is reallocating the result array every time we have sent out a message. This is needlessly wasteful though: we can just truncate the array and thus avoid a memory allocation. It's likely not going to matter much in this context, but the end result is easier to read, too.
-
Patrick Steinhardt authored
Most of the errors we return from `CheckObjectsExist()` are not annotated with either a proper error message nor with an error code. This makes it hard to find the location where the RPC fails if we see log messages. Improve this by adding proper error codes and messages.
-
Patrick Steinhardt authored
The `CheckObjectsExist()` RPC is a streaming RPC: the caller may send one or more requests to check sets of revisions. This is done such that this RPC call also works in the context where millions of revisions need to be checked in a single call, which could otherwise exceed the gRPC memory limitations. The current behaviour is a tad weird though: revisions sent as part of the initial request are completely ignored. This doesn't feel right as the caller would now be forced to _always_ send at least two messages. It's also not documented to be the case, and last but not least all our other streaming RPCs don't do it this way either. So let's fix this behaviour and also honor revisions sent of the initial request. Changelog: fixed
-
Patrick Steinhardt authored
The `CheckObjectsExist()` RPC doesn't verify it got a repository in its initial request. On the other hand, it only verifies that revisions are valid for the first request. Fix both issues. Changelog: fixed
-
Patrick Steinhardt authored
Tests for the `CheckObjectsExist()` are not quite extensible enough to test various error conditions, most importantly in the context of chunking. Refactor them.
-
- May 02, 2022
-
-
GitLab Release Tools Bot authored
-
John Cai authored
config: Introduce new Cgroups config See merge request gitlab-org/gitaly!4483
-
Patrick Steinhardt authored
Add a new execution environment for bundled Git v2.36.0.gl1. This environment is still guarded by a feature flag. Changelog: added
-
Patrick Steinhardt authored
Install bundled Git v2.36.0.gl1 alongside v2.35.1.gl1. Note that we carry forward a set of patches from the old version which hasn't made it into the final release yet. Changelog: added
-