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-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-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-01Merge branch 'remote_repo_head_reference' into 'master'Justin Tobler
Use HeadReference instead of GetDefaultBranch See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5988 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: James Fargher <jfargher@gitlab.com>
2023-06-30Merge branch 'jc/squash-in-git' into 'master'Justin Tobler
operations: Replace git2go merge in squash with git-merge-tree See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5985 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Reviewed-by: Justin Tobler <jtobler@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: John Cai <jcai@gitlab.com>
2023-06-30Merge branch 'renovate/github.com-urfave-cli-v2-2.x' into 'master'Sami Hiltunen
go: Update module github.com/urfave/cli/v2 to v2.25.7 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5942 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-06-30operations: Replace git2go merge in squash with git mergeJohn Cai
UserSquash only contains one git2go call, a merge. We already have a helper function merge() that uses Git plumbing commands. Use a feature flag to gate switching the merge over to the git plumbing commands to remove all Git2Go usage in this RPC.
2023-06-30Merge branch 'xx/fix-length-checking-for-parsing-conflict-files' into 'master'karthik nayak
merge-tree: Fix length checking for conflict parsing See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5992 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Xing Xin <xingxin.xx@bytedance.com>
2023-06-30Merge branch 'restore_repository_rpc' into 'master'Sami Hiltunen
Implement RestoreRepository RPC Closes #4939 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5968 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: James Fargher <jfargher@gitlab.com>
2023-06-30Merge branch 'jt-praefect-get-object-pool' into 'master'Sami Hiltunen
praefect: Introduce `GetObjectPoolHandler()` See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5928 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: Justin Tobler <jtobler@gitlab.com>
2023-06-30Merge branch 'jt-remove-feature-flag' into 'master'karthik nayak
featureflag: Remove Git v2.41 flag See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5976 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: Justin Tobler <jtobler@gitlab.com>
2023-06-30merge-tree: Fix length checking for conflict parsingXing Xin
The length checking for conflicting file parsing can not protect us from a out-of-range panic if we received malformed output from git, though it can hardly happen. Signed-off-by: Xing Xin <xingxin.xx@bytedance.com>
2023-06-30Merge branch 'update-to-go-1-20-5' into 'master'Quang-Minh Nguyen
Bump Go to 1.20.5 Closes #5416 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5987 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Robert Marshall <rmarshall@gitlab.com>
2023-06-30Bump Go to 1.20.5Robert Marshall
2023-06-30repository service: Implement RestoreRepositoryJames Fargher
The restore logic itself is already tested with backup.Manager. The tests here are only smoke tests and to ensure that the vanity repository works through praefect.
2023-06-30praefect: Add RestoreRepository as a transactional RPCJames Fargher
2023-06-30proto: Add RestoreRepository RPCJames Fargher
Add an RPC that restores a repository server-side, directly from object-storage. Object storage must be configured in config.backup.go_cloud_url Changelog: added
2023-06-30backup: Add vanity repository to restore requestJames Fargher
The vanity repository allows using a different repository to calculate repository paths from the repository that is being restored. This will be used for praefect requests where the repository being restored gets rewritten. So for praefect we accept the original, not rewritten repository, such that backups are stored based on the praefect path, and use the rewritten repository to access the git repository.
2023-06-30remote: Use GetReference instead of GetDefaultNameJames Fargher
Now that we have a precise way to read HEAD from repositories, there is no need to use the GetDefaultBranch heuristic.
2023-06-30repository: Use HeadReference instead of GetDefaultBranchJames Fargher
Now that we have a precise way to read HEAD from repositories, there is no need to use the GetDefaultBranch heuristic.
2023-06-30test suite: Use HeadReference instead of GetDefaultBranchJames Fargher
Now that we have a precise method to read HEAD, there is no need to use the heuristic in GetDefaultBranch in tests.
2023-06-30remoterepo: Add HeadReferenceJames Fargher
HeadReference is a replacement for GetDefaultBranch. The intention is to replace and remove the default branch heuristic that GetDefaultBranch uses and instead rely solely on HEAD. This could have been implemented as a parameter on GetDefaultBranch but this requires modifying all call sites and localrepo already has a method called HeadReference for this purpose.
2023-06-30praefect: Introduce `GetObjectPoolHandler()`Justin Tobler
The `GetObjectPool()` RPC should return object pool information that can be consumed by the client. When this Gitaly RPC is executed behind Praefect, the replica path is returned instead of the relative path. The replica path is an implementation detail of Praefect and not useful to the client which really wants the relative path. This change implements a `GetObjectPoolHandler()` to explicitly handle the `GetObjectPool()` RPC in Praefect instead of relying on the `UnknownServiceHandler` to proxy the RPC. This enables the RPC's response replica path to be reversed by Praefect to the appropriate relative path and storage the client expects.
2023-06-30praefect: Wire `praefect.Router` to `NewGRPCServer()`Justin Tobler
In a future commit, a Praefect stream handler will be registered for the `GetObjectPool()` RPC. This handler will need to use `praefect.Router` to handle routing the RPC to the appropriate node. Make the necessary adjustments to wire `praefect.Router` to `NewGRPCServer()` where the new stream handler will be registered in the future.
2023-06-29Makefile: Update default Git version to v2.41Justin Tobler
With the feature flag now removed, update the Makefile's default Git version from v2.40 to v2.41.
2023-06-29git: Remove Git v2.40 execution environmentJustin Tobler
Now that Git v2.41 is the default bundled execution environment, remove Git v2.40.
2023-06-29Merge branch 'andrashorvath-master-patch-49585' into 'master'Mark Wood
Add @gerardo to Gitaly support request template See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5994 Merged-by: Mark Wood <mwood@gitlab.com> Approved-by: Mark Wood <mwood@gitlab.com> Co-authored-by: Andras Horvath <ahorvath@gitlab.com>
2023-06-29Merge remote-tracking branch 'dev/master'GitLab Release Tools Bot
2023-06-29Add @gerardo to Gitaly support request templateAndras Horvath
2023-06-29go: Update module github.com/urfave/cli/v2 to v2.25.7GitLab Renovate Bot
2023-06-29Automatic merge of gitlab-org/gitaly masterGitLab Bot
2023-06-29Merge branch 'pks-ff-enable-synchronized-hook-executions' into 'master'Pavlo Strokov
hooks: Default-enable synchronized hook executions See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5989 Merged-by: Pavlo Strokov <pstrokov@gitlab.com> Approved-by: Pavlo Strokov <pstrokov@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2023-06-29Merge branch 'pks-praefect-unify-errrepositorynotset' into 'master'Pavlo Strokov
praefect/coordinator: Unify ErrRepositoryNotSet errors with Gitaly See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5975 Merged-by: Pavlo Strokov <pstrokov@gitlab.com> Approved-by: Pavlo Strokov <pstrokov@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2023-06-29Automatic merge of gitlab-org/gitaly masterGitLab Bot
2023-06-29Update VERSION filesv16.2.0-rc2GitLab Release Tools Bot
2023-06-29Automatic merge of gitlab-org/gitaly masterGitLab Bot
2023-06-29Merge branch 'id-verify-signature' into 'master'Patrick Steinhardt
Extend GetCommitSignatures to return Signer See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5961 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Igor Drozdov <idrozdov@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: Igor Drozdov <idrozdov@gitlab.com>
2023-06-29hooks: Default-enable synchronized hook executionsPatrick Steinhardt
In 38e01406b (gitaly/hook: Fix packed-refs lock contention by synchronizing hooks, 2023-06-13), we have added logic to synchronize the execution of hooks across the primary and secondary Gitaly nodes. This is required in order to avoid locking references on the secondaries while the primary is still busy executing the hook logic. We have rolled out this change into production systems without any observed issues so far. Given that this feature flag concerns voting logic that needs to be the same across all Gitaly nodes we cannot remove the feature flag immediately though. Instead, we have to release it as default-enabled first before we can actually remove the flag altogether. Like this, Praefect continues to decide whether the new voting logic is being used as it will inject the current flag value into all RPC calls to Gitaly nodes.
2023-06-29Automatic merge of gitlab-org/gitaly masterGitLab Bot
2023-06-29cmd/gitaly-hooks: Exercise transactions in testPatrick Steinhardt
We're about to default-enable transactional synchronization of hook executions, which will cause both primary and secondary to cast an additional vote after hooks have been executed by the primary node. This will cause one of our tests in `cmd/gitaly-hooks` to fail because it ain't got a transaction manager set up. Prepare for this change by explicitly testing transactional logic, too.
2023-06-29Merge branch 'jt-update-template' into 'master'Patrick Steinhardt
template: Update `Rollout Git version` template See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5981 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: Justin Tobler <jtobler@gitlab.com>
2023-06-29Extend GetCommitSignatures to return SignerIgor Drozdov
This field indicates whether the commit signature has been signed by a user or by the system
2023-06-29Define Verify function for SigningKey interfaceIgor Drozdov
This function verifies the signature and checks whether it's been signed by the signing key
2023-06-29Automatic merge of gitlab-org/gitaly masterGitLab Bot
2023-06-29Merge branch 'renovate/github.com-hashicorp-golang-lru-v2-2.x' into 'master'Quang-Minh Nguyen
go: Update module github.com/hashicorp/golang-lru/v2 to v2.0.4 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5983 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-06-29Automatic merge of gitlab-org/gitaly masterGitLab Bot
2023-06-29Merge branch 'renovate/github.com-opencontainers-runtime-spec-1.x' into 'master'John Cai
go: Update module github.com/opencontainers/runtime-spec to v1.1.0-rc.3 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5940 Merged-by: John Cai <jcai@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-06-29Merge branch 'renovate/github.com-rubenv-sql-migrate-1.x' into 'master'John Cai
go: Update module github.com/rubenv/sql-migrate to v1.5.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5965 Merged-by: John Cai <jcai@gitlab.com> Approved-by: Christian Couder <chriscool@tuxfamily.org> Approved-by: John Cai <jcai@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-06-29Merge branch 'renovate/golang.org-x-exp-digest' into 'master'John Cai
go: Update golang.org/x/exp digest to 97b1e66 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5977 Merged-by: John Cai <jcai@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-06-29Merge branch 'renovate/github.com-jackc-pgx-v5-5.x' into 'master'Will Chandler
go: Update module github.com/jackc/pgx/v5 to v5.4.1 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5967 Merged-by: Will Chandler <wchandler@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>