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
2023-05-22Update macos job to use saas-macos-medium-m1jmd/update-macos-runner-to-m1John McDonnell
2023-05-17Merge branch ↵karthik nayak
'5036-introduce-structured-error-definitions-for-gettreeentries' into 'master' commit: Modernize the tests in `tree_entries_test.go` See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5789 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Reviewed-by: Toon Claes <toon@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com>
2023-05-17Merge branch 'renovate-tools/goimports/golang.org-x-tools-0.x' into 'master'Patrick Steinhardt
tools/goimports: Update module golang.org/x/tools to v0.9.1 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5749 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-05-17Merge branch 'renovate/github.com-getsentry-sentry-go-0.x' into 'master'Patrick Steinhardt
go: Update module github.com/getsentry/sentry-go to v0.21.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5788 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Pavlo Strokov <pstrokov@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-05-17Merge branch 'renovate/github.com-prometheus-client_golang-1.x' into 'master'Patrick Steinhardt
go: Update module github.com/prometheus/client_golang to v1.15.1 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5754 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-05-17Merge branch 'renovate/golang.org-x-exp-digest' into 'master'Patrick Steinhardt
go: Update golang.org/x/exp digest to dd950f8 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5768 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-05-17Merge branch 'renovate/github.com-opencontainers-runtime-spec-digest' into ↵Patrick Steinhardt
'master' go: Update github.com/opencontainers/runtime-spec digest to 0983f1d See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5762 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-05-17Merge branch 'ps-praefect-cli-sql-migrate' into 'master'Patrick Steinhardt
praefect: Migrate sql-migrate sub-command See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5757 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Evan Read <eread@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: James Fargher <proglottis@gmail.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Evan Read <eread@gitlab.com> Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
2023-05-17Merge branch 'ash2k/fix-testproto-package' into 'master'Patrick Steinhardt
Fix testproto go_package See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5798 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: Mikhail Mazurskiy <mmazurskiy@gitlab.com>
2023-05-17praefect: Migrate sql-migrate sub-commandPavlo Strokov
Migration of the 'sql-migrate' sub-command from the old implementation to the new approach with usage of the third party library. The invocation of the command remains the same, but it has more descriptive representation when help is invoked. Also, it is possible now to invoke help only for the sub-command to see more details about it and its usage. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/5001
2023-05-17commit: Make `tree_entries_test.go` SHA256 compliantKarthik Nayak
Since the tests now no longer use seeded repos, we can make this file SHA256 compliant.
2023-05-17Fix testproto go_packageMikhail Mazurskiy
2023-05-17Merge branch 'jc/use-git-hash-object' into 'master'Patrick Steinhardt
localrepo: Use git-hash-object instead of git-mktree for writing trees See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5797 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: John Cai <jcai@gitlab.com>
2023-05-17Update changelog for 15.11.4GitLab Release Tools Bot
[ci skip]
2023-05-16Merge branch 'qmnguyen0711/always-output-concurrency-queue-ms' into 'master'Justin Tobler
Always log limit.concurrency_queue_ms field See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5773 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
2023-05-16localrepo: Use git-hash-object instead of git-mktree for writing treesJohn Cai
git-hash-object(1) does fsck on the objects its writing whereas git-mktree(1) does not have the benefit of such safety mechanisms. Swap to using git-hash-object(1) in our WriteTree() call.
2023-05-16localrepo: Use slice of *TreeEntry instead of TreeEntry in WriteTreeJohn Cai
Dealing with TreeEntry pointers is more convenient, since in a future commit we will start to modify TreeEntry objects in place for various operations. ListEntries() already returns a slice of TreeEntry pointers. Change WriteTree to take a slice of TreeEntry pointers for the sake of consistency.
2023-05-16Merge branch 'pks-operations-tag-sha256' into 'master'Sami Hiltunen
operations: Implement SHA256 support in UserCreateTag and UserDeleteTag See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5787 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2023-05-16commit: Fix BenchmarkGetTreeEntriesKarthik Nayak
The benchmark BenchmarkGetTreeEntries is currently broken as it depends on an unavailable seeded repo. Let's remove the seeded repo and populate a repo for the benchmarking.
2023-05-16commit: Modernize the tests in `tree_entries_test.go`Karthik Nayak
The tests in `tree_entries_test.go` use a seeded repository and are split across multiple tests. In this commit, we create a single `TestGetTreeEntries` and all the tests under it. We get rid of the seeded repository.
2023-05-16Merge branch 'ps-praefect-cli-metadata' into 'master'Pavlo Strokov
praefect: migrate metadata sub-command See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5717 Merged-by: Pavlo Strokov <pstrokov@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Approved-by: Christian Couder <chriscool@tuxfamily.org>
2023-05-16Merge branch 'pks-grpc-package' into 'master'Patrick Steinhardt
global: Move gRPC-related packages into common package hierarchy See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5779 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Pavlo Strokov <pstrokov@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com>
2023-05-16praefect: Migrate metadata sub-commandPavlo Strokov
Migration of the 'metadata' sub-command from the old implementation to the new approach with usage of the third party urfave/cli/v2 third party library. The invocation of the command remains the same, but it has more descriptive representation when help is invoked. Also, it is possible now to invoke help only for the sub-command to see more details about it and its usage. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/5001
2023-05-16Merge branch 'pks-housekeeping-repack-on-changed-alternates' into 'master'Quang-Minh Nguyen
housekeeping: Deduplicate objects when alternates change Closes #5124 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5776 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Pavlo Strokov <pstrokov@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Pavlo Strokov <pstrokov@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2023-05-16Merge branch 'repoutil_remove' into 'master'Quang-Minh Nguyen
Add remove repository to repoutil See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5752 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Christian Couder <chriscool@tuxfamily.org> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: James Fargher <jfargher@gitlab.com>
2023-05-16Merge branch '4736-housekeeping-prework' into 'master'Quang-Minh Nguyen
housekeeping: Make `CleanStaleData` configurable See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5748 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Christian Couder <chriscool@tuxfamily.org> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Karthik Nayak <knayak@gitlab.com>
2023-05-16grpc-proxy: Restructure and move package into `internal/grpc/`Patrick Steinhardt
We've grown quite a bunch of packages that provide various different functionality in the context of gRPC. But it is not easy to identify them as there is no common hierarchy for gRPC-related functionality. We're thus introducing a new `internal/grpc` package that will host various bits and pieces related to gRPC. Move the `internal/praefect/grpc-proxy` package into this new package. As we have originally vendored this project from upstream, this package does not quite match our typical layout: it's got scripts and docs in there that don't really make much sense nowadays. Originally, we had the intent to contribute all changes back upstream. But the project is basically dead anyway, and by now we have significantly diverged and added Praefect-specific logic that wouldn't be upstreamable. So let's get rid of this cruft while at it. While it is debatable whether things like the readme or examples should go away I very much doubt that anybody ever looks at these files. Instead, we should really provide good documentation on the public interfaces and provide package level documentation like we already do.
2023-05-16grpcstats: Move package into `internal/grpc/`Patrick Steinhardt
We've grown quite a bunch of packages that provide various different functionality in the context of gRPC. But it is not easy to identify them as there is no common hierarchy for gRPC-related functionality. We're thus introducing a new `internal/grpc` package that will host various bits and pieces related to gRPC. Move the `internal/metadata` package into this new package.
2023-05-16featureflag: Move into standalone packagePatrick Steinhardt
The feature flag logic is currently hosted inside of `internal/metadata/featureflag`. And while they do have something to do with metadata, they really are a standalone concept. Move the package to `internal/featureflag` to reflect this.
2023-05-16grpcstats: Move package into `internal/grpc/`Patrick Steinhardt
We've grown quite a bunch of packages that provide various different functionality in the context of gRPC. But it is not easy to identify them as there is no common hierarchy for gRPC-related functionality. We're thus introducing a new `internal/grpc` package that will host various bits and pieces related to gRPC. Move the `internal/grpcstats` package into this new package.
2023-05-16middleware: Move package into `internal/grpc/`Patrick Steinhardt
We've grown quite a bunch of packages that provide various different functionality in the context of gRPC. But it is not easy to identify them as there is no common hierarchy for gRPC-related functionality. We're thus introducing a new `internal/grpc` package that will host various bits and pieces related to gRPC. Move the `internal/middleware` package into this new package.
2023-05-16dnsresolver: Move package into `internal/grpc/`Patrick Steinhardt
We've grown quite a bunch of packages that provide various different functionality in the context of gRPC. But it is not easy to identify them as there is no common hierarchy for gRPC-related functionality. We're thus introducing a new `internal/grpc` package that will host various bits and pieces related to gRPC. Move the `internal/dnsresolver` package into this new package.
2023-05-16listenmux: Move package into `internal/grpc/`Patrick Steinhardt
We've grown quite a bunch of packages that provide various different functionality in the context of gRPC. But it is not easy to identify them as there is no common hierarchy for gRPC-related functionality. We're thus introducing a new `internal/grpc` package that will host various bits and pieces related to gRPC. Move the `internal/listenmux` package into this new package.
2023-05-16sidechannel: Move package into `internal/grpc/`Patrick Steinhardt
We've grown quite a bunch of packages that provide various different functionality in the context of gRPC. But it is not easy to identify them as there is no common hierarchy for gRPC-related functionality. We're thus introducing a new `internal/grpc` package that will host various bits and pieces related to gRPC. Move the `internal/sidechannel` package into this new package.
2023-05-16backchannel: Move package into `internal/grpc/`Patrick Steinhardt
We've grown quite a bunch of packages that provide various different functionality in the context of gRPC. But it is not easy to identify them as there is no common hierarchy for gRPC-related functionality. We're thus introducing a new `internal/grpc` package that will host various bits and pieces related to gRPC. Move the `internal/backchannel` package into this new package.
2023-05-16Merge branch 'ps-praefect-cli-verify' into 'master'Quang-Minh Nguyen
praefect: migrate verify sub-command See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5767 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
2023-05-16Merge branch 'jt-quarantine-flaky-test' into 'master'Toon Claes
gitaly-hooks: Quarantine flaky test See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5793 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Co-authored-by: Justin Tobler <jtobler@gitlab.com>
2023-05-16praefect: Migrate verify sub-commandPavlo Strokov
Migration of the 'verify' sub-command from the old implementation to the new approach with usage of the third party library. The invocation of the command remains the same, but it has more descriptive representation when help is invoked. Also, it is possible now to invoke help only for the sub-command to see more details about it and its usage. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/5001
2023-05-16Merge branch 'ps-praefect-cli-track-repository' into 'master'Quang-Minh Nguyen
praefect: Migrate track-repository sub-command See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5778 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
2023-05-16Merge branch 'wc/fix-hook-err-detect' into 'master'Will Chandler
hook: Stop overmatching hooks errors See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5781 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Pavlo Strokov <pstrokov@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Pavlo Strokov <pstrokov@gitlab.com>
2023-05-16repoutil: Extract RemoveRepository into repoutilJames Fargher
RemoveRepository is responsible for removing repositories in a transactional race-free way. To implement backups on the server, instead of calling the RemoveRepository RPC, it would be preferrable to have function we could call. So here we extract the implementation of RemoveRepository into repoutil. This package already contains the implementation for CreateRepository.
2023-05-16repoutil: Accept GitRepo interfaceJames Fargher
This interface will accept both gitalypb.Repository and localrepo.Repo. This means we can reuse the repoutil functions in a few more situations. Like server-side backups.
2023-05-16hook: Stop overmatching hooks errorsWill Chandler
Currently the `hook.CustomHookError` type is an alias for the `error` interface. As a result, when we run `errors.As(err, &customHookErr)`, this will match against all errors. This leads us to treat all hooks failures, such as internal errors returned from the `internal/allowed` API endpoint as custom hook errors. Convert `hook.CustomHookError` to a struct so that the `errors.As` matching is constrained to just this type. Changelog: fixed
2023-05-16gitaly-hooks: Quarantine flaky testJustin Tobler
The `resource_exhausted_without_LimitError_detail` subtest in `TestGitalyServerReturnsError_packObjects` is flaky. This change updates the existing quarantine to exclude this additional subtest.
2023-05-16Merge branch 'jc/add-rpc-docs-link' into 'master'Justin Tobler
docs: Add protobuf documentation gitlab pages link See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5780 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Evan Read <eread@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com> Co-authored-by: John Cai <jcai@gitlab.com>
2023-05-16Apply 1 suggestion(s) to 1 file(s)Evan Read
2023-05-15housekeeping: Make `CleanStaleData` configurableKarthik Nayak
In previous commits we introduced a configuration for `CleanStaleData` via the struct `CleanStaleDataConfig`. In this commit, we make this configuration an argument to `CleanStaleData`. This allow users to supply their own configuration and only run the cleanup functions they require. We fix tests around this and also add a test to test a non-default grace period for `findStaleReferenceLocks`.
2023-05-15housekeeping: Introduce `OnlyStaleReferenceLockCleanup`Karthik Nayak
The function `OnlyStaleReferenceLockCleanup` provides a configuration for `CleanStaleData` which only does a stale reference lock cleanup against a provided grace period.
2023-05-15housekeeping: Introduce and use `CleanStaleDataConfig`Karthik Nayak
We introduce a new struct `CleanStaleDataConfig`, which is used to hold the configuration around which cleanup functions are to be run inside `CleanStaleData`. With this we also introduce a function `DefaultStaleDataCleanup` which will provide the default configuration as it currently exists. We then use this in `CleanStaleDataConfig` to provide the configuration. In following commits we will make this an argument to `CleanStaleDataConfig`.
2023-05-15housekeeping: Convert `findStaleReferenceLocks` to a closureKarthik Nayak
The function `findStaleReferenceLocks` is used to find and clear stale reference locks in a given repository against a grace period. This grace period is hardcoded and clients of `CleanStaleData` cannot configure it. To provide this configuration option, we convert `findStaleReferenceLocks` to a closure which takes in a grace period as an argument.