Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-11downgrade json gem to match gitlab versioncaw-downgrade-json-gem-to-match-gitlabChad Woolley
- See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86061#note_942017961
2022-05-10Merge branch 'smh-disable-verifier-deletion' into 'master'John Cai
Disable deletions by default in background verifier Closes #4211 See merge request gitlab-org/gitaly!4527
2022-05-10Merge branch 'bbodenmiller-master-patch-98226' into 'master'Sami Hiltunen
Add Default templates See merge request gitlab-org/gitaly!4542
2022-05-10Add Default templatesBen Bodenmiller
2022-05-10Merge branch 'smh-log-routing-decisions' into 'master'Patrick Steinhardt
Log routing decisions in Praefect See merge request gitlab-org/gitaly!4540
2022-05-10Merge branch 'pks-contributing-wchandler-maintainer' into 'master'Patrick Steinhardt
CONTRIBUTING.md: Add Will Chandler as maintainer See merge request gitlab-org/gitaly!4543
2022-05-10Merge branch 'squash-using-merge' into 'master'Toon Claes
Use git2go merge for squashing Closes gitlab#352581 See merge request gitlab-org/gitaly!4514
2022-05-10Merge branch 'jc-fix-limithandler-flake' into 'master'Patrick Steinhardt
limithandler: Fix flaky TestStreamLimitHandler Closes #4195 See merge request gitlab-org/gitaly!4541
2022-05-10CONTRIBUTING.md: Add Will Chandler as maintainerPatrick Steinhardt
Will Chandler has recently joined the Gitaly team. Update our list of maintainers to reflect that.
2022-05-10Merge branch 'jc-cgroups-design-docs' into 'master'John Cai
docs: Cgroups per git process See merge request gitlab-org/gitaly!4461
2022-05-10limithandler: Fix flaky TestStreamLimitHandlerjc-fix-limithandler-flakeJohn Cai
The TestStreamLimitHandler test was relying on a hardcoded timeout. This caused flakiness in CI. We don't need to rely on a timeout however, since we have a concurrency queue limiter, we can utilize that to make this test synchronous.
2022-05-09Log routing decisions in Praefectsmh-log-routing-decisionsSami Hiltunen
Praefect currently doesn't log the routing decisions it makes. This commit adds logging for the routing decisions as they can be helpful in debugging various scenarios. Changelog: added
2022-05-09Merge branch 'jc-do-not-wrap-detailed-error' into 'master'John Cai
limithandler: Do not wrap errors from limithandler See merge request gitlab-org/gitaly!4537
2022-05-09Merge branch 'sh-update-grpc-go' into 'master'John Cai
Update grpc-go and protobuf See merge request gitlab-org/gitaly!4536
2022-05-09limithandler: Do not wrap errors from limithandlerJohn Cai
In the limithandlers, we are returning structured errors so upstream clients can interpret that a request limit took place. However, we are currently swallowing these details by wrapping it in another gRPC error. Instead, just return this error without wrapping it, since the structured error already provides enough context as to why the error happened. Changelog: changed
2022-05-09Merge branch 'pks-protolint-comments' into 'master'Patrick Steinhardt
proto: Enforce that definitions must have comments See merge request gitlab-org/gitaly!4517
2022-05-09Merge branch 'pks-git-v2.36.1' into 'master'Sami Hiltunen
Makefile: Upgrade bundled Git to v2.36.1 See merge request gitlab-org/gitaly!4538
2022-05-09proto: Enforce comment-linting for message fieldsPatrick Steinhardt
Enforce that message fields must have a comment and add a placeholder for all instances where such a comment is missing.
2022-05-09proto: Enforce comment-linting for enum fieldsPatrick Steinhardt
Enforce that enum fields must have a comment and add a placeholder for all instances where such a comment is missing.
2022-05-09proto: Enforce comment-linting for enum definitionsPatrick Steinhardt
Enforce that enum definitions must have a comment and add a placeholder for all instances where such a comment is missing.
2022-05-09proto: Enforce comment-linting for message definitionsPatrick Steinhardt
Enforce that message definitions must have a comment and add a placeholder for all instances where such a comment is missing.
2022-05-09proto: Enforce comment-linting for RPC definitionsPatrick Steinhardt
Enforce that RPC definitions must have a comment and add a placeholder for all instances where such a comment is missing.
2022-05-09Merge branch 'pks-gitaly-config-improve-error-with-too-long-sockets' into ↵Sami Hiltunen
'master' config: Improve error message when test socket creation fails See merge request gitlab-org/gitaly!4534
2022-05-09proto: Enforce comment-linting for servicesPatrick Steinhardt
Enforce that services must have a comment and add a placeholder for all instances where such a comment is missing.
2022-05-09Merge branch 'pks-gitpipe-context-cancellation-errors' into 'master'Patrick Steinhardt
gitpipe: Fix propagation of context cancellation errors Closes #4072 See merge request gitlab-org/gitaly!4524
2022-05-09Makefile: Upgrade bundled Git to v2.36.1Patrick Steinhardt
We have recently introduced a new bundled Git v2.36.0.gl1. Closely before we wanted to start the rollout of that version to production though a new patch release v2.36.1 was released by the Git project. Upgrade Git to this new version. Note that we directly replace our bundled Git v2.36.0.gl1. This is fine though given that it has not yet been rolled out. Changelog: changed
2022-05-09gitpipe: Propagate context cancellation in object data pipelinePatrick Steinhardt
When the context gets cancelled while we're iterating over results from the object data pipeline, then the iterator doesn't return the context cancellation error to the caller when calling `iter.Err()`. It is thus easy to assume at the calling side that the iterator has just finished successfully and that there are no more results, while in reality we only got a partial set of results. Fix this issue by propagating context cancellation errors to the caller. This fixes RPCs based on this pipeline to not return `OK` when there indeed was an error. Changelog: fixed
2022-05-09gitpipe: Propagate context cancellation in object info pipelinePatrick Steinhardt
When the context gets cancelled while we're iterating over results from the object info pipeline, then the iterator doesn't return the context cancellation error to the caller when calling `iter.Err()`. It is thus easy to assume at the calling side that the iterator has just finished successfully and that there are no more results, while in reality we only got a partial set of results. Fix this issue by propagating context cancellation errors to the caller. This fixes RPCs based on this pipeline to not return `OK` when there indeed was an error. Changelog: fixed
2022-05-09gitpipe: Propagate context cancellation in revisions pipelinePatrick Steinhardt
When the context gets cancelled while we're iterating over results from the revisions pipeline, then the iterator doesn't return the context cancellation error to the caller when calling `iter.Err()`. It is thus easy to assume at the calling side that the iterator has just finished successfully and that there are no more results, while in reality we only got a partial set of results. Fix this issue by propagating context cancellation errors to the caller. This fixes RPCs based on this pipeline to not return `OK` when there indeed was an error. Changelog: fixed
2022-05-09gitpipe: Add tests demonstrating loss of context-cancellation errorsPatrick Steinhardt
We're not bubbling up any errors in case contexts get cancelled while we were consuming pipeline result. This error makes it easy to think that the pipeline finished successfully even though the pipeline has been cancelled and only returned partial results. Add a set of tests to demonstrate this behaviour.
2022-05-09gitpipe: Fix sending of events to be race-free with context cancellationPatrick Steinhardt
When sending events down the gitpipe pipelines, we need to ensure that we're paying close attention to context cancellation: if the context got cancelled, then we shouldn't continue driving the pipeline and instead exit early. While we already do this in all of our pipelines, we're not treating context cancellation the same everywhere. In some pipelines we prioritize context cancellation errors over errors that happened while serving the request, while in others we treat them the same. Treating these errors the same can result in racy error propagation though, where we randomly return either the context error, or the error of the process we just tried to read from but which got killed because of the context cancellation. This issue has originally been fixed in 3a65ca3bb (gitpipe: Prioritize context cancellation, 2021-07-09), but the fix was only a partial fix that didn't apply to all pipelines. Fix the remaining cases so that we always prioritize context cancellation to unify the behaviour. Note that this commit also fixes multiple cases where we just sent an error down the pipeline, but didn't actually abort the pipeline. This was very likely an oversight by the original author who has been doing too much C programming, where `case` statements automatically fall through. Changelog: fixed
2022-05-06Update grpc-go and protobufsh-update-grpc-goStan Hu
This is a pre-requisite to updating labkit in https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4535. grpc-go diff https://github.com/grpc/grpc-go/compare/v1.38.0..v1.40.0 protobuf diff: https://github.com/protocolbuffers/protobuf-go/compare/v1.26.0..v1.28.0 The change in https://github.com/grpc/grpc-go/pull/4474 caused the status pointer to be stored rather than the encoded protobuf. We need to use `testhelper.RequireGrpcError` instead of trying to directly compare the errors. Changelog: changed
2022-05-06Merge branch 'jc-exclude-keep-around-refs-from-repo-size' into 'master'Toon Claes
repository: Exclude merge-requests, keep-around, pipelines from size See merge request gitlab-org/gitaly!4532
2022-05-06Merge branch 'pks-makefile-protoc-plugin-fixes' into 'master'Patrick Steinhardt
Makefile: Fix protoc linting not working See merge request gitlab-org/gitaly!4515
2022-05-06noticegen: Fix skipping of own licensesPatrick Steinhardt
In order to generate our `NOTICE` file, we first export all Go sources referenced by our project into a directory and then walk that directory to gather any licenses. The result is that the generated `NOTICE` file contains the licenses of all our dependencies. Ideally, the `NOTICE` file wouldn't need to contain any licenses that we have as part of our own sources. These may for example include licenses of test files, but also licenses of vendored dependencies. But because we are already bundling their licenses into our sources in the first place it shouldn't be necessary to also put them into our `NOTICE` file. In fact, it seems like we already intended to skip soaking up any such license files in our own tree: we initially determine the module path of ourselves, and then return early in `filepath.Walk()` when hitting a directory path that matches. We only return a `nil` pointer though, which means we only skip that single directory. That doesn't seem to make a whole lot of sense though, and it feels like the intent was to instead skip walking that whole directory. So let's fix this by returning `filepath.SkipDir` instead so that we never collect licenses part of our own source tree.
2022-05-06tools: Move `noticegen` into top-level `tools/` directoryPatrick Steinhardt
Move the `noticegen` tool into the top-level `tools/` directory so that all of our custom build tools are in one place. This also makes its sources discoverable for our formatter.
2022-05-06tools: Move `module-updater` into top-level `tools/` directoryPatrick Steinhardt
Move the `module-updater` tool into the top-level `tools/` directory so that all of our custom build tools are in one place. This also makes its sources discoverable for our formatter.
2022-05-06tools: Move Protoc plugins into top-level `tools/` directoryPatrick Steinhardt
The Protoc plugins we use are hidden away deep into the `proto/` directory, which makes it very hard to discover them when one doesn't already know about their existence. Let's move them into a new top-level `tools/` directory.
2022-05-06protoc-gen-gitaly-lint: Absorb internal `linter` packagePatrick Steinhardt
There is no real reason why the `protoc-gen-gitaly-lint` package requires another internal package to provide the actual logic. Furthermore, we want to move this plugin into a top-level `tools` directory to make it easier to discover. Absorb the `linter` package to make it easier to move the code around.
2022-05-06Makefile: Fix cyclic dependencies when generating Protobuf definitionsPatrick Steinhardt
The `protoc-gen-gitaly-lint` plugin requires the Protobuf definitions in order to work correctly, but it itself is added already when generating these definitions in the first place. This is a cyclic dependency which breaks generation of Protobufs when starting from scratch. Now that functionality of `protoc-gen-gitaly` has been split up into two different plugins we can easily fix this cyclic dependency by moving use of the linting part into `lint-proto`. This refactoring also makes sense on its own.
2022-05-06protoc-gen-gitaly: Split up plugin by functionalityPatrick Steinhardt
The `protoc-gen-gitaly` plugin provides two different functionalities: - It lints our Protobuf definitions to make sure they conform to our coding guidelines. - It generates a `protolist.go` file, which contains a list of all Protobuf files. This is conflating two otherwise unrelated concerns, and thus makes the divide between our `proto` and `lint-proto` Makefile targets a bit blurry. Furthermore, it is creating a cyclic dependency: the linting logic requires that the Protobuf files must have already been generated, but we can only generate them when we have plugin compiled. Prepare for a fix by splitting up functionality of this plugin into two separate plugins: `protoc-gen-gitaly-lint` is responsible for linting our definitions, while `protoc-gen-gitaly-protolist` will generate the list of Protobuf files.
2022-05-06Makefile: Fix protoc linting not workingPatrick Steinhardt
With 2a333822f (Use protoc_gen_gitaly plugin when regenerating protobuf definitions, 2022-04-29), we have merged usage of Gitaly's protoc plugin into the use of `make proto`. This was done because the plugin doesn't only lint sources, but it also generates some data structures on its own. This process has broken use of the plugin completely though. While we make the plugin's path known to `protoc` via the `--plugin` option, it is not getting used at all because we didn't also move `--gitaly_out`. This option is required though for the plugin to actually be used. Fix this bug by adding the option back in.
2022-05-06config: Improve error message when test socket creation failspks-gitaly-config-improve-error-with-too-long-socketsPatrick Steinhardt
When Gitaly starts up, it will verify that it can indeed create Unix sockets in its runtime directory. This check is required because Unix systems have strict limits on Unix socket path lengths due to `struct sockaddr_un`'s `sun_path` is a capped character array. On macOS this limit is at 104 characters, while Linux has a limit of 108 characters, both of which are easy to exceed. But while we do have these sanity checks in place, the error message we return is really hard for an administrator to interpret because all it talks about is an `invalid argument` passed to bind(3P). So ultimately, the administrator likely won't make the connection between the runtime directory being too long and an `invalid argument`. Improve this error message by catching EINVAL returned by `net.Listen()` and providing a readable error message that explicitly tells the admin that the issue is most likely that the path is too long and that the runtime directory should be changed.
2022-05-06Merge branch 'smh-fix-coverage-key' into 'master'Patrick Steinhardt
Update test coverage artifact key See merge request gitlab-org/gitaly!4533
2022-05-06Update test coverage artifact keySami Hiltunen
The artifact key for the test coverage report was recently changed. This commit updates the key in our gitlab-ci.yml to the new one.
2022-05-06Merge branch 'pks-gitaly-fix-version-log' into 'master'John Cai
cmd/gitaly: Fix log message announcing Gitaly version See merge request gitlab-org/gitaly!4529
2022-05-06repository: Exclude merge-requests, keep-around, pipelines from sizejc-exclude-keep-around-refs-from-repo-sizeJohn Cai
The RepositorySize RPC is used to determine the disk-usage of the repository that is under the control of the user. There are certain refs like refs/keep-around/*, refs/merge-requests/*, refs/pipelines/* that GitLab uses internally, so these should not contribute to the overall size of the repository. Changelog: changed
2022-05-06localrepo: Allow Size to pass exclude flagJohn Cai
There are times when we want to exclude certain refs from being included in the size calculation for a repository. Add the ability to do so. Changelog: added
2022-05-05Merge branch 'revert-smh-no-up-to-date-replicas-error' into 'master'John Cai
Revert "Return correct error when repository has no up to date replicas" See merge request gitlab-org/gitaly!4531
2022-05-05Revert "Return correct error when repository has no up to date replicas"John Cai
This reverts commit 7c78dcb8514bba6195993f83706bacebe3b71dd4.