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-11-09housekeeping: WIP make it possible to offload blobscc_offload_packfile_pocChristian Couder
2023-11-09repository_path: Add blob offload path functionsChristian Couder
As we are going to be able to offload blobs in some packfiles that might be stored on HDDs to save storage cost, we should have some repository path infrastructure to find the path where the new packfiles will be and to know if a repo uses blob offloading.
2023-10-26Merge branch 'toon-resolve-rev-test' into 'master'James Fargher
localrepo: Add tests for ResolveRevision See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6498 Merged-by: James Fargher <jfargher@gitlab.com> Approved-by: James Fargher <jfargher@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Toon Claes <toon@gitlab.com>
2023-10-25Merge branch 'kn-git-242' into 'master'karthik nayak
Git: Bump the minimum version to 2.42 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6486 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
2023-10-25localrepo: Add tests for ResolveRevisionToon Claes
There was no test coverage for the ResolveRevision() function, add them. Label: maintenance::pipelines
2023-10-25localrepo: Parallellize refs testToon Claes
It's common practice to mark all tests to run in parallel with t.Parallel(). Add this to all existing tests in refs_test.go and make the required code change to allow parallel execution.
2023-10-24Merge branch 'jt-quarantine-flaky-test' into 'master'Justin Tobler
localrepo: Quarantine flaky `TestRepo_FetchInternal` test See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6491 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com>
2023-10-24Merge branch 'smh-transactional-create-repository' into 'master'Justin Tobler
Handle repository creations transactionally See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6492 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2023-10-24version: Get rid of `CatfileSupportsNulTerminatedOutput()`Karthik Nayak
Since we've updated the minimum version of Git to v2.42.0, we no longer need to check if git-cat-file(1) supports the '-Z' option. So let's get rid of the helper function and code around it.
2023-10-24ci: Bump Git version to 2.42Karthik Nayak
As we have stopped building git 2.41, let's bump the minimum version on the CI to 2.42.
2023-10-24Makefile: Stop building git 2.41Karthik Nayak
In the previous release we had removed the flag to use 2.41. In this release we can stop building it and remove it entirely.
2023-10-24git: Bump minimum version of Git to 2.42Karthik Nayak
Let's bump the minimum version of Git to 2.42 with this bring in the following important changes: * git-pack-refs(1) learned to take --include and --exclude, which allows us to skip packing certain references. This is important in the context of the write-ahead log so that we don't pack write-ahead log references. * SHA256 is no longer marked as experimental. * Git has learned to more efficiently exclude references, which should help repositories which have many hidden references. * git-rev-list(1) has learned to take pseudo-refs like --all and --not in --stdin mode. * git-cat-file(1) has learned a new -Z switch, which uses NUL delimiters for both stdin and stdout.
2023-10-24Merge branch 'eread/roll-version-of-gitlab_dangerfiles-forward' into 'master'Toon Claes
Update to latest gitlab-dangerfiles Gem version See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6493 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com>
2023-10-24Merge branch 'jt-doc-conflicts-proto' into 'master'karthik nayak
proto: Add documentation for `ConflictsService` See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6484 Merged-by: karthik nayak <knayak@gitlab.com> Approved-by: karthik nayak <knayak@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-10-24Update to latest gitlab-dangerfiles Gem versionEvan Read
2023-10-24Merge branch 'jt-ff-default-pool-replication' into 'master'Justin Tobler
featureflag: Default enable `ReplicateRepositoryObjectPool` See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6487 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com>
2023-10-24Handle repository creations transactionallySami Hiltunen
With the TransactionManager now supporting creating a repository in a transaction, let's enable the repository creating RPCs to run transactionally. Some tests needed minor adjustments as they assert storage details that change with transactions.
2023-10-23localrepo: Quarantine flaky `TestRepo_FetchInternal` testJustin Tobler
The `TestRepo_FetchInternal/nonexistent_revision` test is flaky and causing consistent pipeline failures. Quarantine the test until a proper fix can be implemented.
2023-10-23featureflag: Default enable `ReplicateRepositoryObjectPool`Justin Tobler
The `ReplicateRepositoryObjectPool` feature flag enables object pool replication via the `ReplicateRepository` RPC when the client sets the `ReplicateObjectDeduplicationNetworkMembership` option in the request. Set this feature flag to be enabled by default.
2023-10-23Merge branch 'smh-add-cgroup-directly' into 'master'Will Chandler
Start commands directly in correct cgroups See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6470 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Will Chandler <wchandler@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2023-10-23Start commands directly in correct cgroupsSami Hiltunen
Gitaly is currently first launching commands, and then adding them to the correct cgroup. This has the downside that the commands get to execute without the appropriate limits being applied for some time before Gitaly manages to configure the Cgroup. This commit changes Gitaly to launch commands directly in the correct cgroup. This gets rid of the brief window with incorrect limits, and should also be more efficient than moving processes between cgroups. The fix only applies when using cgroups version 2 with Linux 5.7 or later. Changelog: fixed
2023-10-23Expose a method to configure a command directly into a cgroupSami Hiltunen
This commit exposes a method from the cgroup manager to configure a command directly into a cgroup. This is done by configuring the cgroup in the SysProcAttr so the command gets spawned directly in the cgroup. The functionality is only available with cgroups version 2 and kernel version 5.7 or later.
2023-10-23Add tools for detecting kernel versionSami Hiltunen
This commit adds a utility function for detecting whether the running kernel is at least at given version. This can be used to determine whether functionality in some later kernels can be used safely by Gitaly. Version detection is for now only implemented for Linux as we don't have use cases elsewhere yet.
2023-10-23Merge branch 'smh-fix-resolving-error-test' into 'master'Will Chandler
Remove name resolving error test See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6488 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2023-10-23Remove name resolving error testSami Hiltunen
We have a test asserting a specific error is returned when attempting to resolve a non-existent name. The 'not-existing.com' address used in the test has since been registered and no longer results in a resolving error. Remove the test to have the pipeline pass. We're probably fine even if we don't test for this specific case.
2023-10-20proto: Add documentation for `ConflictsService`Justin Tobler
Some of the protobuf message types in the `ConflictsService` lack documentation. Add the missing documentation.
2023-10-20Update changelog for 16.5.0GitLab Release Tools Bot
[ci skip]
2023-10-20Merge branch 'jt-atomic-fetch-remote' into 'master'Quang-Minh Nguyen
repository: Update references atomically in `FetchRemote` See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6432 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: Justin Tobler <jtobler@gitlab.com>
2023-10-20Merge branch 'smh-fix-broken-create-branch-test' into 'master'Toon Claes
Fix TestUserCreateBranch_successful writing into shared repository See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6485 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2023-10-20Merge branch 'smh-fix-broken-test' into 'master'Toon Claes
Fix broken test performing concurrent writes to shared repo See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6483 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2023-10-20Merge branch 'jliu-server-side-incremental-backups' into 'master'Quang-Minh Nguyen
backup: Add support for incremental server-side backups See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6475 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: James Liu <jliu@gitlab.com>
2023-10-20Merge branch 'manifest_default_branch' into 'master'Toon Claes
Set default branch from manifest on restore See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6482 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Co-authored-by: James Fargher <jfargher@gitlab.com>
2023-10-20backup: Support incremental server-side backupsJames Liu
Incremental backups are currently supported only for client-side repository backups, i.e. if the `REPOSITORIES_SERVER_SIDE=true` env var is not set when running the gitlab:backup:create Rake task. This is because we're not providing this flag in the request to the BackupRepository RPC. This commit: - Modifies the BackupRepositoryRequest message to include an `incremental` flag and update the surrounding documentation. - Threads the `incremental` flag through the gRPC request and into the backup manager on the other end. - Updates some of the tests to exercise the flag. Changelog: added
2023-10-20test: Use table tests in `gitaly-backup create`James Liu
The majority of setup, assertion, and teardown logic for the two tests for the `gitaly-backup create` command are shared. Refactor the two separate test functions into a single function utilising table tests, since we'll be adding additional tests soon.
2023-10-19backup: Convert manifest restore tests to run on sha256James Fargher
Since backup manifest files explicitly setup the object format to use, these tests can be enabled for sha256 testing. The other cases will be converted to sha256 when the pointer and legacy layouts are replaced.
2023-10-19backup: Use subtest testing.T in test setupJames Fargher
The setup functions here were sporadically using t instead of tb. The t in scope here is from the parent test which means assertions and skipping would apply to the wrong test.
2023-10-19Fix concurrent writes in TestUserCreateBranch_startPointSami Hiltunen
TestUserCreateBranch_startPoint is sharing a test repository between multiple subtests and writing concurrently into the repository from both subtests. Transactions expect the TransactionManager to be the only writer to the repository, and concurrent writes may cause flakes in the tests. Set up a clean repository for each subtest.
2023-10-19Fix TestUserCreateBranch_successful writing into shared repositorySami Hiltunen
TestUserCreateBranch_successful is setting up a shared repository in the tests. It then proceeds to concurrently write to the shared repository in the subtests. This leads to indeterministic results as the branch may or may not be already created by one of the other subtests. Fix this by running each of the tests agains their own repository. As all tests are now running agains their own repositories, we know longer need to delete the created branch at the end of the test.
2023-10-19repository: Update references atomically in `FetchRemote`Justin Tobler
The `FetchRemote` RPC fetches a set of refspecs from a remote repository into a target repository. To be atomic, reference updates should only be performed if transaction quorum is achieved with participating repository replicas. Furthermore, when a subset of references diverge, partial reference updates should be applied. To accommodate this, the `FetchRemote` RPC now supports quarantining fetched objects and now performs a reference-transaction only on updated references.
2023-10-19repository: Split out `FetchRemote` transactionsJustin Tobler
In a future change, the `FetchRemote` RPC will introduce atomic reference updates behind a feature flag. Split out current transaction logic into a separate function to make swapping implementations easier.
2023-10-19localrepo: Support porcelain fetch optionJustin Tobler
When performing `git-fetch(1)` with the `porcelain` option, references are printed to stdout in an easy-to-parse format. This change introduces a `localrepo.FetchRemote()` configuration to enabled `porcelain` output.
2023-10-19localrepo: Support dry-run fetch optionJustin Tobler
When performing `git-fetch(1)` with the `dry-run` option, reference updates are not performed. In a future commit, reference updates need to be captured without committing the changes. This change introduces a configuration to `localrepo.FetchRemote()` to enable dry-runs.
2023-10-19localrepo: Support stdout configuration for `FetchRemote`Justin Tobler
In a future commit, updated references need to be extracted from `git-fetch(1)` output performed during `FetchRemote`. This change introduces configuration to `localrepo.FetchRemote()` to configure stdout.
2023-10-19git: Add scanner for porcelain fetch outputJustin Tobler
When `git-fetch(1)` is executed with the `porcelain` option, reference updates are printed to stdout in an easy-to-parse format. This change introduces a scanner to parse this output for reference information.
2023-10-19Merge branch 'smh-transaction-middleware' into 'master'Sami Hiltunen
Introduce transaction managing middleware See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6458 Merged-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>
2023-10-19Fix broken test performing concurrent writes to shared repoSami Hiltunen
TestUserRebaseToRef_failure is sharing a test repository between the subtests. The subtests are ran concurrently. Each of the subtests are resetting the valid target ref on beginning. As the tests are ran concurrently, they're all modifying the repository concurrently. This won't work anymore with transactions enabled and will cause flakes. As none of the tests should modify the repository, stop resetting the target ref at the beginning of each test. If one of the tests fails and modifies the ref, the other subtests could fail as well. This can be improved later by actually setting up independent test state for each of the tests. For now, fix the flake.
2023-10-19Merge branch 'smh-log-repository-creations' into 'master'Sami Hiltunen
Write-ahead log repository creations See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6435 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com>
2023-10-19Merge branch 'renovate/github.com-go-enry-go-enry-v2-2.x' into 'master'Quang-Minh Nguyen
go: Update module github.com/go-enry/go-enry/v2 to v2.8.6 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6430 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2023-10-19backup: Only use the manifest default branch if availableJames Fargher
Previously backups would try and guess what to set HEAD to based off of the bundle file. If the manifest file has the default branch to use, then we no longer have to guess. In that case turn off the guessing logic.
2023-10-19backup: Set default branch from manifest on restoreJames Fargher
Adds a test for the worst case scenario where the backup was of an empty repository. In this case there is no bundle file to derive the default branch. Eventually manifest files will have blank paths to indicate, for example, that there is no bundle or no hooks. Until then the code expects that all paths will be set, even if the destination file does not exist. Changelog: changed