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-06-13Add UserRebaseToRef RPCadd-rebase-to-user-merge-to-ref-rpcHordur Freyr Yngvason
2023-06-09Make conflict error more informativeHordur Freyr Yngvason
See https://gitlab.com/gitlab-org/gitlab/-/issues/282424
2023-06-08Add rebase option to UserMergeToRefHordur Freyr Yngvason
This adds an option to perform a rebase prior to performing the merge, effectively turning it in to a semi-linear merge. This is part of supporting semi-linear merges for merge trains. See https://gitlab.com/gitlab-org/gitlab/-/issues/413103 Changelog: added
2023-06-05Merge remote-tracking branch 'dev/master'GitLab Release Tools Bot
2023-06-05Automatic merge of gitlab-org/gitaly masterGitLab Bot
2023-06-05Merge branch 'local_restore_backup' into 'master'Toon Claes
Implement restores in backup.Repository See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5844 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: James Fargher <jfargher@gitlab.com>
2023-06-05Merge branch 'ps-praefect-cli-track-repositories' into 'master'Sami Hiltunen
praefect: Migrate track-repositories sub-command Closes #5001 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5834 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
2023-06-05Update changelog for 15.10.8GitLab Release Tools Bot
[ci skip]
2023-06-05Update changelog for 15.11.7GitLab Release Tools Bot
[ci skip]
2023-06-05Merge branch 'renovate-tools/goimports/golang.org-x-tools-0.x' into 'master'karthik nayak
tools/goimports: Update module golang.org/x/tools to v0.9.3 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5872 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-06-05Merge branch 'renovate-tools/golangci-lint/golang.org-x-tools-0.x' into 'master'karthik nayak
tools/golangci-lint: Update module golang.org/x/tools to v0.9.3 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5873 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-06-05Merge branch 'jt-rollout-git-2-41-0' into 'master'karthik nayak
git: Wire up Git v2.41 execution environment See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5874 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: Justin Tobler <jtobler@gitlab.com>
2023-06-05Update changelog for 16.0.2GitLab Release Tools Bot
[ci skip]
2023-06-03git: Wire up Git v2.41 execution environmentJustin Tobler
Wire up the Git v2.41 execution environment so that we can toggle between the v2.40 and v2.41 release tracks.
2023-06-02Makefile: Build and install Git v2.41.0Justin Tobler
Build and install a new bundled Git version for the v2.41 release track.
2023-06-02Merge branch 'smh-error-dbl-commit-rollbak' into 'master'Toon Claes
Error when double committing or rollbacking a transaction See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5841 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2023-06-02Merge branch 'git-version-template' into 'master'Patrick Steinhardt
template: Add template fot Git version upgrade See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5867 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: Karthik Nayak <knayak@gitlab.com>
2023-06-02Merge branch 'renovate/github.com-protonmail-go-crypto-digest' into 'master'Pavlo Strokov
go: Update github.com/ProtonMail/go-crypto digest to 6f98819 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5849 Merged-by: Pavlo Strokov <pstrokov@gitlab.com> Approved-by: Pavlo Strokov <pstrokov@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-06-02Merge branch 'pks-go-badger-v4' into 'master'Sami Hiltunen
go.mod: Update Badger to v4.1.0 Closes #4890 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5864 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2023-06-02template: Add template fot Git version upgradeKarthik Nayak
Add a new issue template for the Git version upgrade. This should help us streamline our Git updates more.
2023-06-02Merge branch 'smh-move-packs-in-place' into 'master'Sami Hiltunen
Apply logged pack files to repository without copying Closes #5046 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5846 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com>
2023-06-02Merge branch 'kn-fix-list-conflict-files' into 'master'Patrick Steinhardt
conflicts: Use resolved object IDs See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5869 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: Karthik Nayak <knayak@gitlab.com>
2023-06-02Merge branch 'jt-refactor-alternates-disconnect' into 'master'Patrick Steinhardt
objectpool: Make alternates disconnection reusable See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5845 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: Justin Tobler <jtobler@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Justin Tobler <jtobler@gitlab.com>
2023-06-02objectpool: Add `objectpool.Disconnect()` testsJustin Tobler
Previously object pool disconnection was tested through its RPC tests. Now that this logic has been factored out into `Disconnect()` testing can be done at this layer. This change refactors the RPC tests to be suitable for direct invocations of `Disconnect()`
2023-06-02objectpool: Make alternates disconnection reusableJustin Tobler
The `DisconnectGitAlternates()` RPC handles disconnecting a repository from an object pool. In the future, the `ReplicateRepository()` RPC will need to also be capable of disconnecting a target repository from its object pool when the source repository is not linked. This change factors the object pool disconnection logic out of the RPC and moves it into the `git/objectpool` package.
2023-06-02conflicts: Use resolved object IDsKarthik Nayak
In `conflictFilesWithGitMergeTree` we replace the commit OID with the filename. Currently we're using the OID from the request, but this could be the shortened OID. Let's instead use the fully resolved OID.
2023-06-01tools/golangci-lint: Update module golang.org/x/tools to v0.9.3GitLab Renovate Bot
2023-06-01tools/goimports: Update module golang.org/x/tools to v0.9.3GitLab Renovate Bot
2023-06-01praefect: Sub-command interruption with SIGINTPavlo Strokov
Execution of any sub-commands should be possible to interrupt by sending SIGINT signal to the process. It is so for all except the 'serve' command as it has its own handling mechanism.
2023-06-01go.mod: Update Badger to v4.1.0Patrick Steinhardt
Badger has bumped its major version from v3 series to v4. This bump is mostly uninteresting, but there are two interesting changes in there: - They have upgraded the minimum required Go version to 1.19. This has kept us from upgrading Badger given that we still supported Go 1.18. This has changed with a17fb7823 (go.mod: Use Go 1.19 as minimum required version, 2023-05-23) though, so we're unblocked with the upgrade. - They have changed their version schema from CalVer to SemVer, meaning that future releases should be more indicative of real major changes. Other than that there are no real changes that would be interesting to us.
2023-06-01praefect: Sub-command 'serve' doesn't accept positional argumentsPavlo Strokov
2023-06-01praefect: Refactor sub-command invocation in testPavlo Strokov
Invocations of sub-command in test now use NewApp() function that has all sub-commands registered on it and allows to verify more code for each test. Closes: #5001
2023-06-01praefect: Write database close error into App.ErrWriterPavlo Strokov
If database close call producer an error it is now written into App.ErrWriter instead of os.Stderr. Part of: #5001
2023-06-01praefect: Remove old sub-command implementation leftoversPavlo Strokov
All sub-commands of Praefect were moved to a third party urfave/cli/v2 library. The old helper functions and an interface are removed as they are not used anymore. Also, the help text generated by new library now contains information about all sub-commands and doesn't need to be modified. The 'serve' sub-command can now be restricted to disallow arguments to be passed for it. Part of: #5001
2023-06-01praefect: Migrate track-repositories sub-commandPavlo Strokov
Migration of the 'track-repositories' sub-command from the old implementation to the new approach with usage of the third party urfave/cli/v2 third party library. The invocation of the command remains the same, but it has more descriptive representation when help is invoked. Also, it is possible now to invoke help only for the sub-command to see more details about it and its usage. Part of: #5001
2023-06-01Merge branch 'jc/add-tree-modification-helpers' into 'master'Patrick Steinhardt
localrepo: Add tree modification helpers See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5567 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: James Fargher <proglottis@gmail.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: John Cai <jcai@gitlab.com>
2023-06-01Apply logged pack files to repository without copyingSami Hiltunen
TransactionManager is currently unpacking pack files in order to apply them to the repository from the log. This is inefficient: 1. The objects are copied from the pack file when they are unpacked. 2. Accessing unpacked objects is less efficient than packed ones. 3. It's more work to repack the objects later. To avoid these problems, this commit instead hard links the logged pack files from the log to the repository. This is done as follows: 1. When staging the transaction, a pack file is computed that contains objects that are newly reachable from the new reference tips. An index is also computed for the pack file. 2. The pack file and its index are logged. 3. The pack file and the index are hard linked from the log directory to the repository's 'objects/pack' directory. The pack file and the index are logged with the name Git gives them, so `pack-<digest>.{pack,idx}`. It would be simpler to log the files with static names so they are always named the same for all transactions, say `transaction.{pack,idx}`. They could then be linked to the repository's object directory under the log entry's index, so for example `objects/pack/<log_index>.{pack,idx}`. This would be simpler as we wouldn't have to pipe the pack prefix through the log. The problem is that Git doesn't seem to automatically remove these packs when it's doing a full repack with `git repack -ad`. This would lead to the packs accumulating in the repository. For that reason, we use the Git generated names. Applying pack files directly doesn't also come without downsides. With each write resulting in an additional pack file in the repository, looking up objects from the packs becomes slower. This is particularly a problem if there are large number of small writes. We might want to later have a look at using a threshold on the object count in the pack to decide whether we apply it directly or unpack it similarly to what Git does when receiving packs. We'll leave this for later though once we know this is a problem.
2023-06-01Log a pack file index along side transaction's pack fileSami Hiltunen
The objects a transaction makes reachable are collected into a pack file that then ultimately gets logged. On log applicaton that pack file is currently unpacked into the repository. A more efficient way to apply the pack file would be to hard link it into the repository directly from the log to avoid copying. In order for the objects to be available for reading, the pack file needs an index which we're currently not computing. To prepare for linking the pack files into place, this commit computes an index for the transaction's pack file prior to logging the transaction. The index is already logged along side the pack file but we don't yet make use of it.
2023-06-01Add a permission for shared read only filesSami Hiltunen
We're soon about to write packs to the disk through index-pack. This stores the packs with 0o444 permissions. Add a constant for the new permission type.
2023-06-01Provide path to parser functions in RequireDirectoryStateSami Hiltunen
Depending on the file in question, one might want to do assertions not only based on the file's content but input. This is the case for example when asserting pack file indexes are correct. We don't really care about the content of the actual file but we want to make sure it's a valid index for a given pack. Provide the path in the ParseContent method to make it easier to distinguish which file is being parsed.
2023-06-01Add a command description for git index-packSami Hiltunen
We'll soon need to use index-pack to compute pack file indexes in TranscationManager. Add a command description for it.
2023-06-01Log a directory instead of a single pack fileSami Hiltunen
Each transaction has a staging directory where they can stage files for commit. Currently it is used to store two things. - stagingDir/quarantine stores the transaction's quarantine directory. This is where all the RPC handlers write the git objects prior while staging the transaction prior to a commit. - stagingdir/transaction.pack is created right before committing the transaction to create a pack file that can be logged. The current assumption is that we're only ever logging a single file, which is the pack file containing the transaction's objects. However, there are other files we could want to log along the pack file. For example, we could compute and log the pack file's index to avoid having to do so when applying the log entry. This commit changes the transaction.pack to be placed in stagingDir/wal-files/transaction.pack. Instead of logging only the pack file, we log the entire wal-files directory. This makes room for logging other files alongside the pack file as well. There's no changes in external behavior.
2023-06-01Merge branch 'renovate/github.com-pelletier-go-toml-v2-2.x' into 'master'James Fargher
go: Update module github.com/pelletier/go-toml/v2 to v2.0.8 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5855 Merged-by: James Fargher <proglottis@gmail.com> Approved-by: Will Chandler <wchandler@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-06-01backup: Only set server info on remote repositoryJames Fargher
Now that both backup and restore are implemented, we can move updating server info from context to only be set on remote repositories. Since local repositories do not connect, server info is always unused.
2023-06-01backup: Test restores with local and remote repositoriesJames Fargher
Now that all the required methods are implemented for restores we can test both implementations.
2023-06-01backup: Implement set custom hooks on backup.RepositoryJames Fargher
In preparation for server-side backup restores here we extract the RPC implementation of set custom hooks and additionally add a local implementation.
2023-06-01backup: Implement fetch bundle on backup.RepositoryJames Fargher
In preparation for server-side backups here we extract the RPC implementation of fetch bundle and additionally implement a local repository fetch bundle.
2023-06-01backup: Implement create repository for backup.RepositoryJames Fargher
In preparation for server-side backups here we extract the RPC implementation of create repository and add a corresponding server-side implementation.
2023-06-01backup: Implement remove repository for backup.RepositoryJames Fargher
In preparation of supporting server-side backup restores, here we add both RPC and server-side implementations for remove repository.
2023-06-01backup: Inject local repository dependenciesJames Fargher
For server-side backups we will need to have access to the git command factory and transaction manager in order to restore repositories.