Age | Commit message (Collapse) | Author |
|
Changing ListRefs to GetReferences to better match localrepo.Repo.
|
|
Changing ListRefs to GetReferences on remoteRepo in order to exactly
match the interface on localrepo.Repo.
|
|
Changes remoteRepository IsEmpty to HasBranches so that it can exactly
match the method signature of localrepo.Repo.
|
|
|
|
RemoteRepository mostly only wraps RPC calls which all have their own
context, but we do need to explicitly mention "remote repository" so
that we can tell which strategy was used as we intend to implement this
using localrepo as well.
|
|
Ensures all errors returned by the filesystem sink are breadcrumbed as
such. Also ensure there is no path or operation stutter. All OS file IO
errors indicate the operation taking place and the path being operated
on. So there is no need to additionally add this context.
|
|
|
|
This will allow us to substitute the RPC implementation with a localrepo
implementation.
|
|
We are looking to have an alternate implementation of this interface
that uses localrepo. This will allow us to use the backup manager in a
RPC.
|
|
As we intend to write an implementation of ListRefs using localrepo we
will need to use common types instead of GRPC types.
|
|
|
|
Soon we will be converting backups to work server side. This means that
all the RPC calls will need to be converted to localrepo calls. So here
we are extracting each RPC call into its own type that will later be
swapped out.
|
|
Soon we will be converting backups to work server side. This means that
all the RPC calls will need to be converted to localrepo calls. So here
we are extracting each RPC call into its own type that will later be
swapped out.
|
|
Soon we will be converting backups to work server side. This means that
all the RPC calls will need to be converted to localrepo calls. So here
we are extracting each RPC call into its own type that will later be
swapped out.
|
|
diff: FindChangedPathsRequest
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5564
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Co-authored-by: Toon Claes <toon@gitlab.com>
|
|
praefect: Implementation of the new configuration validation
Closes #4650
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5601
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
|
|
All configuration types have validation methods that can be used
to check the values set. It is a final change that assembles all
these validations with validation of the other fields used by
Config type. Now 'praefect configuration validate' subcommand
returns all validation errors of the configuration.
Changelog: addition
Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/4650
|
|
The check IsPositive is not that useful when we have other
comparison function. Also, it confuses as 0 is not a positive
number. It is replaced with usage of the GreaterOrEqual where
value for comparison is set to 0. The IsPositive is removed
and all call sites are changed to use GreaterOrEqual.
|
|
The new 'Validate' method validates values of the
'Yamux' type. It will be used in the later changes.
The 'AcceptBacklog' field now has 'uint' type as it is not allowed
to use negative values for it.
|
|
The new 'Validate' method validates values of the
'RepositoriesCleanup' type. It will be used in the later changes.
The 'RepositoriesInBatch' field now has 'uint' type as it is
not allowed to use negative values for it.
|
|
The new 'Validate' method validates values of the
'VirtualStorage' type. It will be used in the later changes.
Package 'cfgerror' extended with new 'NotEmptySlice()' function
to check the slice is not empty.
|
|
The new 'Validate' method validates values of the
'Node' type. It will be used in the later changes.
|
|
The new 'Validate' method validates values of the
'Replication' type. It will be used in the later changes.
Package 'cfgerror' extended with new value comparison checks:
LessThan, GreaterThan and GreaterOrEqual.
|
|
The new 'Validate' method validates values of the
'Reconciliation' type. It will be used in the later changes.
|
|
The new 'Validate' method validates values of the
'BackgroundVerification' type. It will be used in the later changes.
|
|
The new 'Validate' method validates values of the 'Failover' type and
returns all found errors together. If 'Enabled' field is set to
'false' no validation done as it won't be used and doesn't affect
the service anyhow. It will be used in the later changes.
The cfgerror now has a new 'IsSupportedValue' check.
|
|
The 'FailoverEnabled' field of the 'Config' was deprecated long time
ago. It was kept for backwards compatibility with omnibus. The change
done in https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/4048
allows us to drop it completely.
|
|
doc: Add a doc about using Jaeger for local development
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5628
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Evan Read <eread@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Reviewed-by: Evan Read <eread@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: Justin Tobler <jtobler@gitlab.com>
|
|
commit: Implement SHA256 compatibility for ListLastCommitsForTree
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5627
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
Distributed tracing and Jaeger are powerful tool. They are integrated
deep into Gitaly and other services at GitLab. Unfortunately, the
adoption at GitLab is not high. This commit adds a development doc to
get started with using Jaeger for Gitaly local development.
|
|
go: Update module google.golang.org/grpc to v1.54.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5581
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
tools/dlv: Update module github.com/go-delve/delve to v1.20.2
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5637
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
Revert "Merge branch 'jmd-update-error-message-concurrency-queue' into 'master'"
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5631
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Approved-by: Christian Couder <chriscool@tuxfamily.org>
Co-authored-by: John McDonnell <jmcdonnell@gitlab.com>
|
|
The paths field in FindChangedPathsResponse didn't have any comment, so
we add some.
|
|
By default the FindChangedPaths RPC uses flag `-m` for git-diff-tree(1)
under the hood. This is usually what most callers want. But in some
cases they only want to see changes that are different from all the
parents.
The option `-c` for git-diff-tree(1) exists for this purpose. These
changes add a mode field to the RPC request so the caller can choose
between either command line flag.
Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/4827
Changelog: added
|
|
Stop using the seeded repository and set up a repo in test, this should
make it easier to understand what each test case wants to test and
prepares tests for SHA256.
|
|
go: Update module golang.org/x/sys to v0.7.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5630
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
git: Remove sidecar Git configuration from command factory
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5636
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
go: Update github.com/ProtonMail/go-crypto digest to 8b3893e
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5634
Merged-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
Enable snapshot reads of hooks
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5584
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: James Fargher <proglottis@gmail.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Reviewed-by: James Fargher <proglottis@gmail.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
|
|
Implement localrepo methods for working with pack files
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5611
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
|
|
Remove unused functionality to compute the Git configuration as used by
our sidecar in the Git command factory.
|
|
|
|
Add pack-objects concurrency limiter based on RemoteIP
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5583
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
|
|
git/housekeeping: Improve metrics when repacking objects fails
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5629
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: James Fargher <proglottis@gmail.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
docs: Remove rspec from the beginner's guide
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5617
Merged-by: James Fargher <proglottis@gmail.com>
Approved-by: Evan Read <eread@gitlab.com>
Approved-by: James Fargher <proglottis@gmail.com>
Reviewed-by: Evan Read <eread@gitlab.com>
Co-authored-by: Evan Read <eread@gitlab.com>
Co-authored-by: Toon Claes <toon@gitlab.com>
|
|
This reverts merge request !5058
|
|
When repacking objects fails during housekeeping we report a bunch of
metrics relating to this as failed. We completely ignore the repack
configuration though that led to the failure, which means that we would
e.g. report both a "full" and an "incremental" repack as failed even
though we actually performed a "cruft" repack. Furthermore, we do not
take into account whether we actually tried to write bitmaps or the
multi-pack index but also always report them as failed. This means that
our metrics can be misleading at times, and that we cannot see whether a
specific type of packing objects is more likely to fail than others.
Fix this error by considering the repack configuration when reporting
error metrics.
Changelog: fixed
|
|
When repacking objects via `repackIfNeeded()` fails then we don't return
the repack configuration we tried to repack with. This restricts callers
from discerning what kind of repack failed.
Change the code to return the repack configuration when repacking fails.
|
|
Convert OptimizeRepository tests to return a `localrepo.Repo`. This
allows us to add tests that stub out the Git command factory in order to
test more edge cases.
|