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
2021-09-24Add tests to cover possible conflicts between branch/tag create/delete“jmd-add-tests-branch-vs-tags-issues”john.mcdonnell
2021-09-24Update changelog for 14.0.11GitLab Release Tools Bot
[ci skip]
2021-09-23Merge branch 'pks-updateref-always-assert-locking' into 'master'Sami Hiltunen
updateref: Always assert state transitions if Git supports flushing Closes #3781 See merge request gitlab-org/gitaly!3904
2021-09-23Merge branch 'fetch_bundle_rpc' into 'master'Patrick Steinhardt
Add FetchBundle RPC See merge request gitlab-org/gitaly!3808
2021-09-23Merge branch ↵Patrick Steinhardt
'qmnguyen0711/1278-add-half-close-capability-to-gitaly-sidechannel' into 'master' Add half-close capability to Gitaly sidechannel See merge request gitlab-org/gitaly!3854
2021-09-23Merge branch 'pks-operations-drop-git2go-merge-gob-ff' into 'master'James Fargher
operations: Always return structured errors from Git2Go merges Closes #3756 See merge request gitlab-org/gitaly!3896
2021-09-23Add FetchBundle RPCJames Fargher
FetchBundle copies the bundle stream to a tempfile that is then passed to `git-fetch`. Changelog: added
2021-09-23Add option to explicitly disable transactions for fetchJames Fargher
Since fetching without transactions should be the exception, we make the default to fetch with transactions.
2021-09-22Merge branch 'pks-updateref-print-stderr-when-write-fails' into 'master'Pavlo Strokov
updateref: Fix test flakiness when writing to updater fails See merge request gitlab-org/gitaly!3899
2021-09-22Add half-close capability to Gitaly sidechannelQuang-Minh Nguyen
Issue: https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1278 Changelog: added
2021-09-22Merge branch 'remove_orphaned_worktree_dirs' into 'master'Patrick Steinhardt
Remove orphaned worktree directories See merge request gitlab-org/gitaly!3889
2021-09-22Merge branch 'pks-ff-drop-tx-file-locking' into 'master'Patrick Steinhardt
repository: Always lock gitconfig and gitattributes on write Closes #3764 See merge request gitlab-org/gitaly!3891
2021-09-22updateref: Always assert state transitions if Git supports flushingPatrick Steinhardt
With 4abf27024 (updateref: Fix indeterminate state when locking refs, 2021-09-13), we have introduced proper verification of state transitions in git-update-ref(1) such that we notice early on when locking of refs fails. As a result, we won't try to vote on transactions where we could have already known that git-update-ref(1) failed to lock refs in the first place and would thus abort early on. Remove the feature flag guarding this code. Given that this requires changes in Git, we still need to verify that the current Git version supports flushing of status updates.
2021-09-22Merge branch 'smh-fix-repository-exists' into 'master'Patrick Steinhardt
Unrevert RepositoryExists interceptor changes See merge request gitlab-org/gitaly!3887
2021-09-22localrepo: Drop unused `Config.Set()` functionPatrick Steinhardt
The `Set()` function sets config entries in the gitconfig, but without proper atomic guarantees. Given that it has since been replaced with the `localrepo.SetConfig()` function, which does provide those guarantees, the old function shouldn't be used anymore. Remove it and remaining callers in tests.
2021-09-22repository: Always lock gitconfig and gitattributes on writePatrick Steinhardt
We used to directly write to both the gitconfig and gitattributes files without having proper locking semantics which assert that there was no concurrent write to the same file. As a result, it could be that multiple RPCs which modify the same file all succeeded, but overwrote their respective changes. This was fixed via a new locking file writer, which locks the file, votes on the changes and then commits it into place only if all nodes agree on the change and if there was no concurrent write to the same file. Like this, we now have atomic guarantees on both the gitconfig and gitattributes files. Remove the feature flag which guards this code. It has been tested in production without any observed issues. Changelog: fixed
2021-09-22Merge branch 'sh-revert-3853' into 'master'Patrick Steinhardt
Revert catfile cache refactor See merge request gitlab-org/gitaly!3902
2021-09-22Add FetchBundle to repository service protoJames Fargher
FetchBundle will allow updating an existing repository with the objects and refs of a bundle, such as an incremental backup. Right now the only other RPC is `CreateRespositoryFromBundle` but this requires the repository to not already exist. For incremental backups, there will be a series of bundles that need to be applied to a repository in a specific order.
2021-09-22Use `require.NoDirExists` to test directories in cleanup RPCJames Fargher
`require.NoFileExists` specifically checks for files. It does not consider directories files, so these tests were not working as expected.
2021-09-22Remove orphaned worktree directoriesJames Fargher
When cleanup encounters a stale worktree directory it attempts to remove it using `git worktree remove`. This however fails when there is a directory that git does not know about. It is not entirely clear how this situation arises but since this directory is gitaly controlled and `CreateBundle` calls cleanup and this is required by backups, we should attempt to remove any such orphaned directories instead of erroring. Changelog: fixed
2021-09-22Update changelog for 13.12.12GitLab Release Tools Bot
[ci skip]
2021-09-21Use io.CopyN instead of ioutil.CopyNStan Hu
go 1.16 deprecated the ioutil package.
2021-09-21Revert catfile cache refactorStan Hu
This reverts https://gitlab.com/gitlab-org/gitaly/-/merge_requests/3853 since we believe it's leading to a Goroutine leak in https://gitlab.com/gitlab-com/gl-infra/production/-/issues/5566.
2021-09-21Merge branch 'ps-remove-SA1019-excludes' into 'master'3787-integrate-ipynb2md-to-gitlabToon Claes
lint: Remove SA1019 exclude rules See merge request gitlab-org/gitaly!3881
2021-09-21updateref: Fix test flakiness when writing to updater failsPatrick Steinhardt
In one of our tests for the updateref package, we verify that we get an error when trying to commit a change on a transaction that has already been prepared. The test is flaky though given that it sometimes does not return the expected error message from git-update-ref(1). This race is caused by git-update-ref(1) exiting before we get to the point where we can write another status change command to its stdin, and as a result we get a failure writing to the command's pipe instead of the expected error. Fix this bug by explicitly cancelling the command and including its stderr when writing to it fails. This makes sure that stderr was flushed and we've got it available, and it would also include the error message we are searching for in the test.
2021-09-21Merge branch 'ps-fix-data-race-in-test' into 'master'Patrick Steinhardt
test: Fix data race on the votes counter See merge request gitlab-org/gitaly!3897
2021-09-21test: Fix data race on the votes counterPavlo Strokov
The local variable votes used inside the transaction server and in the test to verify amount of votes executed. As code is executed in different goroutines we need to protect access to the shared variable or use atomic instructions to prevent data races.
2021-09-21Merge branch 'pks-drop-list-new-blobs' into 'master'Pavlo Strokov
ref: Drop ListNewBlobs RPC See merge request gitlab-org/gitaly!3893
2021-09-21Update changelog for 14.3.0GitLab Release Tools Bot
[ci skip]
2021-09-21Merge branch 'pks-drop-is-squash-in-progress' into 'master'Patrick Steinhardt
repository: Remove `IsSquashInProgress()` RPC Closes #3728 See merge request gitlab-org/gitaly!3892
2021-09-21repository: Remove `IsSquashInProgress()` RPCPatrick Steinhardt
In release 14.2, we have converted `UserSquash()` to never use worktrees anymore. As a result, the old `IsSquashInProgress()` RPC doesn't really do anything anymore and always returns the equivalent of `false`. Upstream has thus been converted in b5b78c33c9f (merge_request: Drop checks whether a squash is in progress, 2021-08-20) to not use the RPC anymore, leaving it without callers. Remove `IsSquashInProgress()`. Changelog: removed
2021-09-21Merge branch 'pks-config-rpcs-cleanup' into 'master'Pavlo Strokov
Remove SetConfig and DeleteConfig RPCs Closes #3722 See merge request gitlab-org/gitaly!3890
2021-09-21operations: Always return structured errors from Git2Go mergesPatrick Steinhardt
In commit 84bd2721e (gitaly-git2go: Return structured conflict error on merge conflict, 2021-08-26), we have changed gitaly-git2go's merge subcommand to support structured errors. This allows us to return more information why a merge failed, e.g. by returning the set of conflicting files to the caller. Drop the feature flag which guards this code and thus always enable the use of structured errors.
2021-09-21ref: Drop ListNewBlobs RPCPatrick Steinhardt
The `ListNewBlobs()` RPC call has been replaced by the more flexible alternative `ListBlobs()`, which can do the same but across multiple new refs at once. The last callsite in Rails has been removed in 0bc19a62ac3 (gitaly_client: Remove unused `#list_new_blobs` function, 2021-09-15), so it is not used anywhere anymore. Remove the RPC call. Changelog: deprecated
2021-09-21gitaly-git2go: Remove "set-config" subcommandPatrick Steinhardt
While the "set-config" subcommand can in theory still be called when doing a zero-downtime upgrade given that its corresponding RPC still existed in this release, in practice the RPC wasn't ever called anymore. As a result, we can already drop the subcommand right now without having to fear any regressions.
2021-09-21repository: Remove `SetConfig()` RPCPatrick Steinhardt
Remove the deprecated `SetConfig()` RPC call. Modifying the on-disk remote is not supported anymore by Gitaly. Changelog: deprecated
2021-09-21repository: Remove `DeleteConfig()` RPCPatrick Steinhardt
Remove the deprecated `DeleteConfig()` RPC call. Modifying the on-disk remote is not supported anymore by Gitaly. Changelog: deprecated
2021-09-20Merge branch 'pks-go-drop-1.15-support' into 'master'Toon Claes
Drop support for Go 1.15 See merge request gitlab-org/gitaly!3879
2021-09-20Revert "proto: Mark RepositoryExists as an intercepted method"Sami Hiltunen
This reverts commit 03276deb1449303a92b130741e4d1e3ed6053d68.
2021-09-20Merge branch 'pks-praefect-feature-flags' into 'master'Sami Hiltunen
coordinator: Fix differing views on feature flags during upgrades Closes #3675 See merge request gitlab-org/gitaly!3870
2021-09-20golangci: Disallow usage of "io/ioutil" packagePatrick Steinhardt
The "io/ioutil" package has been deprecated in Go 1.16 and thus shouldn't be used in our codebase anymore. Disallow its usage by adding the "depguard" linter with a single entry for this specific package. Note that we still use the package in some places where we used to rely on `ioutil.ReadDir()`'s old behaviour of stat'ting all directory entries. Conversion of these is not part of this patch series given that it would be a change in behaviour compared to all the other changes which aren't. Those sites are thus annotated with `nolint` directives.
2021-09-20global: Replace trivial cases of deprecated `ioutil.ReadDir()`Patrick Steinhardt
With Go 1.16, the ioutil package was deprecated. In addition to being moved into the os package, `ioutil.ReadDir()` was also changed to not stat(3P) all dir entries anymore. As a result, the caller now has to do so manually. This is a performance improvement in some cases where the caller didn't require any of the file information, but really only wanted to read the directory's entries. Adapt trivial usecases of `ioutil.ReadDir()` which do not require this information with usage of `os.ReadDir()`. This leaves a few callsites of the old `ioutil.ReadDir()` function for future conversion.
2021-09-20global: Replace deprecated usage of `ioutil.WriteFile()`Patrick Steinhardt
With Go 1.16, the ioutil package was deprecated. Replace our usage of `ioutil.WriteFile()` with `os.WriteFile()` to adapt accordingly.
2021-09-20global: Replace deprecated usage of `ioutil.TempFile()`Patrick Steinhardt
With Go 1.16, the ioutil package was deprecated. Replace our usage of `ioutil.TempFile()` with `os.CreateTemp()` to adapt accordingly.
2021-09-20global: Replace deprecated usage of `ioutil.TempDir()`Patrick Steinhardt
With Go 1.16, the ioutil package was deprecated. Replace our usage of `ioutil.TempDir()` with `os.MkdirTemp()` to adapt accordingly.
2021-09-20global: Replace deprecated usage of `ioutil.ReadFile()`Patrick Steinhardt
With Go 1.16, the ioutil package was deprecated. Replace our usage of `ioutil.ReadFile()` with `os.ReadFile()` to adapt accordingly.
2021-09-20global: Replace deprecated usage of `ioutil.ReadAll()`Patrick Steinhardt
With Go 1.16, the ioutil package was deprecated. Replace our usage of `ioutil.ReadAll()` with `io.ReadAll()` to adapt accordingly.
2021-09-20global: Replace deprecated usage of `ioutil.Discard`Patrick Steinhardt
With Go 1.16, the ioutil package was deprecated. Replace our usage of `ioutil.Discard` with `io.Discard` to adapt accordingly.
2021-09-20bootstrap: Start to use new `net.ErrClosed` error typePatrick Steinhardt
With Go 1.16, it is now possible to detect closed connection via the new `net.ErrClosed` error type. Adapt the bootstrap test to use this type instead of doing a string comparison.
2021-09-20glsql: Start to use new `net.ErrClosed` error typePatrick Steinhardt
With Go 1.16, it is now possible to detect network failures via the new `net.ErrClosed` error type. Adapt the glsql testing package to use this type instead of doing a string comparison.