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-07-13operations: Use HEAD for default in ApplyPatchapply_patch_head_referenceJames Fargher
The ApplyPatch RPC was using a default branch heuristic instead of directly using HEAD.
2023-07-12Merge branch 'eread/change-to-backtick-strings-and-add-more-examples' into ↵Quang-Minh Nguyen
'master' Switch to using backticks for multiline strings for many commands See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6059 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com>
2023-07-12Switch to using backticks for multiline strings for many commandsEvan Read
2023-07-12Merge branch 'pks-git-validate-reference' into 'master'Sami Hiltunen
git: Implement new function to validate reference names See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6018 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2023-07-12Merge branch 'andrashorvath-master-patch-49636' into 'master'karthik nayak
Update Gitaly's Team Member Onboarding.md See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5995 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Approved-by: Furhan Shabir <fshabir@gitlab.com> Co-authored-by: Andras Horvath <ahorvath@gitlab.com>
2023-07-12Merge branch 'backup_goroutine_leak' into 'master'Quang-Minh Nguyen
Ensure backup.Sink get cleaned up properly See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6046 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: John Cai <jcai@gitlab.com> Co-authored-by: James Fargher <jfargher@gitlab.com>
2023-07-12Merge branch 'smh-dont-assert-repo-path' into 'master'Will Chandler
Don't assert repository paths in errors in tests See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6023 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2023-07-12backup: Ensure backup.Sink get cleaned up properly in testsJames Fargher
This allows removing the goroutine detection exception.
2023-07-12backup: Add Close to backup.FilesystemSinkJames Fargher
GoCloud requires that Close be called to properly clean up resources. In order to do that we need to add Close to the backup.Sink interface. For best practice, all direct uses of backup.FilesystemSink now also call Close despite being a no-op.
2023-07-12Merge branch 'eread/refactor-gitaly-cli-for-new-styleguide-updates' into ↵Justin Tobler
'master' Go back and update Gitaly CLI for new style guide updates See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6047 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Lorena Ciutacu <lciutacu@gitlab.com> Reviewed-by: Evan Read <eread@gitlab.com> Reviewed-by: Justin Tobler <jtobler@gitlab.com> Reviewed-by: Lorena Ciutacu <lciutacu@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com>
2023-07-12Go back and update Gitaly CLI for new style guide updatesEvan Read
2023-07-12Merge branch 'qmnguyen0711/refactor-limithandler' into 'master'James Fargher
Refactor limithandler package See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6038 Merged-by: James Fargher <jfargher@gitlab.com> Approved-by: James Fargher <jfargher@gitlab.com> Reviewed-by: James Fargher <jfargher@gitlab.com> Reviewed-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
2023-07-11Merge branch 'add-user-rebase-to-ref-rpc' into 'master'karthik nayak
Add UserRebaseToRef RPC See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5956 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Reviewed-by: Hordur Freyr Yngvason <hfyngvason@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Hordur Freyr Yngvason <hfyngvason@gitlab.com>
2023-07-11Add UserRebaseToRef RPCHordur Freyr Yngvason
2023-07-11Merge branch 'renovate/golang.org-x-crypto-0.x' into 'master'Quang-Minh Nguyen
go: Update module golang.org/x/crypto to v0.11.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6041 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Christian Couder <chriscool@tuxfamily.org> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-07-11Merge branch 'toon-cherry-pick-merge-tree' into 'master'Patrick Steinhardt
operations: Implement UserCherryPick in pure git See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6000 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Toon Claes <toon@gitlab.com>
2023-07-11Merge branch 'zh-cgroups-v2' into 'master'Quang-Minh Nguyen
cgroup: Add support for cgroups v2 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5547 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Steve Xuereb <sxuereb@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: ZheNing Hu <adlternative@gmail.com>
2023-07-11Extract core limiter out of limithandler middlewareQuang-Minh Nguyen
Recently, all limiter logic locate in limithandler middleware package (internal/grpc/middleware/limithandler). Technically speaking, this package is not the right location. The limiters include Per-RPC concurrency limiter, Per-RPC rate limiter, and pack-objects limiter. The pack-objects limiter is not a part of gRPC middleware. We plan to create some more limiters and advance them with adaptive limiters. This commit extracts the core limiter functionalities out of the limithandler package. The new location for them is at internal/limiter. The ones that belong to gRPC middleware stay intact.
2023-07-11Replace limithandler's stats by generic customfieldsQuang-Minh Nguyen
Limithandler has a dedicated utility to store gRPC log fields. This utility suite consists of a recorder, a FieldsProducer, and two interceptors to plug in gRPC server. customfields can provide the same service. It was built for general purposes. Hence, there is no reason to keep both of them. This commit removes limithandler's dedicated stats handler in favor of customfields.
2023-07-11Allow customfields to record any metadata typeQuang-Minh Nguyen
`customfields` is an utility helper for attaching custom fields to gRPC logs. Recently, it supports logging metadata whose keys and values are string types only. This commit expand its ability to log data with any type. Eventually, the custom fields are converted to `logrus.Fields` type, which support any type already.
2023-07-11Merge branch 'jc/add-rails-pipeline' into 'master'John Cai
.gitlab-ci.yml: Add rails job See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5937 Merged-by: John Cai <jcai@gitlab.com> Approved-by: John McDonnell <jmcdonnell@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Lin Jen-Shin <jen-shin@gitlab.com> Reviewed-by: Nao Hashizume <nhashizume@gitlab.com>
2023-07-10Merge branch 'renovate/google.golang.org-protobuf-1.x' into 'master'Will Chandler
go: Update module google.golang.org/protobuf to v1.31.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6005 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-07-10.gitlab-ci.yml: Add rails jobJohn Cai
Adding a job to run the full rails suite of tests. This allows developers to trigger the job to see if their changes pass the rails test suite. We have three jobs to accomplish this. First, start-rails-specs will create a branch and modify the GITALY_SERVER_VERSION on it. Then, rails-specs will run the Rails test suite on that branch. Finally, rails-specs-cleanup will delete that branch.
2023-07-10Ignore relative paths when asserting error metadataSami Hiltunen
Some errors include the repository's relative path in the error metadata and assert the metadata for equality. This is not ideal as the relative path is an internal storage detail and should not be asserted against elsewhere as we are now doing in handler tests. These tests will all fail when the relative path is rewritten. Address this by overriding the relative path field when constructing intecepted metadata. This way the key's existence in the error metadata is asserted but not the actual contents of the key. It would be better to fix the problem in a less magical way but there's a large number of tests that are asserting the relative paths for equality. Fix these tests for now by overriding the value. We can later fix the tests one by one to not assert the relative path to remove this.
2023-07-10go: Update module google.golang.org/protobuf to v1.31.0GitLab Renovate Bot
2023-07-10cgroup: move all metrics initialization to meterics.goqmnguyen0711/adlternative-zh-cgroups-v2ZheNing Hu
As the metrics detected by Prometheus in cgroups V1 and V2 are basically the same but slightly different, the initialization of all V1/V2 metrics is put into metrics.go. This makes the code cleaner and easier to observe the differences between the detection meterics of V1 and V2. Signed-off-by: ZheNing Hu <adlternative@gmail.com>
2023-07-10cgroup: add support for cgroup v2ZheNing Hu
Due to the lack of cgroup V2 support in Gitaly, some operating systems that use cgroup V2 may not be able to use cgroups in Gitaly properly. Therefore, this patch adds support for cgroup V2 in Gitaly, which maintains a similar interface to cgroup V1 but removes the "gitaly_cgroup_memory_reclaim_attempts_total" metric and modifies the label of the "gitaly_cgroup_procs_total" metric compared to V1. Signed-off-by: ZheNing Hu <adlternative@gmail.com>
2023-07-10Merge branch 'jc/danger-remove-auto-group-labeling' into 'master'Andras Horvath
Danger: Do not label devops::systems indiscriminantly See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6035 Merged-by: Andras Horvath <ahorvath@gitlab.com> Approved-by: Andras Horvath <ahorvath@gitlab.com> Co-authored-by: John Cai <jcai@gitlab.com>
2023-07-09cgroup: refactor cgroup interfacesZheNing Hu
We're preparing to add V2 implementation for cgroup. Since cgroup V1 and V2 have similar implementation logic, we've extracted the common logic into the cgroupHandler interface, and implemented CGroupManager that satisfies the original Manager interface, which internally uses the cgroupHandler interface. Currently, only V1 implementation is available. To be compatible with non-Linux environments, we've added a Noop CgroupManger implementation in manager.go by specifying a build tag for non-Linux operating systems. We've also ensured that the existing multiple test files can only run on Linux by specifying the linux operating system in the build tags. Signed-off-by: ZheNing Hu <adlternative@gmail.com>
2023-07-07Merge branch 'jc/streamline-ci-jobs' into 'master'Will Chandler
.gitlab-ci.yml: Skip tests for non code changes Closes #5419 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5997 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: John Cai <jcai@gitlab.com>
2023-07-07Merge branch 'pks-houskeeping-enable-geometric-repacking' into 'master'Toon Claes
housekeeping: Always enable geometric repacking strategy Closes #5031 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6031 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2023-07-07Merge branch 'renovate-tools/golangci-lint/golang.org-x-tools-0.x' into 'master'Toon Claes
tools/golangci-lint: Update module golang.org/x/tools to v0.11.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6034 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Approved-by: Christian Couder <chriscool@tuxfamily.org> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-07-07Merge branch 'smh-fix-get-custom-hooks-test' into 'master'Toon Claes
Fix broken test GetCustomHooks_nonExistentHooks See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6020 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: James Fargher <jfargher@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2023-07-07Merge branch 'jc/remove-user-commit-files-ff' into 'master'Toon Claes
operations: Remove CommitFilesInGit feature flag See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5984 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: John Cai <jcai@gitlab.com>
2023-07-07operations: Add test for cherry-picking merge commitToon Claes
There wasn't any test coverage for cherry-picking a commit which has more than one parent. This change adds that. The added test has the following `git-log`: * 2905b7e (cherry-picking-dst) Cherry-picking a04f7be | create mode 100644 c | create mode 100644 d * a4da336 add zucchini | create mode 100644 z | * a04f7be merge coconut & dragon fruit into banana | |\ | | * 1a9b416 add dragon fruit | | | create mode 100644 d | | * 77b3f23 add coconut | |/ create mode 100644 c |/| | | | * ecd2b2c add banana |/ create mode 100644 b | * 80765b6 (HEAD -> main) add apple create mode 100644 a
2023-07-07operation: Add reverse cherry-pick testToon Claes
To be sure a bunch of commits can be cherry-picked in reserve order a test is added.
2023-07-07operations: Enable pure git UserCherryPick for SHA256Toon Claes
Because there's a pure git implementation of UserCherryPick, we can use it with SHA256 repositories. These changes enable use of SHA256 repos and test it when using pure git. These changes also include a few cleanups to make the tests a bit more consistent.
2023-07-07operations: Implement UserCherryPick in pure gitToon Claes
Implement the UserCherryPick RPC using pure git commands, using git-merge-tree(1) more specific. This change is still behind a feature flag[1]. [1]: https://gitlab.com/gitlab-org/gitaly/-/issues/5421 Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/4574 Changelog: changed Milestone: 16.2 Label: maintenance::refactor
2023-07-07localrepo: Allow passing merge base to MergeTreeToon Claes
A new config option for localrepo.MergeTree allows the caller to set the merge base, which is passed to git-merge-tree(1) with the argument --merge-base.
2023-07-07Merge branch 'renovate-tools/goimports/golang.org-x-tools-0.x' into 'master'karthik nayak
tools/goimports: Update module golang.org/x/tools to v0.11.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6033 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-07-07Merge branch 'smh-add-missing-fsyncs' into 'master'qmnguyen0711/implement-aimd-algorithmJohn Cai
Add missing fsyncs Closes #5072 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5999 Merged-by: John Cai <jcai@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: John Cai <jcai@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-07-07Danger: Do not label devops::systems indiscriminantlyJohn Cai
Currently we add the devops::systems label irregardless of what group the author is part of. triage-ops already takes care of applying labels based on the MR author so this ends up being noisy and unnecessary. Let's just not set devops::systems since triage-ops already sets the group label.
2023-07-07Merge branch 'smh-remove-all-annotations' into 'master'Justin Tobler
Add operation type annotations on RemoveAll See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6030 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2023-07-06.gitlab-ci.yml: Skip tests for non code changesJohn Cai
We don't need the full pipeline to run for things in the .gitlab/ folder, nor any documentation in .md files. Create a rule to skip tests if we detect such files.
2023-07-06go: Update module golang.org/x/crypto to v0.11.0GitLab Renovate Bot
2023-07-06git: Drop `CheckRefNameFormat()`Patrick Steinhardt
We have converted all callsites of `CheckRefNameFormat()` to instead use `git.ValidateReference()`, which is both more efficient and has better error reporting. So let's drop `CheckRefNameFormat()`.
2023-07-06localrepo: Convert to use `git.ValidateReference()`Patrick Steinhardt
Convert the localrepo package to use `git.ValidateReference()` instead of `git.CheckRefNameFormat()`. The new function is more efficient as it doesn't spawn an external process.
2023-07-06storagemgr: Convert to use `git.ValidateReference()`Patrick Steinhardt
Convert the storage manager logic to use `git.ValidateReference()` instead of `git.CheckRefNameFormat()`. The new function is more efficient as it doesn't spawn an external process and can thus be used to catch all invalid reference names up front. Note that this also allows us to significantly clean up our tests. Before we used to rely on git-update-ref(1) to catch many of the edge cases, and thus the errors differred depending on whether they were raised by our own verification or via the `updateref` package. Now we always get errors via our own verification, which makes the tests a lot more straight forward.
2023-07-06git: Implement new function to validate reference namesPatrick Steinhardt
While we already provide `git.CheckRefNameFormat()` to verify the format of reference names, this function relies on git-check-ref-format(1) to do the verification for us. It is thus not usable as a general purpose function as it is simply too expensive to run once per reference we are to verify. As a first step towards a fix this commit introduces a new function that performs thorough validation of reference names inside Gitaly itself. The function aims to be a faithful reimplementation of what Git does and catch the exact same edge cases. Subsequent commits will convert callsites of `CheckRefNameFormat()` to instead use this new function.
2023-07-06Merge branch 'pks-update-ref-improved-errors' into 'master'Patrick Steinhardt
Introduced generic error metadata and improve updateref errors See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6029 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com>