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-02-08Send `git fetch` details in FetchRemote responsesh-return-status-fetch-remoteStan Hu
When issuing a FetchRemote RPC during a project import, the RPC fails if tags need to be updated unless the force option is specified. It would be helpful to the caller to be able to know which tags actually needed to be updated. This commit adds a new protobuf option, `send_fetch_status`, that will send back a structured response to the caller if requested. Relates to https://gitlab.com/gitlab-org/gitaly/-/issues/4033 Changelog: added
2022-02-07Merge branch 'gitaly-backup-json' into 'master'Pavlo Strokov
Added json output for gitaly-backup Closes #3988 See merge request gitlab-org/gitaly!4328
2022-02-07Merge branch 'smh-create-repo-remote' into 'master'Sami Hiltunen
Disable metadata creation hack in remote service tests See merge request gitlab-org/gitaly!4283
2022-02-07Merge branch 'pks-locator-move-git-knowledge-into-localrepo' into 'master'Sami Hiltunen
locator: Move Git-specific knowledge into localrepo interface See merge request gitlab-org/gitaly!4324
2022-02-07Merge branch 'update-changelog-entries' into 'master'Toon Claes
Update changelog entries See merge request gitlab-org/gitaly!4326
2022-02-07Update changelog entriesMayra Cabrera
2022-02-07storage: Remove Git-specific knowledge from the locator interfacePatrick Steinhardt
The `storage.Locator` interface provides functions to locate specific Git data structures in a repository. This knowledge is specific to Git though and doesn't have anything to do with what the locator should do, which is to provide information about Gitaly-specific locations. Move this Git-specific knowledge into the localrepo package and remove those functions from the interface.
2022-02-07gitaly: Get repository paths via localrepo interfacePatrick Steinhardt
Convert Gitaly servicse to retrieve repository paths via the localrepo interface.
2022-02-07objectpool: Get repository paths via localrepo interfacePatrick Steinhardt
Convert the objectpool package to retrieve repository paths via the localrepo interface.
2022-02-07localrepo: Introduce new functions to get repository pathsPatrick Steinhardt
The `storage.Locator` interface hosts some of the functions which allow us to locate specific items in a Git repository. Ultimately, this logic is Git-specific and shouldn't be hosted in the locator at all. Prepare for moving it out of the locator interface by providing those functions via the localrepo package, as well.
2022-02-06Added json output for gitaly-backupShubham Kumar
Changelog: added
2022-02-04Merge branch 'wc-log-stale' into 'master'Toon Claes
replicator: Log number of stale jobs deleted See merge request gitlab-org/gitaly!4317
2022-02-04Merge branch 'pks-git-maintenance-refactorings' into 'master'Toon Claes
maintenance: Refactor code to be more easily testable See merge request gitlab-org/gitaly!4322
2022-02-04replicator: Log number of stale jobs deletedWill Chandler
Currently there is no indication for how many stale jobs have been deleted by `AcknowledgeStale()`. Understanding when this is happening may be useful in diagnosing performance problems with Praefect's replication queue. Let's log how many jobs are being removed to make this more visible to admins. Changelog: changed
2022-02-04Propagate test context to setup helpers in remote packageSami Hiltunen
setupRemoteService is currently using a TODO context. This commit propagates the test context down from the tests to the setup helper.
2022-02-04Disable metadata creation hack in remote service testsSami Hiltunen
This commit amends the remote service's tests to not rely on Praefect's metadata force creation hack. The hack creates metadata for repositories when Praefect first sees a request for the repository. This has potential to hide problems in tests and doesn't match the production scenario. To prepare for removing the hack entirely, this commit refactors the tests to create the test repositories through the API rather than placing them directly in the storage. RepositoryService is now set up and registered in the test setup as it's the service that is responsible for repository creations. Some tests were updated to use the common setup helper to reduce cruft and to create the repository through the API. Creating the repository through the API doesn't set a remote, so TestFindRemoteRootRefSuccess was updated to just use the repository's path directly.
2022-02-04Merge branch 'smh-create-repo-blob' into 'master'Sami Hiltunen
Disable metadata creation hack in blob service tests See merge request gitlab-org/gitaly!4301
2022-02-04Merge branch 'smh-create-repo-wiki' into 'master'Sami Hiltunen
Disable metadata creation hack in wiki service tests See merge request gitlab-org/gitaly!4315
2022-02-04Merge branch 'smh-create-repo-cleanup' into 'master'Sami Hiltunen
Disable metadata creation hack in cleanup service tests See merge request gitlab-org/gitaly!4288
2022-02-04Merge branch 'smh-create-repo-ssh' into 'master'Toon Claes
Disable metadata creation hack in ssh service tests See merge request gitlab-org/gitaly!4314
2022-02-04Merge branch 'smh-create-repo-smarthttp' into 'master'Toon Claes
Disable metadata creation hack in smarthttp service tests See merge request gitlab-org/gitaly!4313
2022-02-04Merge branch 'smh-create-repo-diff' into 'master'Sami Hiltunen
Disable metadata creation hack in diff service tests See merge request gitlab-org/gitaly!4304
2022-02-04Merge branch 'sh-pkg-config-pcre2' into 'master'Patrick Steinhardt
Makefile: Use pkg-config if available to set LIBPCREDIR See merge request gitlab-org/gitaly!4321
2022-02-04repository: Make maintenance functions more testablePatrick Steinhardt
We're about to extend `OptimizeRepository()` to handle all of the repository's maintenance jobs. It's thus about to become more complex, which makes it hard to test whether it works alright. This is further complicated by the fact that most of the maintenance functions we have right now are receiver functions, which makes them harder to test on their own, as well. Refactor the maintenance functions to not be receivers anymore. Most of them really only required access to a Git command factory to be able to execute Git commands, and this is trivially to fix by just using ourj `localrepo.Repo` abstraction instead.
2022-02-04git/stats: Convert LogObjectsInfo to accept a repo executorPatrick Steinhardt
`LogObjectsInfo()` accepts both a repository and Git command factory as input. Convert it to instead accept a `git.RepositoryExecutor` such that callers don't need to have a command factory around.
2022-02-04objectpool: Expose repository to outside callersPatrick Steinhardt
While the objectpool.Pool structure internally uses a localrepo.Repo, it's not exposed to outside callers. Expose it as a preparatory step to convert `stats.LogObjectsInfo()` to not accept a Git command factory anymore.
2022-02-04Makefile: Use pkg-config if available to set LIBPCREDIRStan Hu
In platforms such as the Apple Silicon, `pcre2.h` may not be available in the default compiler path. We use `pkg-config` if it is available to determine the path where `libpcre2-8` lives. Relates to https://gitlab.com/gitlab-org/gitaly/-/issues/4028 Changelog: fixed
2022-02-04Merge branch 'smh-create-repo-hook' into 'master'James Fargher
Disable Praefect in hook service tests See merge request gitlab-org/gitaly!4319
2022-02-04Merge remote-tracking branch 'dev/master'GitLab Release Tools Bot
2022-02-03Update changelog for 14.5.4GitLab Release Tools Bot
[ci skip]
2022-02-03Update changelog for 14.6.4GitLab Release Tools Bot
[ci skip]
2022-02-03Update changelog for 14.7.1GitLab Release Tools Bot
[ci skip]
2022-02-03Merge branch 'smh-create-repo-commit' into 'master'John Cai
Disable metadata creation hack in commit service tests See merge request gitlab-org/gitaly!4307
2022-02-03Disable Praefect in hook service testsSami Hiltunen
HookService is called by gitaly-hooks to execute hook logic. Right now, the tests are ran with Praefect in front of the Gitaly. In production, Praefect never proxies HookService calls as HookService is strictly for Gitaly's internal use. This commit disables Praefect in the tests of HookService.
2022-02-03Propagate test context to setup helpers in hooks packageSami Hiltunen
setupHookService helper is currently using a TODO context. This commit propagates the test context down from the tests to the setup helper.
2022-02-03Create repositories via API in hook service testsSami Hiltunen
Hook service is currently creating repositories using test helpers and not via the API. This commit converts majority of the tests to create the repos through the API so their state matches better how the repos will actually be in production. TestPreReceiveHook_GitlabAPIAccess was not converted to create the repository through the API as it relies on some setup prior to the repository being created.
2022-02-02Propagate test context to setup helpers in wiki packageSami Hiltunen
setupWikiRepo helper is currently using a TODO context. This commit propagates the test context down from the tests to the setup helper.
2022-02-02Disable metadata creation hack in wiki service testsSami Hiltunen
This commit amends the wiki service's tests to not rely on Praefect's metadata force creation hack. The hack creates metadata for repositories when Praefect first sees a request for the repository. This has potential to hide problems in tests and doesn't match the production scenario. To prepare for removing the hack entirely, this commit refactors the tests to create the test repositories through the API rather than placing them directly in the storage.
2022-02-02Merge branch 'smh-create-repo-ext' into 'master'Pavlo Strokov
Disable metadata creation hack in repository service tests See merge request gitlab-org/gitaly!4275
2022-02-02Disable metadata creation hack in ssh service testsSami Hiltunen
This commit amends the ssh service's tests to not rely on Praefect's metadata force creation hack. The hack creates metadata for repositories when Praefect first sees a request for the repository. This has potential to hide problems in tests and doesn't match the production scenario. To prepare for removing the hack entirely, this commit refactors the tests to create the test repositories through the API rather than placing them directly in the storage. Some tests had to be adapted as Praefect is returning different error codes than Gitaly in some cases. The setupSSHClone helper used by some tests was unnecessarily complex as it was doing unnecessary copies of the test repository. It was simplified a bit to make it easier to ensure all repos are created through the API.
2022-02-02Propagate test context to setup helpers in repository packageSami Hiltunen
setupRepositoryService is currently using a TODO context. This commit propagates the test context down from the tests to the setup helper.
2022-02-02Disable metadata force creation in repository service testsSami Hiltunen
This commit disables metadata force creation in repository service tests when it is ran with Praefect. This ensures any problems in Praefect are not hidden by the hack. Disabling the hack surfaces few behavior deviations with differing error messages. The RenameRepository tests do not work with Praefect without the metadata creation hack. This is due to a bug in Praefect where the rename still gets applied even if the Gitalys failed the rename. As this is an existing bug, the test is skipped for now with a link to the tracking issue.
2022-02-02Convert CreateFork test to create repository via APISami Hiltunen
This commits converst CreateFork_successful to create the repository via API. The test has some custom server setup code so this was left in a separate commit for clarity.
2022-02-02Allow passing in a ClientConn to CreateRepositorySami Hiltunen
Some tests perform custom connection setup, for example when TLS is used. To avoid complicating the general case of CreateRepository, this commit adds an option to provide a pre-established ClientConn. This way the test can perform whatever it needs to do to setup a connection and CreateRepository doesn't need to get more complicated.
2022-02-02Create repository via API in FetchRemote testsSami Hiltunen
This commits converts FetchRemote to also create repositories via API. The tests were somewhat simplified by removing a method to copy the test repository and instead initiate another copy of the test repo using the existing helpers. As TestFetchRemote_sshCommand is overriding the git command, it's not possible to create repositories via the API. Thus, the test is skipped when Praefect is enabled.
2022-02-02Update FindLicense test to create repo via APISami Hiltunen
This commit updates the FindLicense's test to create the repository via API. As a special note, the branch had to be changed to main as Gitaly nowadays creates repositories with main as default branch.
2022-02-02Create repositories via API in most repository service testsSami Hiltunen
This commit creates the repositories in tests of repsository service via API. This enables the tests to work with Praefect without the metadata creation hack as Praefect can create the metadata when is proxies the creation calls. The tests converted in this commit are the ones where it was straighforward replacing, the rest will be done in more detailed follow up commits.
2022-02-02Setup test repository via API in repository service testsSami Hiltunen
This commit sets up the test repository via API in repository service tests. This paves the way for disabling the Praefect's metadata creating hack in the tests. TestRemoveRepository_locking was updated to delete the lock after the test so the repository creation helpers can delete the created repository after the test.
2022-02-02Return a copy of the repository from CreateRepositorySami Hiltunen
Some tests modify the repository that is returned from CreateRepository. To allow for the clean up function to still succeed, this commit returns a copy of the repository instead so the clean up still targets the correct repository.
2022-02-02Disable metadata creation hack in smarthttp service testsSami Hiltunen
This commit amends the smarthttp service's tests to not rely on Praefect's metadata force creation hack. The hack creates metadata for repositories when Praefect first sees a request for the repository. This has potential to hide problems in tests and doesn't match the production scenario. To prepare for removing the hack entirely, this commit refactors the tests to create the test repositories through the API rather than placing them directly in the storage. Some tests had to be adapted as Praefect is returning different error codes that Gitaly in some cases.