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-04-27Makefile: Reduce installed Git size by using hardlinkspks-makefile-git-improvementsPatrick Steinhardt
Since the inception of our `make git` target we have always passed the `NO_INSTALL_HARDLINKS=YesPlease` build option. This option causes the Git build system to create copies of the Git binaries instead of hard links. It is not clear why we should need to set this option though as it only increases the size of the installed distribution by about 25MB without much merit. So let's stop passing the build option so that Git's build system can decide for itself how it should install the binaries.
2022-04-27Makefile: Fix rebuilding distributed Git when switching versionsPatrick Steinhardt
Building either our full Git distribution or the bundled Git versions always uses a `.version` file to verify whether we need to rebuild the target or not: only if the commit, build options or patches have been modified since the last time the `.version` file was generated will we actually rebuild Git. This is an important optimization and works quite well. One case where it doesn't work well right now though is when building different versions of distributed Git. Depending on which version the user wants to build via `GIT_VERSION`, we use different directories to build Git and thus also use different `.version` files. This has a catch though: because the `.version` file will not be updated again when both Git versions have already been built successfully, we now think that we don't need to rebuild Git because its `Makefile` is still newer than the `.version` file when we switch between versions. Fix this bug by always using the same directory to build distributed Git, regardless of its version. While this means more rebuilds, it's simple and correct.
2022-04-26Merge branch 'pks-drop-bundled-git-v2.33.1' into 'master'Toon Claes
Makefile: Drop bundled Git v2.33.1.gl3 See merge request gitlab-org/gitaly!4495
2022-04-26Merge branch 'smh-verification-metrics' into 'master'Toon Claes
Instrument verification worker for observability Closes #4097 See merge request gitlab-org/gitaly!4473
2022-04-26Merge branch 'jc-finalizing-vote-post-receive-pack' into 'master'Toon Claes
smarthttp: Add finalizing vote in PostReceivePack Closes #4110 See merge request gitlab-org/gitaly!4488
2022-04-26Merge branch 'pks-user-squash-drop-quarantined-voting-ff' into 'master'James Fargher
operations: Remove feature flag for transactional voting in UserSquash Closes #4119 See merge request gitlab-org/gitaly!4496
2022-04-25Merge branch 'smh-verification-trigger-only-generation' into 'master'Sami Hiltunen
Ignore verification columns for read-only cache updates Closes #4159 See merge request gitlab-org/gitaly!4468
2022-04-25smarthttp: Add finalizing vote in PostReceivePackjc-finalizing-vote-post-receive-packJohn Cai
When all updates are rejected, there will be no votes cast. This leads to an unnecessary replication job. In this case, we want to cast a last but empty vote. This is the same as how SSHReceivePack works. Changelog: changed
2022-04-25Merge branch 'jv-yamux-close-timeout' into 'master'Sami Hiltunen
sidechannel: lower yamux close timeout See merge request gitlab-org/gitaly!4491
2022-04-25smarthttp: Add TransactionManagerJohn Cai
This is a preperatory commit so that PostReceivePack can do transaction voting in the RPC handler. This adds a transaction manager to the server struct to be used by PostReceivePack.
2022-04-25operations: Remove feature flag for transactional voting in UserSquashPatrick Steinhardt
With af4ea3258 (operations: Fix missing votes on squashed commits, 2022-03-18) we have introduced the use of quarantine directories in the `UserSquash()` RPC to enable transactional voting. This change in behaviour has been rolled out to production, and the change was enabled by default in e8413304d (operations: Always use structured errors for UserSquash, 2022-03-21). We haven't seen any issues with this change. Remove the feature flag to always enable it. Changelog: removed
2022-04-25Makefile: Drop bundled Git v2.33.1.gl3pks-drop-bundled-git-v2.33.1Patrick Steinhardt
We have finished the migration to bundled Git v2.35.1.gl1 in v14.10. Due to concerns with zero-downtime upgrades we couldn't yet remove the old version though. But now that we have waited for a release we can finally remove the old version. Remove the infrastructure to build and install bundled Git v2.33.1.gl3. Changelog: removed
2022-04-25rspec: Convert test repo helper to use newer bundled Git versionPatrick Steinhardt
The test repository helper in our rspecs is used to create temporary repositories for testing purposes. The Git version it uses for this purpose depends on a set of environment variables, but in case it runs with bundled Git it needs to some more bootstrapping of an execution environment in order to be able to properly clone the repository. The bundled Git version is currently hard-coded to `gitaly-git`, which we're about to phase out in favor of `gitaly-git-v2.35.1.gl1`. With the removal of the old version the helper is thus about to break. Fix this by switching over to the newer bundled Git version. While we could do fancy things like injecting the version or auto-detecting it, it doesn't really feel worth it over simply hard-coding it. We're ultimately going to retire the sidecar over the next few releases, so we shouldn't spend more time than necessary on maintaining it.
2022-04-25Merge branch 'jc-restore-custom-hooks-vote' into 'master'Toon Claes
repository: RestoreCustomHooks to do transaction voting Closes #4081 See merge request gitlab-org/gitaly!4481
2022-04-22Update VERSION filesv15.0.0-rc1GitLab Release Tools Bot
[ci skip]
2022-04-22sidechannel: lower yamux close timeoutjv-yamux-close-timeoutJacob Vosmaer
Lower the yamux StreamCloseTimeout setting from 5 minutes to 1 second for sidechannel connections. The motivation for changing this is to make it easier to test client side cancelation in Workhorse tests.
2022-04-22Merge branch 'fix-typo-proto-file' into 'master'Toon Claes
Fix typo in documentation of UserCommitFilesRequestHeader See merge request gitlab-org/gitaly!4422
2022-04-22Merge branch 'jc-remove-maintenance-ff' into 'master'James Fargher
Remove Maintenance routing feature flag See merge request gitlab-org/gitaly!4486
2022-04-21Update VERSION filesGitLab Release Tools Bot
[ci skip]
2022-04-21Collect verification queue depth metricsmh-verification-metricsSami Hiltunen
The verification worker is already collecting the metrics on how many jobs it's processing. Praefect is still lacking a metric for the overall verification queue depth which would be very helpful in determining how much work is there left for the verification to be completed. This commit adds a collector for the verification queue depth. The metric is collected for each storage separately. The metric differentiates between replicas that are unverified and replicas that have been verified but the verification has expired.
2022-04-21Instrument verification worker for observabilitySami Hiltunen
This commit adds metrics on the verification worker so the process becomes more observable. The metrics track the number of dequeued jobs per storage and then number of completed jobs per storage with their results. The number of stale leases releases is also tracked. This gives insight into how the verification work is progressing.
2022-04-21Merge branch 'smh-release-stale-leases' into 'master'John Cai
Release expired verification leases periodically See merge request gitlab-org/gitaly!4478
2022-04-21Update changelog for 14.10.0GitLab Release Tools Bot
[ci skip]
2022-04-21repository: RestoreCustomHooks to do transaction votingjc-restore-custom-hooks-voteJohn Cai
RestoreCustomHooks changes data in a repository, so it should do voting. Otherwise, each time we create a replication job for it, which is useless because we don't replicate hooks. Add transactional voting to the RestoreCustomHooks RPC by integrating with the new LockingDirectory. Changelog: changed
2022-04-21safe: Add new LockingDirectoryJohn Cai
Sometimes it's useful to be able to lock a directory before modifying it. This is similar to LockingFileWriter, except it just gives the ability to lock a directory so another process cannot also lock the directory. This will be immediately useful in RestoreCustomHooks where we are about ot add transactional voting to it. With transactional voting, the semantics are that the `Prepared` vote is made once the data that is about to be changed is locked. This will enable us to lock the custom hooks directory. Changelog: added
2022-04-21Remove Maintenance routing feature flagJohn Cai
Since the maintenance routing feature flag has been running in production without issue, we can now remove it. Changelog: changed
2022-04-20Release expired verification leases periodicallySami Hiltunen
The background verifier sets a lease time on a replica when it picks it up for verification. If the worker dies for some reason, the lease will remain in place and no other worker will pick up the replica for verification again until the lease is cleared. The lease itself tells the maximum time the worker itself would be working on the replica. After it has been passed, it would be safe for another worker to pick up the replica for verification again. This commit adds a background goroutine that periodically releases expired leases so other workers can take up the work if the original worker failed and did not release the lease. The 'verificaton_leases' index is added so the query can efficiently find the replicas with leases acquired to find the stale ones.
2022-04-20Merge branch 'eread/update-version-of-danger-files-dependency' into 'master'James Fargher
Update version of danger-files dependency See merge request gitlab-org/gitaly!4485
2022-04-20Update version of danger-files dependencyEvan Read
2022-04-20Merge branch 'jc-docs-backpressure' into 'master'John Cai
docs: Document Gitaly backpressure See merge request gitlab-org/gitaly!4469
2022-04-20docs: Document Gitaly backpressureJohn Cai
There are a number of knobs in Gitaly to tune backpressure Gitaly can impose on services that call it. This commit documents these.
2022-04-20Merge branch 'sh-fips-mode' into 'master'James Fargher
Add support for FIPS encryption See merge request gitlab-org/gitaly!4482
2022-04-19Merge branch 'jc-list-repo-to-use-shorter-grace-period' into 'master'John Cai
repocleaner: Allow NewWalker to receive grace period parameter Closes #4164 See merge request gitlab-org/gitaly!4474
2022-04-19praefect: Set 6 hour grace period in list_untracked_repositoriesJohn Cai
A default grace period of 6 hours is sufficient for the subcommand.
2022-04-19Merge branch 'smh-verify-subcmd' into 'master'Sami Hiltunen
Implement 'praefect verify' subcommand Closes #4091 See merge request gitlab-org/gitaly!4463
2022-04-19Implement 'praefect verify' subcommandSami Hiltunen
Praefect periodically verifies the repository metadata in the background. The interval may be too long especially if there was an incident, say a disk failure. After recovering the Gitaly node, the disk may be completely empty or may contains an older snapshot which does not contain all expected repositories. In such cases, it would be great if Praefect could be manually instructed to verify the storage again as soon as possible rather than waiting for the next scheduled verification interval to pass. This commit adds the 'praefect verify' subcommand that allows for doing that. It takes in either a repository id, a virtual storage or a (virtual storage, storage) tuple and marks all replicas matching the selector as being unverified. Praefect's metadata verifier will then prioritize verifying these repositories over other repositories pending verification. This allows administrators to speed up the verification process and thus recovery. Changelog: added
2022-04-19Add proto definitions for MarkUnverified RPCSami Hiltunen
With the introduction of metadata verification, Praefect needs a tool to manually mark a repository as needing verification immediately rather than after the specified verification interval has passed. That tool will require a new RPC that it can call achieve its goal. This commit adds the proto definitions for MarkUnverified RPC which can be called to either mark a single repository by ID, a whole virtual storage, or a whole storage as needing verification. Changelog: added
2022-04-19Merge branch 'jc-limit-error-proto' into 'master'Sami Hiltunen
proto: Add LimitError as a structured error See merge request gitlab-org/gitaly!4476
2022-04-17Add support for FIPS encryptionsh-fips-modeStan Hu
This commit adds support of using a FIPS-validated SSL library with compiled Go executables when `FIPS_MODE=1 make` is run. A Go compiler that supports BoringSSL either directly (e.g. the `dev.boringcrypto` branch) or with a dynamically linked OpenSSL (e.g. https://github.com/golang-fips/go) is required. This is similar to the changes to support FIPS in GitLab Runner and in GitLab Pages: https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/716 Changelog: added
2022-04-14Merge branch 'toon-go-fixes' into 'master'Toon Claes
Makefile: Make GITALY_EXECUTABLES deferred again See merge request gitlab-org/gitaly!4477
2022-04-14Merge branch 'jc-update-gitaly-toml-with' into 'master'Toon Claes
Add new examples for concurrency and rate limiters See merge request gitlab-org/gitaly!4472
2022-04-14Makefile: Make GITALY_EXECUTABLES deferred againToon Claes
Recently, in b5c9c7efc (Makefile: Rename find_commands to GITALY_EXECUTABLES, 2022-03-25), we've changed the variable that holds the names of all Gitaly executable to be an immediate variable. While this is a good idea in general, it causes trouble in CI. In CI the compiled executables are put in cache, but the source files are not. So when files are pulled from cache, and any make target is built, it will expand GITALY_EXECUTABLES. Now source files are not pulled from the cache, so the `cmd` directory is missing. And therefore we revert it back to be a deferred variable.
2022-04-14proto: Add LimitError as a structured errorjc-limit-error-protoJohn Cai
When Gitaly enforces a limit, either due rate limiting or concurrency limiting, it needs to be able to return an error to its clients to provide context into why it failed so that clients can then inform its callers of why the call failed. Changelog: added
2022-04-14Merge branch 'smh-verify-metadata-output' into 'master'Sami Hiltunen
Expose last verification time in 'praefect metadata' Closes #4092 See merge request gitlab-org/gitaly!4466
2022-04-13Ignore verification columns for read-only cache updatessmh-verification-trigger-only-generationSami Hiltunen
Read-only cache receives invalidations on record updates via triggers in Postgres. Currently the notifications are sent for any modification to the records. The verification related columns are not relevant to the operation of the cache so this commit ignores the changes to the columns in the triggers. Changelog: changed
2022-04-13Expose last verification time in 'praefect metadata'Sami Hiltunen
Administrator's may want to know when Praefect has last verified a replica. This commit exposes that information via the 'praefect metadata' command. Changelog: changed
2022-04-13Fetch verified_at as part of GetRepositoryMetadataSami Hiltunen
GetRepositoryMetadata fetches a repository's metadata from the database. This commit expands the query to also fetch the newly added verified_at column so we can expose it in the 'praefect metadata' command to the admins.
2022-04-13Expose VerifiedAt via GetRepositoryMetadata proto definitionsSami Hiltunen
Administrators may want to know when a replica has been last verified by Praefect. GetRepositoryMetadata RPC is called by the 'metadata' sub-command to retrieve infromation about a repository and its replicas from Praefect's database. This commit adds the proto definitions for exposing the last verification time of replicas to the metadata sub-command. Changelog: changed
2022-04-13Merge branch 'smh-background-verifier' into 'master'Sami Hiltunen
Initial implementation of a metadata verifier See merge request gitlab-org/gitaly!4459
2022-04-13Wire metadata verifier in Praefect's mainSami Hiltunen
This commit wires the metadata verifier in Praefect's main so it can actually be configured for use. It's default disabled still as it still is missing some functionality that should be in place before generally enabling it, for example tooling like metrics, integration in to the 'praefect metadata' tool and a background routine to release stale leases. Changelog: added