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-04-18backup: Change ListRefs to GetReferencesbackup_localrepoJames Fargher
Changing ListRefs to GetReferences to better match localrepo.Repo.
2023-04-18backup: Change ListRefs to GetReferencesJames Fargher
Changing ListRefs to GetReferences on remoteRepo in order to exactly match the interface on localrepo.Repo.
2023-04-18backup: Change IsEmpty to HasBranchesJames Fargher
Changes remoteRepository IsEmpty to HasBranches so that it can exactly match the method signature of localrepo.Repo.
2023-04-14backup: Tidy up error messagesJames Fargher
2023-04-14backup: Tidy up repository error messagesJames Fargher
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.
2023-04-14backup: Tidy up filesystem sink errorsJames Fargher
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.
2023-04-14backup: Rename RemoteRepository receiverJames Fargher
2023-04-14backup: Extract pluggable Repository initializerJames Fargher
This will allow us to substitute the RPC implementation with a localrepo implementation.
2023-04-14backup: Extract Repository interfaceJames Fargher
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.
2023-04-14backup: Use git.Reference instead of the GRPC response typeJames Fargher
As we intend to write an implementation of ListRefs using localrepo we will need to use common types instead of GRPC types.
2023-04-14backup: Extract create bundle callJames Fargher
2023-04-14backup: Extract get custom hooks callJames Fargher
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.
2023-04-14backup: Extract list refs callJames Fargher
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.
2023-04-14backup: Extract empty repo check into RemoteRepository typeJames Fargher
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.
2023-04-13Merge branch 'toon-find-changed-paths-c' into 'master'Patrick Steinhardt
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>
2023-04-13Merge branch 'ps-config-validation-praefect-2' into 'master'Quang-Minh Nguyen
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>
2023-04-13Implementation of the 'ValidateV2()' method for ConfigPavlo Strokov
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
2023-04-13Replace IsPositive with GreaterOrEqualPavlo Strokov
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.
2023-04-13Praefect: Yamux.Validate methodPavlo Strokov
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.
2023-04-13Praefect: RepositoriesCleanup.Validate methodPavlo Strokov
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.
2023-04-13Praefect: VirtualStorage.Validate methodPavlo Strokov
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.
2023-04-13Praefect: Node.Validate methodPavlo Strokov
The new 'Validate' method validates values of the 'Node' type. It will be used in the later changes.
2023-04-13Praefect: Replication.Validate methodPavlo Strokov
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.
2023-04-13Praefect: Reconciliation.Validate methodPavlo Strokov
The new 'Validate' method validates values of the 'Reconciliation' type. It will be used in the later changes.
2023-04-13Praefect: BackgroundVerification.Validate methodPavlo Strokov
The new 'Validate' method validates values of the 'BackgroundVerification' type. It will be used in the later changes.
2023-04-13Praefect: Failover.Validate methodPavlo Strokov
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.
2023-04-13Praefect: Clean up deprecated FailoverEnabled fieldPavlo Strokov
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.
2023-04-13Merge branch 'qmnguyen0711/add-tracing-doc' into 'master'Quang-Minh Nguyen
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>
2023-04-13Merge branch 'pks-list-last-commits-for-tree-sha256' into 'master'Justin Tobler
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>
2023-04-13doc: Add a doc about using Jaeger for local developmentQuang-Minh Nguyen
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.
2023-04-12Merge branch 'renovate/google.golang.org-grpc-1.x' into 'master'John Cai
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>
2023-04-12Merge branch 'renovate-tools/dlv/github.com-go-delve-delve-1.x' into 'master'John Cai
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>
2023-04-12Merge branch 'revert-e5d08445' into 'master'John Cai
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>
2023-04-12proto: Add some comments to FindChangedPathsResponseToon Claes
The paths field in FindChangedPathsResponse didn't have any comment, so we add some.
2023-04-12diff: Add mode to get only all parent changesToon Claes
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
2023-04-12diff: Rewrite FindChangedPathsRequest testsToon Claes
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.
2023-04-12Merge branch 'renovate/golang.org-x-sys-0.x' into 'master'Justin Tobler
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>
2023-04-12Merge branch 'pks-git-command-factory-drop-sidecar-config' into 'master'Toon Claes
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>
2023-04-12Merge branch 'renovate/github.com-protonmail-go-crypto-digest' into 'master'Pavlo Strokov
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>
2023-04-12Merge branch 'smh-hook-index' into 'master'Sami Hiltunen
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>
2023-04-12Merge branch 'smh-pack-utils' into 'master'Patrick Steinhardt
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>
2023-04-12git: Remove sidecar Git configuration from command factoryPatrick Steinhardt
Remove unused functionality to compute the Git configuration as used by our sidecar in the Git command factory.
2023-04-12tools/dlv: Update module github.com/go-delve/delve to v1.20.2GitLab Renovate Bot
2023-04-12Merge branch 'qmnguyen0711/concurrency-limit-by-remote-ip' into 'master'Justin Tobler
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>
2023-04-12Merge branch 'pks-git-housekeeping-fix-repack-failure-metrics' into 'master'Quang-Minh Nguyen
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>
2023-04-12Merge branch 'toon-no-moar-rspec-docs' into 'master'James Fargher
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>
2023-04-11Revert "Merge branch 'jmd-update-error-message-concurrency-queue' into 'master'"John McDonnell
This reverts merge request !5058
2023-04-11git/housekeeping: Improve metrics when repacking objects failsPatrick Steinhardt
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
2023-04-11git/housekeeping: Return repack configuration on errorPatrick Steinhardt
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.
2023-04-11git/housekeeping: Convert OptimizeRepository tests to return localrepoPatrick Steinhardt
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.