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
path: root/ruby
AgeCommit message (Collapse)Author
2021-12-13Update parser gem to eliminate Ruby 2.7.5 warningStan Hu
This eliminates the warning: ``` warning: parser/current is loading parser/ruby27, which recognizes warning: 2.7.4-compliant syntax, but you are running 2.7.5. ``` Diff of parser: https://my.diffend.io/gems/parser/3.0.2.0/3.0.3.2 Diff of ast: https://my.diffend.io/gems/ast/2.4.1/2.4.2
2021-12-13proto: Introduce transactional voting phasesPatrick Steinhardt
Transactional votes currently only contain information about the vote that we actually want to cast, but it doesn't contain any sort of metadata which would allow us to more precisely track the nature of a specific vote. Most importantly, while we already use "preparatory" and "committing" votes in almost all places, they are only preparatory and committing votes by convention: there is no metadata which would allow us to discern these cases. Amend the voting RPC call to use "phases", which currently knows three different phases: - "unknown": this is the current default which we'll need to support until all voting callsites have been converted to use proper phases. - "prepared": the change has been prepared to be committed. Locks have been taken already, but no change has yet been committed to disk such that they would be visible to the user. - "committed": changes have been committed to disk and are thus both persistent and visible to the user. With these phases, we can eventually build additional logic into Praefect which makes use of them. This includes creating less replication jobs if no change was committed, making two-phase voting a necessity instead of a convention, and potentially others. Changelog: added
2021-12-07Revert "Merge branch 'mk-grpc-1.42' into 'master'"John Cai
This reverts commit 1a173fd8eefcea695c30d8faa2b2948e868a8e2c, reversing changes made to 9388cf42b3065b0e7b636bfe22883717eedb5623.
2021-12-06Update VERSION filesv14.6.0-rc1GitLab Release Tools Bot
[ci skip]
2021-12-06Update grpc to 1.42.0, google-protobuf to 3.19Matthias Käppler
2021-11-30Merge branch 'smh-generalize-dataloss' into 'master'Patrick Steinhardt
Add 'praefect metadata' subcommand Closes #3481 See merge request gitlab-org/gitaly!4122
2021-11-30Add RPC definitions for GetRepositoryMetadataSami Hiltunen
Praefect has methods in the datastore to retrieve a repository's metadata. This commit adds RPC definitions that allow for retrieving the metadata from cluster. This RPC endpoint is going to be used by a command line tool to retrieve a repository's metadata and by Gitaly tests that run with Praefect in front and peek in to the filesystem. Changelog: added
2021-11-30git: Implement support for bundled Git binariesPatrick Steinhardt
Now that we can build bundled Git binaries, this commit introduces support into the Git command factory to support them. If a new option "git.use_bundled_binaries" is set to `true`, then we automatically derive the Git binary's path from the binary directory of Gitaly. Note that we must go through some hoops though given that the bundled binaries have a "gitaly-" prefix. While it's not much of a problem when executing Git directly, some Git commands require it to find auxiliary helper binaries like "git-remote-http" or "git-receive-pack". To support these cases, we thus create a temporary directory and symlink all binaries Git expects to be present into it. By pointing GIT_EXEC_PATH at this directory, we can thus trick Git into picking the correct set of binaries. This new bundled mode will required configuration changes by admins.
2021-11-30ruby: Silence spec warnings when there is no template dirPatrick Steinhardt
Our rspecs raise a bunch of warnings when creating repositories about missing template directories if the template directory is indeed missing from the host it's running on. We do not care about templates though and have moved away from them already, where Go already knows to not use them at all anymore. The upcoming change to bundle Git with Gitaly will make it the norm that there are no templates anymore, and thus we'd always start to hit this warning. Fix the issue by explicitly telling Git that it shouldn't use the template dir when initializing test repos.
2021-11-30Merge branch 'fetch_bundle_update_head' into 'master'James Fargher
Add UpdateHead to FetchBundle See merge request gitlab-org/gitaly!4076
2021-11-26Merge branch 'update-wiki-existing-page' into 'master'Sami Hiltunen
Return a proper response on WikiUpdatePage failing on DuplicatePageError Closes #3884 See merge request gitlab-org/gitaly!4033
2021-11-25proto: Add UpdateHead to FetchBundleJames Fargher
In order to keep the default branch up-to-date for incremental backups, we need to start updating HEAD when applying bundles. Usually this would be done in git via git-clone. Since we need to apply many bundles, git-clone is no longer usable.
2021-11-24Merge branch 'jv-remove-pack-objects-hook' into 'master'John Cai
Deprecate PackObjectsHook See merge request gitlab-org/gitaly!3916
2021-11-23Deprecate PackObjectsHookJacob Vosmaer
This removes the server side implementation of PackObjectsHook. Changelog: removed
2021-11-23Switch to gitlab-license_finder and bump to 6.14.2.1Balasankar "Balu" C
Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
2021-11-20Include license_finder in the bundle to be used by omnibus-gitlabBalasankar "Balu" C
Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
2021-11-17Merge branch 'pks-ruby-drop-dead-code' into 'master'Patrick Steinhardt
ruby: Clean up dead code and use temporary directory See merge request gitlab-org/gitaly!4079
2021-11-16ruby: Remove unused codePatrick Steinhardt
Due to our piecemeal conversions from Ruby to Go, it's hard at times to find Ruby parts which are not used anymore. As a result, we have accumulated quite a lot of baggage which was missed to be removed. While this is not much of a problem by itself, it does create tension with the upcoming change to support deployments with bundled Git versions, where we don't have a complete Git installation anymore but only a small set of binaries. Remove unused code to make the transition easier.
2021-11-16ruby: Create test data in temporary directoryPatrick Steinhardt
Test data for our rspecs is currently created inside of the worktree in "ruby/tmp". This is bad practice, and we have long since converted our Go tests to use temporary directories instead. Convert rspecs to do the same and remove the corresponding ignore rule.
2021-11-16Remove CloneFromPool and CloneFromPoolInternal RPCsSami Hiltunen
Gitaly contains CloneFromPool and CloneFromPoolInternal RPCs that were added over two years ago in 495a384d41e8b4ed5a6e3e45375eda6aecd4f4fc. They don't appear to be used anywhere in Gitaly or Rails. This commit removes the unused RPCs. Changelog: removed
2021-11-16Revert "repository: Remove deprecated and unused fields from GetRawChanges"Patrick Steinhardt
This reverts commit f80312d8c (repository: Remove deprecated and unused fields from GetRawChanges, 2021-11-11), which has removed `OldPath` and `NewPath` from the RawChanges RPC's response. As it turns out, these deprecated fields are still used by the Elasticsearch indexer. The indexer will be converted to use new paths in v14.6 such that we can reintroduce the removal in v14.7 in Gitaly.
2021-11-12repository: Remove deprecated and unused fields from GetRawChangesPatrick Steinhardt
The "old_path" and "new_path" fields of the GetRawChanges responses have been deprecated ever since we have moved the protobuf definitions into our repo in b9c9aec5c (Start preparation for migrating .proto files, 2019-07-05). They had originally been deprecated given that they were using strings as types, and invalid Unicode characters in strings get dropped when serializing and deserializing Protobuf messages. They had thus been replaced with two fields "old_path_bytes" and "new_path_bytes" and downstream callers have long been converted to use these. Let's drop the old and deprecated fields -- they're not used by anything, and neither should they ever be used.
2021-11-12ref: Drop unused and deprecated ListNewCommits RPCPatrick Steinhardt
The ListNewCommits RPC used to list all commits which were returned by `git rev-list $newrev --not --all`, that is all commits which aren't referenced by any existing ref. This RPC was replaced by ListCommits, which is a lot more flexible and allows passing an arbitrary number of revisions, including pseudo-refs "--not" and "--all". Downstream has been converted in e8a98485fe7 (ff: Remove `:list_commits` feature flag, 2021-07-23) to exclusively use ListCommits, so ListNewCommits is now unused. Remove ListNewCommits. Changelog: removed
2021-11-03objectpool: Drop UnlinkRepostioryFromObjectPool RPCPatrick Steinhardt
The UnlikRepostioryFromObjectPool RPC is not used by anything anymore, and the implementation from it is dangerous given that it doesn't actually unlink a repository from its object pool: it only tries to remove a remote named after the pool's project path, which we wouldn't ever create in the first place. The RPC has thus been deprecated in release v14.3. Remove the RPC and its backing code. Changelog: removed
2021-11-02Return a proper response on WikiUpdatePage failing on DuplicatePageErrorAhmad Sherif
Fixes https://gitlab.com/gitlab-org/gitaly/-/issues/3884 Changelog: fixed
2021-10-26Revert "Merge branch 'pks-objectpool-drop-ondisk-remotes' into 'master'"Patrick Steinhardt
This reverts commit 369fbdb16 (Merge branch 'pks-objectpool-drop-ondisk-remotes' into 'master', 2021-10-25), which introduced a regression in Rails' test suite.
2021-10-25Merge branch 'pks-objectpool-drop-ondisk-remotes' into 'master'Patrick Steinhardt
Remove use of on-disk remotes in object pools See merge request gitlab-org/gitaly!3985
2021-10-25objectpool: Drop UnlikRepostioryFromObjectPool RPCPatrick Steinhardt
The UnlikRepostioryFromObjectPool RPC is not used by anything anymore, and the implementation from it is dangerous given that it doesn't actually unlink a repository from its object pool: it only tries to remove a remote named after the pool's project path, which we wouldn't ever create in the first place. The RPC has thus been deprecated in release v14.3. Remove the RPC and its backing code. Changelog: removed
2021-10-21Update pg_query to v2.1.1Stan Hu
This is needed to match the version on Rails (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72426) and save a few megabytes in the Omnibus package.
2021-10-21Update VERSION filesv14.4.0-rc43GitLab Release Tools Bot
[ci skip]
2021-10-20ref: Add new FindRefsByOID RPC methodJohn Cai
Adds the proto definition and generated go and ruby code for a new RPC FindRefsByOID used to find refs that point to a specific object ID with some flags: patterns the refs need to match, a limit of how many results are returned, and a field by which to sort the results. See https://git-scm.com/docs/git-for-each-ref as a reference for how these flags are used in git for-each-ref. Changelog: added
2021-10-20Add pagination support for FindAllTags RPCVasilii Iakliushin
Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/340591 **Problem** FindAllTags request does not support pagination parameters. Lack of pagination causes performance issues for repositories with many tags. **Solution** Add pagination parameter support similar to what we use for FindLocalBranches. Changelog: added
2021-10-14Upgrade libgit2 to v1.2.0Patrick Steinhardt
libgit2 v1.2.0 has been released on September 1st. Next to a bunch of new features and performance improvements, this release also contains a fix for unpacking objects from packfiles which sometimes led to errors. This is an error we have seen once or twice in the past. Upgrade our version of libgit2 to v1.2.0, along with the correspongind update of Git2Go to v32 and Rugged to v1.2.0.
2021-10-12ruby: Drop OperationsService implementationPatrick Steinhardt
The last RPC implemented by the OperationsService, UserApplyPatch, isn't receiving any traffic anymore since v14.3.0. Drop the implmentation of the service in the Ruby sidecar.
2021-10-06remote: Drop FetchInternalRemote RPCPatrick Steinhardt
The FetchInternalRemote RPC had been used internally to replicate repositories across different Gitaly nodes. At some point in time, this was converted to do a direct fetch though without an additional RPC call because as it turned out, doing inter-Gitaly mutating RPC calls is problematic in combination with transactions given that the remote side would now try to cast votes against another Gitaly. Nowadays, there are no callers left which use this RPC. Remove the deprecated `FetchInternalRemote()` call. The backing logic which is still internally called remains though for use in other parts of Gitaly. We may eventually want to find a better place for it to live. Changelog: removed
2021-10-06Update ruby gem activesupport to v6.1.4.1James Fargher
Since gitlab-labkit also depends on activesupport, this needed updating too. These gems have been updated to match gitlab-rails. Changelog: changed
2021-10-04Determine when CreateBundleFromRefList would generate an empty bundleJames Fargher
In order to gracefully handle incremental backups where nothing has changed, we need to determine when `git bundle create` failed because the bundle was empty. This isn't an error for incremental backups, it simply means there were no updates. The FailedPrecondition GRPC code was chosen here since it best matches the litmus test: > (c) Use FailedPrecondition if the client should not retry until > the system state has been explicitly fixed. E.g., if an "rmdir" > fails because the directory is non-empty, FailedPrecondition > should be returned since the client should not retry unless > they have first fixed up the directory by deleting files from it. Changelog: changed
2021-09-30Merge branch ↵Toon Claes
'qmnguyen0711/1219-create-postuploadpackwithsidechannel-postuploadpack-replacement-using-sidechannel' into 'master' Create PostUploadPackWithSidechannel See merge request gitlab-org/gitaly!3883
2021-09-30Implement PostUploadPackWithSidechannel using sidechannel protocolQuang-Minh Nguyen
Issue: https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1219 Changelog: added
2021-09-22Add FetchBundle to repository service protoJames Fargher
FetchBundle will allow updating an existing repository with the objects and refs of a bundle, such as an incremental backup. Right now the only other RPC is `CreateRespositoryFromBundle` but this requires the repository to not already exist. For incremental backups, there will be a series of bundles that need to be applied to a repository in a specific order.
2021-09-21Merge branch 'pks-drop-list-new-blobs' into 'master'Pavlo Strokov
ref: Drop ListNewBlobs RPC See merge request gitlab-org/gitaly!3893
2021-09-21repository: Remove `IsSquashInProgress()` RPCPatrick Steinhardt
In release 14.2, we have converted `UserSquash()` to never use worktrees anymore. As a result, the old `IsSquashInProgress()` RPC doesn't really do anything anymore and always returns the equivalent of `false`. Upstream has thus been converted in b5b78c33c9f (merge_request: Drop checks whether a squash is in progress, 2021-08-20) to not use the RPC anymore, leaving it without callers. Remove `IsSquashInProgress()`. Changelog: removed
2021-09-21ref: Drop ListNewBlobs RPCPatrick Steinhardt
The `ListNewBlobs()` RPC call has been replaced by the more flexible alternative `ListBlobs()`, which can do the same but across multiple new refs at once. The last callsite in Rails has been removed in 0bc19a62ac3 (gitaly_client: Remove unused `#list_new_blobs` function, 2021-09-15), so it is not used anywhere anymore. Remove the RPC call. Changelog: deprecated
2021-09-21repository: Remove `SetConfig()` RPCPatrick Steinhardt
Remove the deprecated `SetConfig()` RPC call. Modifying the on-disk remote is not supported anymore by Gitaly. Changelog: deprecated
2021-09-21repository: Remove `DeleteConfig()` RPCPatrick Steinhardt
Remove the deprecated `DeleteConfig()` RPC call. Modifying the on-disk remote is not supported anymore by Gitaly. Changelog: deprecated
2021-09-17Update VERSION filesv14.3.0-rc2GitLab Release Tools Bot
[ci skip]
2021-09-15Merge branch 'pks-ref-deprecate-list-new-blobs' into 'master'Christian Couder
ref: Deprecate `ListNewBlobs()` RPC See merge request gitlab-org/gitaly!3873
2021-09-15objectpool: Deprecate `UnlinkRepositoryFromObjectPool()`Patrick Steinhardt
The `UnlinkRepositoryFromObjectPool()` function is supposed to unlink a repository from its object pool. But tall it does is to call `Unlink()`, which in turn only removes the corresponding remote which pointed to the repository from the object pool's repository. In fact, it's not even really doing that given that we never create this remote in the first place. As can be guessed by this no-op action, this RPC call is never executed by anything. Deprecate the RPC such that we can remove it in release 14.4. Changelog: deprecate
2021-09-15ref: Deprecate `ListNewBlobs()` RPCPatrick Steinhardt
The `ListNewBlobs()` RPC call has been replaced upstream by the more flexible alternative `ListBlobs()`, which can do the same but across multiple new refs as once. Let's deprecate this RPC such that we can remove it in v14.4. Changelog: deprecated
2021-09-13remote: Deprecate FetchInternalRemote RPCPatrick Steinhardt
The FetchInternalRemote RPC isn't used by anything anymore. Let's deprecate it such that we can remove it in the next release. Changelog: deprecation