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-18repository: Extract GetCustomHooks implementation to localrepolocalrepo_hooksJames Fargher
Soon we will be looking to implement server-side backups. To do this, all the RPCs used for creating a backup will need to be converted to localrepo.
2023-04-17Merge branch 'renovate-tools/gotestsum/gotest.tools-gotestsum-1.x' into 'master'Toon Claes
tools/gotestsum: Update module gotest.tools/gotestsum to v1.10.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5649 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-04-17Merge branch 'renovate-tools/goimports/golang.org-x-tools-0.x' into 'master'Toon Claes
tools/goimports: Update module golang.org/x/tools to v0.8.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5643 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-04-17Merge branch 'ps-praefect-cli-upgrade' into 'master'Toon Claes
praefect: Start switch to the new cli implementation See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5616 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Reviewed-by: Toon Claes <toon@gitlab.com> Reviewed-by: Pavlo Strokov <pstrokov@gitlab.com> Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
2023-04-14Merge branch 'toon-no-moar-ruby-scripts' into 'master'Will Chandler
tools: Rewrite Ruby scripts in Go See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5635 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: John Cai <jcai@gitlab.com> Co-authored-by: Toon Claes <toon@gitlab.com>
2023-04-14tools/gotestsum: Update module gotest.tools/gotestsum to v1.10.0GitLab Renovate Bot
2023-04-14Merge branch 'toon-fix-praefect-goroutine' into 'master'Will Chandler
praefect: Use localhost listener for DB in test See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5641 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: Toon Claes <toon@gitlab.com>
2023-04-14Merge branch 'renovate-tools/golangci-lint/golang.org-x-tools-0.x' into 'master'Will Chandler
tools/golangci-lint: Update module golang.org/x/tools to v0.8.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5644 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-04-14ci: Use build images without RubyToon Claes
Ruby isn't used no more, so we can use a build image that has no Ruby. Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/4636
2023-04-14ci: Parse panic from logs in pure GoToon Claes
We've been using a small Ruby oneliner to get panics from the full output of the test suite. But we're removing all use of Ruby, so we replace it with a small Go tool.
2023-04-14ci: Build praefect config with envsubstToon Claes
Instead of using Ruby, build the praefect config file with `envsubst`.
2023-04-14tools: Rewrite test-boot in GoToon Claes
Replace the Ruby script _support/test-boot with a small tool written in Go. Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/4636
2023-04-14praefect: Start switch to the new cli implementationPavlo Strokov
Praefect has a bunch of sub-commands besides its main service function. All of them are managed in a very simple, but inflexible way. Also, the implementation differs from what is used in the Gitaly. To standardize approach of implementing cli Praefect is refactored to utilise github.com/urfave/cli package for it. Currently, the only two commands were switched to the new approach. All the other commands will be migrated in upcoming changes. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/5001
2023-04-14Update changelog for 15.10.3GitLab Release Tools Bot
[ci skip]
2023-04-14Update VERSION filesv15.11.0-rc1GitLab Release Tools Bot
[ci skip]
2023-04-14praefect: Use localhost listener for DB in testToon Claes
This fixes leaking goroutines, because it was failing to look up the "stub" host. Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/4916 Changelog: fixed
2023-04-14Merge branch 'pks-housekeeping-adjust-object-expiry-periods' into 'master'Quang-Minh Nguyen
git/housekeeping: Reduce frequency of full repacks Closes #2774 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5640 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2023-04-14Merge branch 'renovate/ruby-dependencies' into 'master'Patrick Steinhardt
ruby: Update dependency google-protobuf to '~> 3.22.3' See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5645 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-04-14Merge branch 'qmnguyen0711/remove-trace2-flags' into 'master'James Fargher
Remove trace2 feature flags See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5624 Merged-by: James Fargher <proglottis@gmail.com> Approved-by: James Fargher <proglottis@gmail.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
2023-04-13tools/golangci-lint: Update module golang.org/x/tools to v0.8.0GitLab Renovate Bot
2023-04-13tools/goimports: Update module golang.org/x/tools to v0.8.0GitLab Renovate Bot
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-13git/housekeeping: Reduce frequency of full repacksPatrick Steinhardt
Due to different reasons we need to perform regular full repacks both in normal repositories and in object pools. These full repacks are guided by a cooldown period so that we'll perform them only in case the last full repack is longer ago than the cooldown period. For object pool, the reason we do full repacks is to refresh deltas so that they again honor our delta islands. This is not all that important to users and should not be noticeable in general when we do this less frequently. Consequentially, we only perform a full repack once every week. For normal repositories full repacks are mostly done in order to guarantee that objects will get evicted into cruft packs so that they can be expired and thus deleted. This _is_ something that both we and our customers care about given that it can be directly equated to disk space that is required. It is thus prudent that we perform this on a more-regular basis so that objects get deleted quickly. That being said, there is interplay between the stale object grace period (which is 14 days) and the cooldown periods (which is 1 day). Effectively, assuming that a repository gets daily optimization jobs, and with the knowledge in mind that we need to perform two full repacks in order to evict an unreachable object, objects will get deleted after 14 to 15 days: 1. The first full repack on days 0 to 1 will evict the unreachable object into a cruft pack. 2. We wait 14 days and will thus land either on day 14 or 15. 3. We perform a second full repack to expire the object part of the cruft pack. This interplay between both periods is important, because it means that we can do compromises between tuning the cooldown period and stale object grace period without actually impacting the median time to deletion: - Increasing the cooldown period means we need to perform less regular full repacks, thus saving on resources. Conversely, decreasing the cooldown means more regular full repacks and thus using more resources. - Increasing the grace period means we'll have a longer time to avoid racy access to Git objects with the downside of more disk space use. Decreasing the grace period means we are more likely to hit racy access to Git objects, but evict objects and thus save disk space more regularly. Now optimizing the cooldown period is something we're very keen to do because it directly impacts how much resources we and our customers need to provision for machines. On the other hand, the grace period is mostly there to avoid racy access to Git objects, and two weeks feels excessive for that. So long story short, this commit changes our strategy to increase the full repack cooldown period to 5 days instead of 1 day while decreasing the stale object grace period from 14 days to 7 days to counteract the longer time-to-deletion for stale objects. This means objects will get deleted 12 to 17 days afer becoming unreachable, with a median value of 14.5 days. This is the exact same median value as previously, so the time-to-deletion should not change in practice. But on the other hand, it does allow us to greatly save on compute resources by reducing the frequency we perform full repacks to one fifth. Furthermore, as the repack cooldown period for normal repositories and object pools are almost the same now, let's merge them so that we have one less special case to think about. Changelog: changed
2023-04-13git/housekeeping: Extract constants for full-repack cooldown periodsPatrick Steinhardt
We're using cooldown periods to figure out whether it's time for another full repack or not. So we will only consider doing a full repack in case the previous full repack is longer ago than the cooldown period. This is a value we can and want to fine-tune as we gain experience with geometric repacking. So let's these into a constant that we can use in our tests so that we don't have to adjust them every time we change the cooldown period.
2023-04-13Remove gitaly_export_trace2_pack_objects_metrics feature flagQuang-Minh Nguyen
`gitaly_export_trace2_pack_objects_metrics` enables Gitaly to capture metrics from git-pack-objects. Those metrics are exposed in two forms: log fields and Prometheus metrics. This flag was rolled out in Production successfully. This commit removes this flag.
2023-04-13Remove gitaly_export_trace2_tracing feature flagQuang-Minh Nguyen
`gitaly_export_trace2_tracing` allows Gitaly enables trace2 and export collected events as distributed tracing spans. After roll out that flag, everything was fine. GitLab.com didn't observe any performance impact. It's time to remove that flag. Even if it is removed, the exporter still enables trace2 only if the current code path has tracing enabled and sampled.
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-13ruby: Update dependency google-protobuf to '~> 3.22.3'GitLab Renovate Bot
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>