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-03-07test minimum required git versionpks-ci-bundled-gitPatrick Steinhardt
2022-03-07only test bundled git by defaultPatrick Steinhardt
stops installing git as well, so needs test-boot change
2022-03-07invalidate caches on ci changePatrick Steinhardt
2022-03-07test-boot bundled gitPatrick Steinhardt
2022-03-04Merge branch 'smh-fix-rails-tests-repository-replicas' into 'master'Patrick Steinhardt
Rewrite relative path in RepositoryReplicas conditionally See merge request gitlab-org/gitaly!4390
2022-03-04Rewrite relative path in RepositoryReplicas conditionallySami Hiltunen
Rails is failing on RepositoryReplicas tests as it now checks the replica path. However, the Rails tests do not configure a database so Praefect can't get the replica path from there. It's not possible to mock out the function with the interface provided either. To fix the problem, this commit adds a config check which enables the relative path rewriting only if repository-specific primaries are enabled, which also indicates that a database must be configured.
2022-03-04Merge branch 'ashmckenzie/bump-danger-gem' into 'master'Patrick Steinhardt
Bump danger to 8.4.4 See merge request gitlab-org/gitaly!4388
2022-03-04Bump danger to 8.4.4Ash McKenzie
2022-03-03Merge branch 'smh-repository-replicas-rewriting' into 'master'Patrick Steinhardt
Rewrite relative path in RepositoryReplicas See merge request gitlab-org/gitaly!4384
2022-03-03Merge branch 'pks-git-v2.35.1.gl0' into 'master'Sami Hiltunen
git: Add support for bundled Git v2.35.1.gl0 Closes #4067 and #4068 See merge request gitlab-org/gitaly!4352
2022-03-02Rewrite relative path in RepositoryReplicassmh-repository-replicas-rewritingSami Hiltunen
RepositoryReplicas RPC is currently not accounting for relative path rewriting when sending the CalculateChecksum RPCs. This causes it to fail when Praefect generates unique paths for the repositories. This commit fixes the issue by sending the requests to the Gitalys with the appropriate replica paths.
2022-03-02Create repository through the API in RepositoryReplicas testSami Hiltunen
Praefect's test for RepositoryReplicas is not creating the repository through the API. As such, it doesn't exercise the relative path rewriting code and doesn't catch problems there. The QA tests caught the fact that RepositoryReplicas is not doing relative path rewriting yet. This commit updates the test first to create the repository through the API and to account for the relative path rewriting when creating a test commit in one of the replicas.
2022-03-02Update VERSION filesv14.9.0-rc2GitLab Release Tools Bot
[ci skip]
2022-03-02Merge branch 'smh-ref-transaction-service-intercepted' into 'master'Patrick Steinhardt
Mark RefTransactionService as handled by Praefect See merge request gitlab-org/gitaly!4383
2022-03-02Mark RefTransactionService as handled by PraefectSami Hiltunen
This commit marks the RefTransactionService with the intercepted option to denote it is handled by Praefect. Such services do not need operation type annotations on the RPCs as they do not go through the proxy. This should have no behavioral changes and mostly just cleans up the code a bit.
2022-03-02git: Support bundled Git v2.35.1.gl1pks-git-v2.35.1.gl0Patrick Steinhardt
We now have support in place for different bundled Git execution environments, and a preceding commit has already started to build and install bundled Git v2.35.1.gl1. Add support for this new bundled Git execution environment behind a feature flag. Changelog: added
2022-03-02Makefile: Install Git v2.35.1 as part of bundled GitPatrick Steinhardt
We're currently still stuck with Git v2.33.1.gl2 because we haven't yet been able to roll out bundled Git to production, and we do want to make use of feature flags to switch to newly introduced Git versions. Bundled Git should soon be landing in production though, so this commit starts to build and install Git v2.35.1.gl1 such that we're prepared to quickly roll out bundled Git and then the new Git version. Note that this also backports two patch series from the upcoming Git v2.36.0 release: - Patches 21-26 fix an issue with the files refs backend, which would execute the reference-transaction hook for references that were about to be deleted twice: once for the loose ref itself, and once for the packed backend. This is a performance issue, but also required us to have a workaround that filters out any reference transactions which only consisted of deletes. - Patches 27-34 fix the `--atomic` flag of git-fetch(1) to also cover deletion of references and backfilling of tags. This has caused excessive voting via reference transactions in production because the reference-transaction hook was executed twice for each reference modified via those mechanisms. It is thus a correctness fix because we don't commit changes to disk anymore if any of the other ref updates fails, and a performance fix for mirror fetches because we perform less voting.
2022-03-02Makefile: Allow for multiple different Git source directoriesPatrick Steinhardt
We are about to introduce the ability to build multiple different Git versions, and this will require us to also have multiple different source directories. This commit prepares for this by converting our current targets which build Git into pattern-based targets such that it is easily possible to use multiple different directories. Note that this commit also changes the default source directory of the current default "_build/deps/git" one to "_build/deps/git-v2.33.1.gl2". The build directory shouldn't be accessed by any callers, so this is not expected to be much of a problem. What is accessed though is the default installation directory for Git, which is "_build/deps/git/install". This location is thus retained to not break compatibility. The downside is that we'll now have to download multiple copies of the Git repository. On the other hand, we now don't have to rebuild Git whenever we change between different branches which use different Git versions because the source directories would ideally not be modified anymore.
2022-03-02Makefile: Derive Git source directory via implicit variablesPatrick Steinhardt
We're about to remove references to `GIT_SOURCE_DIR` because there will soon be multiple different source directories, where we have one per Git version we're building. Prepare for this by converting recipes to derive the location via automatic Makefile variables.
2022-03-02Makefile: Merge setup of Git version and its patchesPatrick Steinhardt
We have split up computation of the Git version and its patches into two different sites, even though we only ever use patches in case the user didn't pass a Git version or explicitly asked us for the "default" Git version. This needlessly complicates the setup by requiring another variable which tells us whether we have to apply patches or not. Merge both sites into one to simplify the code.
2022-03-02Makefile: Test variables dynamically to make targets reusablePatrick Steinhardt
When building Git we define both the GIT_PATCHES and GIT_EXTRA_VERSION variables to influence the way Git is built. This is currently done via `ifdef` conditionals, which are notably evaluated at the time of parsing the Makefile. As a consequence, even if their values change at a later point, we'll already have stripped or retained the code snippets they're guarding because they won't be reevaluated. This is not an issue currently, but it is going to be an issue when we ruse the target to build multiple different Git versions. Prepare for this by dynamically testing whether those variables are set or not as part of the recipe itself.
2022-03-02Merge branch 'pks-ruby-drop-unused-code' into 'master'James Fargher
ruby: Drop more unused code See merge request gitlab-org/gitaly!4380
2022-03-02Merge branch 'fj-add-load-content-param-to-wiki-find-page' into 'master'John Cai
Add skip_content param to wiki find page call See merge request gitlab-org/gitaly!4373
2022-03-02Add skip_content param to wiki find page callFrancisco Javier López
2022-03-02Merge branch 'pks-refs-unlock-symref-on-failed-update' into 'master'John Cai
localrepo: Unlock symbolic refs when the update fails Closes #4075 See merge request gitlab-org/gitaly!4379
2022-03-01Update changelog for 14.6.6GitLab Release Tools Bot
[ci skip]
2022-03-01Merge branch 'pks-git-execution-environment-constructors' into 'master'Toon Claes
git: Prepare for multiple bundled Git versions See merge request gitlab-org/gitaly!4372
2022-03-01Update VERSION filesv14.9.0-rc1GitLab Release Tools Bot
[ci skip]
2022-03-01Merge branch 'pks-user-squash-structured-errors-proto' into 'master'Sami Hiltunen
proto: Add structured error types for UserSquash RPC See merge request gitlab-org/gitaly!4381
2022-03-01proto: Add structured error types for UserSquash RPCPatrick Steinhardt
We're about to introduce support for structured errors in the UserSquash RPC. We cannot roll out this change even with a feature flag though because some of our testing infrastructure will always test code with all feature flags enabled. We thus have to land the protobuf changes independently such that we can adjust downstream callers. This commit introduces these changes by creating a new UserSquashError Protobuf message which contains all potential structured errors we want to return from the UserSquash RPC. Changelog: added
2022-03-01operations: Document the UserSquash implementationPatrick Steinhardt
Add a short documentation snippet to UserSquash so that we can get rid of the previous linting exception.
2022-03-01operations: Remove deprecated `squash_id` from UserSquash RPCPatrick Steinhardt
Originally when UserSquash was still using worktrees to do its work, we used a squash ID which enabled us to reuse worktrees. We have since converted the RPC to do the rebase in-memory though, which allowed us to get rid of the use of worktrees and thus make the squash ID obsolete. It was thus deprecated in 112d74720 (operations: Deprecate `SquashId`, 2021-08-20), and callsites in Rails have been converted in fc5b05874f9 (gitaly_client: Drop use of squash ID, 2021-09-21). There aren't any other callsites left. Remove the `squash_id` altogether. Changelog: removed
2022-03-01ruby: Drop more unused codePatrick Steinhardt
This commit drops more code that is not being used anymore in the Gitaly side car.
2022-03-01localrepo: Unlock symbolic refs when the update failsPatrick Steinhardt
We use a `safe.LockingFileWriter` to get transactional semantics when updating symbolic references. This mechanism will create a lock for the file that is about to be updated, votes on the contents of the file and then finally unlocks it if everything went alright. In case something goes wrong though the caller must make sure to close the writer, or otherwise we may leak the lockfile and thus also obstruct all subsequent writes to that symbolic reference. We don't do this correctly though. Fix this bug by always unlocking the locking file writer. Changelog: fixed
2022-03-01localrepo: Add test to demonstrate failure to unlock symrefsPatrick Steinhardt
We have recently added transactional support for writing symbolic references in a repository via the `safe.LockingFileWriter` interface. We forgot to unlock the writer in all cases though, which means that in some error conditions we may leave behind a lockfile. Add a testcase which demonstrates this failure to unlock.
2022-03-01git: Verify that bundled Git binaries exist and are executablePatrick Steinhardt
We do not verify that all expected bundled Git binaries exist and are executable when they have been configured by the administrator. As a result, Gitaly will happly start up but then later fail at runtime when trying to use the bundled Git execution environment in case any of the binaries is missing. Tighten our sanity checks to verify that the bundled Git environment is set up correctly. Changelog: fixed
2022-03-01git: Reject config with bundled Git and missing binary directoriesPatrick Steinhardt
When bundled Git is configured then the binaries are expected to be contained in Gitaly's binary directory. It is thus mandatory for the directory to be set, or else the resulting execution environment cannot actually be a valid one. And while we already reject the case where the binary directory is unset in case the `GITALY_TESTING_BUNDLED_GIT_PATH` environment variable is set, we don't have such a test for "normal" setups. Add the missing sanify check. Changelog: fixed
2022-03-01git: Prepare tests for multiple bundled Git versionsPatrick Steinhardt
We're about to introduce another bundled Git version. Prepare tests which exercise the execution environments to cope with this change.
2022-03-01git: Support version suffixes for bundled Git environmentsPatrick Steinhardt
While we only have a single bundled Git environment right now, the plan is to extend support such that we can have multiple bundled environments at the same time which are then feature-flaggable. The different sets of binaries can be distinguished by their version suffix: while the current set of binaries is simply called "gitaly-git" et al, we already have a second version which installs as "gitaly-git-v2.35.1.gl1". Allow bundled Git execution environments to specify version suffixes such that it's easily possible to set up multiple ones.
2022-03-01git: Support version suffixes for bundled Git environmentsPatrick Steinhardt
While we only have a single bundled Git environment right now, the plan is to extend support such that we can have multiple bundled environments at the same time which are then feature-flaggable. The different sets of binaries can be distinguished by their version suffix: while the current set of binaries is simply called "gitaly-git" et al, we already have a second version which installs as "gitaly-git-v2.35.1.gl1". Allow bundled Git execution environments to specify version suffixes such that it's easily possible to set up multiple ones.
2022-03-01git: Track supported execution environments in a single placePatrick Steinhardt
The knowledge about which execution environments exist is distributed across multiple different locations: first we need to set them up, and second we need to make use them depending on whether they have been configured and enabled. This is really fragile and ultimately hard to maintain. We now have the logic to set up the different environments in self contained structures which all have the same interface. It is thus trivial to move this logic into a single place, which is a new array of all supported execution environment constructors. The Git command factory can thus be stripped of all knowledge around which different execution environments exists and only needs to loop through all constructors -- if at least one of them returns a valid environment, then we're good to go. We need to maintain two properties though: - We prioritize the order in which we consult the different environments. If bundled Git is configured, then it should be preferred over distributed Git. And if distributed Git is configured, it should be preferred over the fallback Git environment which was resolved via PATH. - Environments must be feature-flaggable. So even if an environment with a higher priority is available, it may still be disabled which would thus cause us to pick a lower-priority backend. These properties are maintained by encoding the priority of backends via the order in which environment constructors are inside their array. The Git command factory thus constructs all environments in the order they are listed in and will then loop through them. The first backend that is enabled (that is, all its feature flags are turned on) will be picked. Like this, it is trivial to add new execution environments as they are all tracked in a single central location.
2022-03-01git: Move cleanup into execution environmentsPatrick Steinhardt
We return a cleanup function whenever we construct Git execution environments. Move this functionality into the environments themselves to have less state to keep track of. Furthermore, this prepares for a refactoring where we rework the way Git execution environments are constructed in the first place.
2022-03-01git: Create separate constructor for fallback Git environmentsPatrick Steinhardt
Move the logic which creates execution environments for fallback Git into its own structure. This will eventually allow us to have a simple list of all supported Git execution environments in a central location.
2022-03-01git: Create separate constructor for bundled Git environmentsPatrick Steinhardt
Move the logic which creates execution environments for bundled Git into its own structure. This will eventually allow us to have a simple list of all supported Git execution environments in a central location.
2022-03-01git: Create separate constructor for distributed Git environmentsPatrick Steinhardt
Move the logic which creates execution environments for distributed Git into its own structure. This will eventually allow us to have a simple list of all supported Git execution environments in a central location.
2022-03-01praefect: Pass feature flags to Gitaly when executing ServerInfoPatrick Steinhardt
When Praefect receives a ServerInfo RPC it forwards the request to proxied Gitaly nodes to obtain their information and then pass it through back to the caller. We do not forward the RPC metadata correctly though, and as a result any feature flags passed to Praefect will not end up with Gitaly. Fix this by converting the incoming to an outgoing context before doing the RPC calls to Gitaly. Changelog: fixed
2022-02-28Merge branch 'pks-ff-remove-fetch-internal-with-sidechannel' into 'master'Sami Hiltunen
localrepo: Remove flag to switch to sidechannels for internal fetches Closes #4065 See merge request gitlab-org/gitaly!4375
2022-02-28Merge branch 'pks-ff-enable-bundled-git' into 'master'Toon Claes
git: Enable use of bundled Git by default See merge request gitlab-org/gitaly!4376
2022-02-28Merge branch 'brodock/gitaly-clone-improvements' into 'master'Christian Couder
Enable CloneRepositoryFromURL to authenticate with custom token See merge request gitlab-org/gitaly!4239
2022-02-28Merge branch 'pks-git-fetch-dont-recurse-submodules' into 'master'John Cai
git: Skip checks whether a fetch is updating submodules Closes #4071 See merge request gitlab-org/gitaly!4371