Age | Commit message (Collapse) | Author |
|
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
|
|
Added json output for gitaly-backup
Closes #3988
See merge request gitlab-org/gitaly!4328
|
|
Disable metadata creation hack in remote service tests
See merge request gitlab-org/gitaly!4283
|
|
locator: Move Git-specific knowledge into localrepo interface
See merge request gitlab-org/gitaly!4324
|
|
Update changelog entries
See merge request gitlab-org/gitaly!4326
|
|
|
|
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.
|
|
Convert Gitaly servicse to retrieve repository paths via the localrepo
interface.
|
|
Convert the objectpool package to retrieve repository paths via the
localrepo interface.
|
|
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.
|
|
Changelog: added
|
|
replicator: Log number of stale jobs deleted
See merge request gitlab-org/gitaly!4317
|
|
maintenance: Refactor code to be more easily testable
See merge request gitlab-org/gitaly!4322
|
|
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
|
|
setupRemoteService is currently using a TODO context. This commit
propagates the test context down from the tests to the setup helper.
|
|
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.
|
|
Disable metadata creation hack in blob service tests
See merge request gitlab-org/gitaly!4301
|
|
Disable metadata creation hack in wiki service tests
See merge request gitlab-org/gitaly!4315
|
|
Disable metadata creation hack in cleanup service tests
See merge request gitlab-org/gitaly!4288
|
|
Disable metadata creation hack in ssh service tests
See merge request gitlab-org/gitaly!4314
|
|
Disable metadata creation hack in smarthttp service tests
See merge request gitlab-org/gitaly!4313
|
|
Disable metadata creation hack in diff service tests
See merge request gitlab-org/gitaly!4304
|
|
Makefile: Use pkg-config if available to set LIBPCREDIR
See merge request gitlab-org/gitaly!4321
|
|
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.
|
|
`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.
|
|
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.
|
|
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
|
|
Disable Praefect in hook service tests
See merge request gitlab-org/gitaly!4319
|
|
|
|
[ci skip]
|
|
[ci skip]
|
|
[ci skip]
|
|
Disable metadata creation hack in commit service tests
See merge request gitlab-org/gitaly!4307
|
|
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.
|
|
setupHookService helper is currently using a TODO context. This commit
propagates the test context down from the tests to the setup helper.
|
|
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.
|
|
setupWikiRepo helper is currently using a TODO context. This commit
propagates the test context down from the tests to the setup helper.
|
|
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.
|
|
Disable metadata creation hack in repository service tests
See merge request gitlab-org/gitaly!4275
|
|
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.
|
|
setupRepositoryService is currently using a TODO context. This commit
propagates the test context down from the tests to the setup helper.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|