Age | Commit message (Collapse) | Author |
|
|
|
'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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
'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>
|
|
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>
|
|
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>
|
|
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
|
|
Since the tests now no longer use seeded repos, we can make this file
SHA256 compliant.
|
|
|
|
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>
|
|
[ci skip]
|
|
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>
|
|
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.
|
|
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.
|
|
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>
|
|
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.
|
|
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.
|
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
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.
|
|
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.
|
|
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
|
|
The `resource_exhausted_without_LimitError_detail` subtest in
`TestGitalyServerReturnsError_packObjects` is flaky. This change updates
the existing quarantine to exclude this additional subtest.
|
|
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>
|
|
|
|
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`.
|
|
The function `OnlyStaleReferenceLockCleanup` provides a configuration
for `CleanStaleData` which only does a stale reference lock cleanup
against a provided grace period.
|
|
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`.
|
|
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.
|