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-22repository: Use optional auth token for cloningbrodock/gitaly-clone-improvementsGabriel Mazetto
This can be used by Geo to authenticate against a primary node Changelog: changed
2022-02-22repository-service: Add http_authorization_header optional parameterGabriel Mazetto
2022-02-22Merge branch 'pks-log-fix-formatting' into 'master'Sami Hiltunen
log: Fix formatting via gofumpt See merge request gitlab-org/gitaly!4368
2022-02-22log: Fix formatting via gofumptPatrick Steinhardt
Fix formatting in the log package, which is currently not clean based on what gofumpt says.
2022-02-22Merge branch 'pks-git-remove-ruby-hooks' into 'master'James Fargher
git: Remove support for the Ruby hooks directory Closes #4006 See merge request gitlab-org/gitaly!4356
2022-02-22Merge branch 'jf_stop_using_stderr' into 'master'James Fargher
gitaly-git2go: Stop using stderr See merge request gitlab-org/gitaly!4343
2022-02-22gitaly-git2go: Send all errors over gobJames Fargher
Previously stderr was used to send plaintext errors back to the caller. Since we are looking to use stderr for logging, we need to stop sending errors this way. Here we use the universal gob response error field instead. Client side must continue reading errors from both gob and stderr for a release so that we can safely upgrade.
2022-02-22gitaly-git2go: Hoist gob encoding for all sub-commandsJames Fargher
Now that gob is required for all git2go commands we can hoist the initialisation of the gob encoding so that later all errors can be encoded over gob instead of using stderr.
2022-02-22gitaly-git2go: Remove deprecated Error gob fieldJames Fargher
Now that one release has passed we can safely remove the previously deprecated field.
2022-02-21Merge branch 'pks-ssh-receive-pack-with-sidechannel-for-internal-fetches' ↵Sami Hiltunen
into 'master' git: Convert internal fetches to use sidechannel Closes #4042 See merge request gitlab-org/gitaly!4358
2022-02-21Merge branch 'pks-grpc-deprecate-maintenance-rpcs' into 'master'Toon Claes
proto: Deprecate fine-grained repository maintenance RPCs See merge request gitlab-org/gitaly!4362
2022-02-21Update changelog for 14.8.0GitLab Release Tools Bot
[ci skip]
2022-02-21Merge branch 'create_bundle_from_missing_ref' into 'master'Pavlo Strokov
repository: Ignore missing refs in CreateBundleFromRefList Closes #4000 See merge request gitlab-org/gitaly!4364
2022-02-21Merge branch 'pks-gitaly-fix-unset-housekeeping-manager' into 'master'Patrick Steinhardt
gitaly: Fix missing housekeeping manager dependency See merge request gitlab-org/gitaly!4365
2022-02-21Merge branch 'pks-git-pack-configuration' into 'master'Pavlo Strokov
git: Simplify setup of pack-generation configuration See merge request gitlab-org/gitaly!4361
2022-02-21Merge branch 'pks-operation-enable-user-merge-branch-structured-errors' into ↵Pavlo Strokov
'master' operations: Enable use of detailed errors for UserMergeBranch Closes #3757 See merge request gitlab-org/gitaly!4357
2022-02-21gitaly: Fix missing housekeeping manager dependencyPatrick Steinhardt
While we set up the housekeeping manager when starting Gitaly, we don't inject it into the service dependencies. As a result, Gitaly will not have it set up during normal runtime operations and will thus trigger a panic whenever trying to access it. This went unnoticed because our test setup for the Gitaly server is different from the setup we use when running tests. Fix this bug by injecting the housekeeping manager as expected Changelog: fixed
2022-02-21Merge branch 'pks-git-maintenance-decouple-from-server' into 'master'Patrick Steinhardt
housekeeping: Create central stateful architecture which handles repository optimizations See merge request gitlab-org/gitaly!4348
2022-02-21repository: Ignore missing refs in CreateBundleFromRefListJames Fargher
This RPC is used to create backup bundles. The list of refs passed in is collected by a call to ListRefs. If a ref is deleted between these two calls then the `git bundle create` call made by CreateBundleFromRefList would fail with an error. We are not interested in missing refs for backups because there will be no need to restore a now deleted ref. However, ignoring missing refs will mean that the list of refs saved for incremental backups will be out-of-date compared to the bundle. There should be no problem creating incremental backups because we only need the object ID that the ref used to be pointed at. So the ref names would only be used to detect ref deletions from the previous backup on restore (https://gitlab.com/gitlab-org/gitaly/-/issues/3857), any extra refs in the ref list can simply be ignored. Changelog: fixed
2022-02-18Merge branch 'sh-disable-health-check-logging-default' into 'master'John Cai
log: Disable gRPC HealthCheck message logging Closes #3428 See merge request gitlab-org/gitaly!4363
2022-02-18Merge branch 'support_rqst_issue_tempalte' into 'master'Sami Hiltunen
Create support request issue template See merge request gitlab-org/gitaly!3836
2022-02-18log: Disable gRPC HealthCheck message loggingStan Hu
gRPC HealthCheck messages are quite noisy, dominate the log volume in Gitaly, and usually are not that useful. We now disable them by default and add documentation on how to enable them. Closes https://gitlab.com/gitlab-org/gitaly/-/issues/3428 Changelog: changed
2022-02-18Update per review findingsSami Hiltunen
2022-02-17proto: Deprecate fine-grained repository maintenance RPCsPatrick Steinhardt
Historically we had and still have lots of fine-grained RPCs which perform repository maintenance in Gitaly. This meant that control of how repositories are packed does not reside in Gitaly though, and this is starting to become a bigger problem because we cannot easily iterate on how repositories should be maintained. We have thus recently extended the black-box-style maintenance RPC OptimizeRepository with the intent of making it the single source of truth for how repositories are packed. Deprecate the old fine-grained repository maintenance RPCs. They will be removed as soon as all callers have been migrated to OptimizeRepository, which will then allow us to improve the general repository maintenance strategy. Changelog: deprecated
2022-02-17proto: Document behaviour of the OptimizeRepository RPCPatrick Steinhardt
Document behaviour of the OptimizeRepository RPC call.
2022-02-17proto: Fix typo in documentation of PruneUnreachableObjectsPatrick Steinhardt
Fix typo in the documentation of the PruneUnreachableObjects RPC definition.
2022-02-17git: Simplify setup of pack-generation configurationPatrick Steinhardt
We use a flag to tag all Git commands which may potentially generate a packfile, where this information is then used to inject specific config into these commands which changes the way the packfiles are generated. This is needlessly roundabout: we can just append this configuration to the per-command options. Convert the code to do this to make it easier to understand.
2022-02-17Merge branch 'toon-replication-cleanup-queue-again-again' into 'master'Sami Hiltunen
datastore: Clean completed & dead replication jobs Closes #3665 See merge request gitlab-org/gitaly!4353
2022-02-17housekeeping: Increase observability of repository optimizationsPatrick Steinhardt
It is currently hard to observe which optimizations were executed for repositories and how long they typically take. This commit introduces two new metrics to better track this information, which also allows us to easily write tests for OptimizeRepository.
2022-02-17Merge branch 'pks-git-fetch-optim-with-commit-graph' into 'master'John Cai
git: Backport patches to speed up git-fetch(1) in repos with many refs Closes #4050 See merge request gitlab-org/gitaly!4355
2022-02-16git: Convert internal fetches to use sidechannelPatrick Steinhardt
With commit b5722938b (Merge branch 'jv-ssh-sidechannel-2' into 'master', 2022-01-18) we have introduced a new RPC which allows us to serve SSH-based fetches with a sidechannel. Instead of using gRPC as a means for communicating between client and server we instead use a simple protocol based on pktlines, which allows us to avoid the overhead introduced by gRPC message serialization and deserialization. For now, use of the sidechannel is only enabled for external clients which come in via gitlab-shell. This commit adds the necessary infra to also use the sidechannel for internal fetches, which most importantly includes the RPCs ReplicateRepository, FetchSourceBranch and a subset of RPCs in the OperationService which know to fetch from a remote repository. The new code is guarded by a feature flag. Changelog: performance
2022-02-16doc: Update hooks to reflect removal of Ruby hook directoryPatrick Steinhardt
The Ruby hooks directory does not exist anymore, and instead we're using symlinks to the gitaly-hooks binary. Update our documentation to reflect that change.
2022-02-16cmd/gitaly-hooks: Remove compatibility code to resolve hook namesPatrick Steinhardt
When we introduced the hook symlinks which directly point to the gitaly-hooks binary we also had to adapt gitaly-hooks such that it can continue to resolve the hook name it ought to execute. Previously, this name was derived via the first argument, which was passed to us via a wrapper script. This was not possible anymore though given that there is no wrapper script anymore. Instead, gitaly-hooks gained support for resolving the hook name via its zeroth argument, which is the name of the symlink we're executing and thus contains the hook name, as well. We had to retain backwards-compatibility with the old way of resolving the hook name though to not break hook executions during zero-downtime upgrades. Now that the old code is gone though we do not need the compatibility code anymore, so this commit removes it.
2022-02-16git: Stop injecting GITALY_BIN_DIR environment variablePatrick Steinhardt
The GITALY_BIN_DIR environment variable was used to derive the location of the gitaly-hooks executable when we were still using the Ruby wrapper scripts. We now exclusively use symlinks for this though, and thus the variable is not used anymore. Stop injecting the GITALY_BIN_DIR environment variable.
2022-02-16git: Remove support for the Ruby hooks directoryPatrick Steinhardt
Historically, our Git hooks were located in the Ruby directory as a set of wrapper scripts which derive the actual location of the gitaly-hooks binary via the `GITALY_BIN_DIR` environment variable. This has been replaced with a new mode though, where we instead create a temporary directory which contains symlinks for all of the hooks which directly point to gitaly-hooks. This is done both to remove the indirection via another shell script, and more importantly to get rid of our dependency on the Ruby directory. This new mode has been rolled out as default-enabled in 14.8, so we can now remove support for the old Ruby hooks directory in this release. Changelog: removed
2022-02-16cmd/gitaly-hooks: Modernize tests to execute gitaly-hooks directlyPatrick Steinhardt
Tests for the gitaly-hooks binary are still using the Ruby wrapper scripts. These are deprecated though, where the new way to execute the binary is instead via a temporary directory created at runtime which only contains symlinks to the binary. Refactor the tests to execute the binary directly now that we're about to remove the Ruby hook scripts. This also requires us to move to the new way to derive which hook is about to be executed: the hook name is not derived via the first argument anymore, but instead via the zeroth argument which is set to the name of the symlink.
2022-02-16test-boot: Write gitlab-shell secret into temporary directoryPatrick Steinhardt
The test-boot script verifies that Gitaly comes up correctly and is used as a very basic smoke test in our CI. As part of the bringup it writes the gitlab-shell secret into the `ruby/git-hooks` directory such that Gitaly is able to find the secret, or otherwise it would fail to boot. This directory is going away, so we need to find a better location. And we do in fact already have one: we can just write it into a subdirectory of the temporary directory which already contains all the other runtime data required for a successful boot. Convert the script to do so.
2022-02-16operations: Enable use of detailed errors for UserMergeBranchPatrick Steinhardt
With UserMergeBranch we have introduced a first test balloon for the use of detailed gRPC errors which inject information about why specifically an RPC call has failed via embedded structured errors. While it has taken quite a while to roll this out, Rails has now been converted to use it. The result is that we have much more robust error handling, where Rails can now use the structured data to handle the error itself better without having to distinguish errors by matching messages. This change has been rolled out to production on January 28th, and we didn't observe any issues with it. Remove the feature flag guarding the code.
2022-02-16git: Backport patches to speed up git-fetch(1) in repos with many refsPatrick Steinhardt
We have upstreamed two patches for git-fetch(1) which speed up mirror fetches in repositories with hundreds of millions of references. The first patch makes better use of the commit-graph when computing common objects, and the second patch will cause us to skip computing the output width when fetching with the `--quiet` flag. The patches were tested with our notorious problem repo `www-gitlab-com` with speedups of about 25% when doing mirror-fetches. Backport them into our own Git version now that they have been merged via 2b331293fb (Merge branch 'ps/fetch-optim-with-commit-graph' into next, 2022-02-14). Changelog: performance
2022-02-16housekeeping: Implement repository housekeeping via the managerPatrick Steinhardt
Now that we have the housekeeping manager globally injected as required, move the logic to clean up repositories and optimize them to this manager.
2022-02-16housekeeping: Create new manager to host stateful logicPatrick Steinhardt
We're eventually going to move the housekeeping package to keep state such that we can improve the heuristics used for optimizing repos. This will allow us to e.g. take into account the last time a repository was optimized to not optimize repositories too often, or avoid packing the same repository twice concurrently. Implment a new housekeeping manager structure that will be the home of this functionality and inject it as required. This manager isn't yet doing anything.
2022-02-16repository: Move optimization of repositories into housekeeping packagePatrick Steinhardt
We want to allow for OptimizeRepository to be called without invoking an RPC in order to allow us to call it in more contexts. Now that all its dependent parts are part of the housekeeping package this commit moves the logic of OptimizeRepository in there, too.
2022-02-16repository: Move object repacking into housekeeping packagePatrick Steinhardt
We want to allow for OptimizeRepository to be called without invoking an RPC in order to allow us to call it in more contexts. As a preparatory step, we thus have to move all functionality which is invoked by it into a package that is independent of gRPC services. Move the logic handling repacking of objects into the housekeeping package as part of this move.
2022-02-16repository: Move writing of commit-graph into housekeeping packagePatrick Steinhardt
We want to allow for OptimizeRepository to be called without invoking an RPC in order to allow us to call it in more contexts. As a preparatory step, we thus have to move all functionality which is invoked by it into a package that is independent of gRPC services. Move the writing of the commit-graph into the housekeeping package as part of this move.
2022-02-16repository: Move cleanup of worktrees into housekeeping packagePatrick Steinhardt
We want to allow for OptimizeRepository to be called without invoking an RPC in order to allow us to call it in more contexts. As a preparatory step, we thus have to move all functionality which is invoked by it into a package that is independent of gRPC services. Move the cleanup of worktrees into the housekeeping package as part of this move.
2022-02-16repository: Decouple OptimizeRepository implementation from serverPatrick Steinhardt
We're about to move handling of all repository implementations into the housekeeping package. Prepare for this by making OptimizeRepository not depend on the RepositoryService server anymore.
2022-02-16Merge branch 'pks-tx-fix-grpc-error-comparison' into 'master'James Fargher
coordinator: Fix error comparison causing excessive replication jobs Closes #4045 See merge request gitlab-org/gitaly!4349
2022-02-15Merge branch 'getrepopath-propagate-notfound' into 'master'Pavlo Strokov
Propagate NotFound error returned by GetRepoPath See merge request gitlab-org/gitaly!4338
2022-02-15datastore: Clean completed & dead replication jobsToon Claes
Previous attempts [1] & [2] were made to avoid completed and dead jobs being left over in the replication queue. But only in [3] there was made sure no new jobs were generated. So now no more of these stale are created, we can run a migration that wipes all stale records from the database. This change in fact repeats the `DELETE` query from the migration added in [2]. 1. 8f8ae3025 (Replication job acknowledge removes 'completed' and 'dead' events., 2020-08-05) 2. 2d3fc8063 (Replication job acknowledge removes 'completed' and 'dead' events., 2020-09-03) 3. 8c4da135f (replication: Remove 'dead' stale jobs., 2021-10-20) Changelog: performance Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/3665
2022-02-15Propagate NotFound error returned by GetRepoPathIgor Wiedler
We are currently wrapping some of the errors returned by GetRepoPath, which makes them lose the gRPC NotFound code. This leads to a gRPC error code of Unknown, which counts towards our error SLO, paging the on-call. This patch removes the wrapping, ensuring the error code is propagated to the client, and accounted for appropriately in logs and metrics. Changelog: fixed