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
2022-11-04operations: Implement merge using git-merge-tree(1)merge-using-merge-treeChristian Couder
git-merge-tree(1) is a recent Git command that was introduced to do in-memory merges without a worktree. Implement merge() with git-merge-tree(1) Co-authored-by: John Cai <jcai@gitlab.com>
2022-11-04operations: Add newline after commit message with git2go MergeJohn Cai
A future commit will add an implementation to use git-merge-tree(1) to create a merge. In order to do so, we will need to also use git-commit-tree(1) to create the commit. There is a difference however, between how git-commit-tree(1) processes the -m message that is passed in versus how git2go's Merge function creates the commit. git2go's Merge function does not add a '\n' when creating the commit message. In order to have parity between git2go and using git-merge-tree(1), which we are about to do, add a '\n' after the commit message when merging with git2go.
2022-11-04git: Add IsMergeTreeSupported()John Cai
Add a function that checks if git-merge-tree(1) is supported. It was first included in the 2.38.0 release.
2022-11-03operations: Introduce MergeTreeMerge featureflagChristian Couder
This new featureflag is for using an implementation of UserMergeBranch that uses `git merge-tree` instead of the previous implementation based on git2go. Co-authored-by: John Cai <jcai@gitlab.com>
2022-11-03operations: Encapsulate git2go merge logic into its own functionChristian Couder
This moves the code in UserMergeBranch that actually performs the merge into a new mergeWithGit2Go() function. This way it will be easier to later implement new merge code that doesn't use git2goExecutor.Merge() to perform the merge, and remove this code path eventually. Co-authored-by: John Cai <jcai@gitlab.com>
2022-11-03git: Add 'merge-tree' commandChristian Couder
We will need the `git merge-tree` command, especially its new --write-tree mode, in a later commit soon. So let's add it among the supported Git commands. Co-authored-by: John Cai <jcai@gitlab.com>
2022-11-03git: Add MergeTreeResultJohn Cai
git-merge-tree(1)'s output can be parsed for context around which files are part of the conflict, as well as other information about what happened during the merge. Add a new type that we can parse the stdout of git-merge-tree(1) into.
2022-11-03Merge branch 'sh-update-pg-query' into 'master'jc-submodule-gitToon Claes
Update pg_query to 2.2.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5007 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Co-authored-by: Stan Hu <stanhu@gmail.com>
2022-11-03Merge branch 'pks-security-merge-correct-master-commit' into 'master'Quang-Minh Nguyen
Merge with `security/master` after v15.3.5 security release See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5010 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: GitLab Release Tools Bot <delivery-team+release-tools@gitlab.com> Co-authored-by: John Skarbek <jskarbek@gitlab.com> Co-authored-by: Karthik Nayak <knayak@gitlab.com>
2022-11-03Merge with `security/master` after v15.3.5 security releasePatrick Steinhardt
While we've already merged security/master into our tree via 08c88a2c8 (Merge branch 'sync-canonical-with-security-changes' into 'master', 2022-11-02), that commit merged with 702f036ed (Update changelog for 15.3.5, 2022-11-02). This is not the commit that ultimately landed in the security/master branch though, but it instead is ef59e59f1 (Update changelog for 15.3.5, 2022-11-02), which is a rebased version of the former commit. Because we have merged the wrong commit we now still see merge conflicts in the Auto-Update bot for Gitaly. Let's fix this by merging the correct commit, even though this doesn't bring any changes into our tree.
2022-11-03Update VERSION filesv15.6.0-rc2GitLab Release Tools Bot
[ci skip]
2022-11-03Merge branch 'jc-add-git-2.38' into 'master'Patrick Steinhardt
Add git 2.38 as a build target in Makefile See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4943 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: John Cai <jcai@gitlab.com>
2022-11-03Update pg_query to 2.2.0Stan Hu
This fixes build issues with macOS SDK 13.0: https://github.com/pganalyze/pg_query/issues/263 Changelog: fixed
2022-11-03Merge branch 'sync-canonical-with-security-changes' into 'master'Stan Hu
Syncing master into gitaly See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5006 Merged-by: Stan Hu <stanhu@gmail.com> Approved-by: John Skarbek <jskarbek@gitlab.com> Co-authored-by: GitLab Release Tools Bot <delivery-team+release-tools@gitlab.com> Co-authored-by: Karthik Nayak <knayak@gitlab.com>
2022-11-02Update changelog for 15.3.5GitLab Release Tools Bot
[ci skip]
2022-11-02Update changelog for 15.4.4GitLab Release Tools Bot
[ci skip]
2022-11-02Update changelog for 15.5.2GitLab Release Tools Bot
[ci skip]
2022-11-02respository: Custom DNS resolution for HTTP clientKarthik Nayak
The `CreateRepositoryFromSnapshot` RPC gets the tar file from an HTTP URL. It receives the file by doing a simple HTTP GET call using the Go's standard library client. To avoid DNS rebinding issues here, we use the provided resolved address and do a custom DNS mapping by overriding the `DialContext` function of the HTTP client. Let's also add a test wherein we provide a random hostname but the correct resolved address (IP). With HTTP, this should work. Signed-off-by: Karthik Nayak <knayak@gitlab.com>
2022-11-02repository: Use `GetURLAndResolveConfig()`Karthik Nayak
In `FetchRemote()` use `GetURLResolveConfig()` to get the configPair and modified URL to avoid DNS rebinding. Unfortunately, because of the structure of the code, the `git.Cmd` is not exposed on this level, which means the added code is not testable.
2022-11-02remote: Use `GetURLAndResolveConfig()`Karthik Nayak
In `updateRemoteMirror()` use `GetURLAndResolveConfig()` to get the configPair and modified URL to avoid DNS rebinding. Unfortunately, because of the structure of the code, the `git.Cmd` is not exposed on this level, which means the added code is not testable.
2022-11-02repository: Use `GetURLAndResolveConfig()`Karthik Nayak
In the `cloneFromURLCommand()` function lets use the `GetURLAndResolveConfig()` function to obtain configPair and the modified URL to prevent DNS rebinding. Add tests for the same.
2022-11-02remote: Use `GetURLAndResolveConfig()`Karthik Nayak
Use the `GetURLAndResolveConfig()` to get modified URL and any configPair if necessary to avoid DNS rebinding. Use this modified URL instead and add the configPair to the git subcommand. To make it easier to test, move the command instantiation part to a new separate function `findRemoteRootRefCmd`. This makes it easier to test the changes to the `git.Cmd`.
2022-11-02git: Add `GetURLAndCurloptResolveConfig()`Karthik Nayak
To facilitate the creation of the ConfigPair for the `http.curloptResolve` flag or modification of the URL for avoiding DNS rebinding we introduce the `GetURLAndCurloptResolveConfig()` function. This function takes in the remoteURL and the resolvedAddress and then provides the modified URL and configPair to be passed onto Git. For HTTP/HTTPS URLs we leave the remoteURL as is and use the `http.curloptResolve` flag which was introduced in Git. This is done by providing a new ConfigPair with the value in the format of `HOST:PORT:ADDRESS[,ADDRESS]`. For SSH/Git protocol URLs we simply replace the hostname with the provided resolved address. The function does basic validation of the provided remoteURL and resolved address and throws errors if any validation failed.
2022-11-02proto: Deprecate `http_host` fieldKarthik Nayak
This field was introduced to handle DNS rebinding issues. But it was never utilized by rails. From the previous commit c21d6b31ab (proto: Add resolved_address along remote URLs) we introduced a new field `resolved_address` which will be used for DNS rebinding issues. So mark the old `http_host` field as deprecated.
2022-11-02proto: Add resolved_address along remote URLsKarthik Nayak
For the following protobuf definitions: 1. UpdateRemoteMirrorRequest 2. FindRemoteRootRefRequest 3. CreateRepositoryFromURLRequest 4. Remote add a new field `resolved_address` which would hold the corresponding IP address of the remote URL provided. This helps us prevent DNS rebinding. Changelog: security
2022-11-02git: Add v2.38 Git version execution environmentJohn Cai
Add a git execution environment for v2.38, as well as a feature flag to enable it.
2022-11-02Merge branch 'pks-ci-analysis-stage' into 'master'Toon Claes
ci: Introduce "analyze" stage See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5001 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Pavlo Strokov <pstrokov@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2022-11-02Makefile: Add git 2.38John Cai
2022-11-02Merge branch 'qmnguyen0711/remove-rugged-in-gitaly' into 'master'Patrick Steinhardt
Remove rugged wrappers in Gitaly See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4992 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Co-authored-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
2022-11-02Merge branch 'renovate/gitlab.com-gitlab-org-labkit-1.x' into 'master'Patrick Steinhardt
go: Update module gitlab.com/gitlab-org/labkit to v1.16.1 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5004 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2022-11-02Update VERSION filesv15.6.0-rc1GitLab Release Tools Bot
[ci skip]
2022-11-02Update changelog for 15.3.5GitLab Release Tools Bot
[ci skip]
2022-11-02Update changelog for 15.4.4GitLab Release Tools Bot
[ci skip]
2022-11-02Merge branch 'pks-objectpool-revert-dont-init-on-fetch' into 'master'Quang-Minh Nguyen
objectpool: Revert error if object does not exist on fetch See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5003 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2022-11-02Update changelog for 15.5.2GitLab Release Tools Bot
[ci skip]
2022-11-02go: Update module gitlab.com/gitlab-org/labkit to v1.16.1GitLab Renovate Bot
2022-11-02objectpool: Revert error if object does not exist on fetchPatrick Steinhardt
In 3bfe68576 (objectpool: Raise error if object pool does not exist on fetch, 2022-10-26), we have changed `FetchIntoObjectPool()` to raise an error if the object pool didn't exist yet instead of silently creating it. This fixes a bug in Praefect, which needs to know about all RPCs which create a repository in order to record the new repository. This change unfortunately breaks some tests in Rails. So let's revert it for the time being so that we ca first amend these tests. Changelog: fixed
2022-11-01Merge branch 'pks-objectpool-more-fixes' into 'master'Justin Tobler
objectpool: More test refactorings See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4973 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2022-11-01ci: Introduce a new "analyze" stagePatrick Steinhardt
All jobs that either test or analyze are part of the same "test" stage. Given that the number of jobs has grown quite large by now this makes it hard to find the job one is searching for. Introduce a new "analyze" stage to split up those two groups of jobs.
2022-11-01ci: Reorder macOS job to colocate with other test jobsPatrick Steinhardt
The recently-added job that runs our tests on macOS is not grouped together with all the other tests that run tests. Reorder it to improve locality.
2022-11-01Merge branch 'jt-replicate-repo' into 'master'Sami Hiltunen
Praefect: Replicate to existing repository Closes #4288 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4968 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: Justin Tobler <jtobler@gitlab.com>
2022-11-01ruby: Clean up gems and test configurationsqmnguyen0711/remove-rugged-in-gitalyQuang-Minh Nguyen
Changelog: other
2022-11-01Merge branch 'renovate/github.com-protonmail-go-crypto-digest' into 'master'Patrick Steinhardt
go: Update github.com/ProtonMail/go-crypto digest to cf6655e See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4987 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Pavlo Strokov <pstrokov@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2022-10-31ruby: Remove RuggedInterceptorQuang-Minh Nguyen
RuggedInterceptor was used to initialize some data when ruby sidecar starts to handle a gRPC request. Those data were used in Gitlab's repository wrapper around Rugged. That wrapper was removed which made this interceptor redundant. Changelog: other
2022-10-31ruby: Remove supporting methods and logger classesQuang-Minh Nguyen
After the wrappers for Rugged were removed, related supporting methods become obsolete. One notable change in this commit is that we don't need to create Gitlab::Git::Repository in find_license. Instead, we can extract the repo path directly from the call argument. Changelog: other
2022-10-31ruby: Remove ruby/lib/gitlab/git/*Quang-Minh Nguyen
Those classes wrap around rugged data and provide some advanced sugar-coating methods. Both FindLicense and gitaly-linguist use the underlying gems exclusively. Those wrappers become obsolete now. Changelog: other
2022-10-31ruby: Remove HooksService and OperationServiceQuang-Minh Nguyen
Changelog: other
2022-10-31ruby: Remove FeatureFlagsQuang-Minh Nguyen
FeatureFlags is a wrapper for feature flags passed from Gitaly via gRPC metadata. As there is barely anything left in ruby sidecar, it becomes redundant. Changelog: other
2022-10-31Merge branch 'kn-onboarding-update' into 'master'John Cai
onboarding: Add gitaly retrospective repository See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4942 Merged-by: John Cai <jcai@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Co-authored-by: Karthik Nayak <knayak@gitlab.com>
2022-10-31Remove rubyserver redundant clientsQuang-Minh Nguyen
At this point, nearly all services, except for FindLicense and gitlay-linguist were removed from Ruby sidecar. We should remove the redundant service clients in Gitaly. Changelog: other