Age | Commit message (Collapse) | Author |
|
|
|
[ci skip]
|
|
updateref: Always assert state transitions if Git supports flushing
Closes #3781
See merge request gitlab-org/gitaly!3904
|
|
Add FetchBundle RPC
See merge request gitlab-org/gitaly!3808
|
|
'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
|
|
operations: Always return structured errors from Git2Go merges
Closes #3756
See merge request gitlab-org/gitaly!3896
|
|
FetchBundle copies the bundle stream to a tempfile that is then passed
to `git-fetch`.
Changelog: added
|
|
Since fetching without transactions should be the exception, we make the
default to fetch with transactions.
|
|
updateref: Fix test flakiness when writing to updater fails
See merge request gitlab-org/gitaly!3899
|
|
Issue: https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1278
Changelog: added
|
|
Remove orphaned worktree directories
See merge request gitlab-org/gitaly!3889
|
|
repository: Always lock gitconfig and gitattributes on write
Closes #3764
See merge request gitlab-org/gitaly!3891
|
|
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.
|
|
Unrevert RepositoryExists interceptor changes
See merge request gitlab-org/gitaly!3887
|
|
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.
|
|
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
|
|
Revert catfile cache refactor
See merge request gitlab-org/gitaly!3902
|
|
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.
|
|
`require.NoFileExists` specifically checks for files. It does not
consider directories files, so these tests were not working as expected.
|
|
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
|
|
[ci skip]
|
|
go 1.16 deprecated the ioutil package.
|
|
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.
|
|
lint: Remove SA1019 exclude rules
See merge request gitlab-org/gitaly!3881
|
|
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.
|
|
test: Fix data race on the votes counter
See merge request gitlab-org/gitaly!3897
|
|
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.
|
|
ref: Drop ListNewBlobs RPC
See merge request gitlab-org/gitaly!3893
|
|
[ci skip]
|
|
repository: Remove `IsSquashInProgress()` RPC
Closes #3728
See merge request gitlab-org/gitaly!3892
|
|
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
|
|
Remove SetConfig and DeleteConfig RPCs
Closes #3722
See merge request gitlab-org/gitaly!3890
|
|
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.
|
|
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
|
|
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.
|
|
Remove the deprecated `SetConfig()` RPC call. Modifying the on-disk
remote is not supported anymore by Gitaly.
Changelog: deprecated
|
|
Remove the deprecated `DeleteConfig()` RPC call. Modifying the on-disk
remote is not supported anymore by Gitaly.
Changelog: deprecated
|
|
Drop support for Go 1.15
See merge request gitlab-org/gitaly!3879
|
|
This reverts commit 03276deb1449303a92b130741e4d1e3ed6053d68.
|
|
coordinator: Fix differing views on feature flags during upgrades
Closes #3675
See merge request gitlab-org/gitaly!3870
|
|
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.
|
|
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.
|
|
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.WriteFile()` with `os.WriteFile()` to adapt accordingly.
|
|
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.TempFile()` with `os.CreateTemp()` to adapt accordingly.
|
|
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.TempDir()` with `os.MkdirTemp()` to adapt accordingly.
|
|
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.ReadFile()` with `os.ReadFile()` to adapt accordingly.
|
|
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.ReadAll()` with `io.ReadAll()` to adapt accordingly.
|
|
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.Discard` with `io.Discard` to adapt accordingly.
|
|
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.
|
|
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.
|