Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
[ci skip]
|
|
go: Update github.com/ProtonMail/go-crypto digest to d1d05f4
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5369
Merged-by: James Fargher <proglottis@gmail.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Approved-by: James Fargher <proglottis@gmail.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
template: Add flaky test issue template
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5373
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Co-authored-by: Andras Horvath <ahorvath@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
dnsresolver: Support DNS scheme in client dial functions
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5367
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
|
|
|
|
go: Update grpc to v1.53.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5372
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: Will Chandler <wchandler@gitlab.com>
|
|
go: Update module github.com/getsentry/sentry-go to v0.18.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5370
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
In order to standardize the creation of flaky test issues, a new issue
template has been added. This template ensures that the appropriate
labels are applied automatically and tracks whether the flaky test has
been quarantined.
|
|
Update grpc-go to v1.53.0. This requires a small adjustment to
`TestDialNodes` as the error message format for failed connections has
changed slightly.
|
|
testhelper: Skip quarantined tests
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5362
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: John Cai <jcai@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
grpc-proxy: Fix flake caused by race between serving and stopping
Closes #4595
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5366
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
housekeeping: Unconditionally write bitmap lookup tables
Closes #4744
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5343
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
Change dir to SOURCE_DIR prior to go build
Closes #4645
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5363
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: john.mcdonnell <jmcdonnell@gitlab.com>
|
|
datastore: Increase timeout for storage cleanup test
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5364
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
Extract file and executable permissions to perm package
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5359
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: James Fargher <jfargher@gitlab.com>
|
|
git: Fix race between cancelling git-version(1) and reading its output
Closes #4740
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5344
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
These files are only written once and must only be read by gitaly.
|
|
Bulk update all file and executable permissions to use the new perm
package.
Strictly speaking changing os.ModePerm to perm.PublicFile is a
permission change (it goes from executable to normal), but since
ModePerm is only used in tests this should be safe.
|
|
This is in preparation for a bulk permission replace.
|
|
Since these function calls were using untyped constants, the compiler
hadn't picked up that the order of the parameters is wrong. This wont
work once we start using typed permission constants.
|
|
655 is executable by group and other but not user. This doesn't
make a lot of sense. So we change it here to non-executable-shared.
|
|
These directory permissions were missed in the previous MR.
|
|
These "group private executable" permissions are only used in this test.
Instead of creating a constant for this, we just convert it to a more
common permission.
|
|
Onboarding Issue Template: Add PTO Calendar Integration
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5244
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Andras Horvath <ahorvath@gitlab.com>
|
|
go: Update module github.com/rubenv/sql-migrate to v1.3.1
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5355
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
ssh: Refactor tests for SSHReceivePack
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5358
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: James Fargher <proglottis@gmail.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
'renovate-tools/golangci-lint/github.com-golangci-golangci-lint-1.x' into 'master'
tools/golangci-lint: Update module github.com/golangci/golangci-lint to v1.51.1
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5337
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
Currently the `TestReplicateRepository_BadRepository/target_invalid`
test is flaky during execution and causes frequent failure in the CI
pipelines. This change quarantines the test so that it is skipped during
test execution.
|
|
Currently there is not a standardized approach to quarantining flaky
tests. This change implements `testhelper.SkipQuarantinedTest` which can
be invoked to skip specified tests during execution.
|
|
limithandler: Log queue duration in limit.concurrency_queue_ms log field
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5333
Merged-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: Igor Wiedler <iwiedler@gitlab.com>
|
|
go: Update module golang.org/x/sys to v0.5.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5356
Merged-by: Pavlo Strokov <pstrokov@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Approved-by: Pavlo Strokov <pstrokov@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
|
|
[ci skip]
|
|
Previously, we implemented a custom DNS resolver. This resolver handles
all Gitaly URL having dns scheme. The exposed dial functions in client
package should work well with this scheme. In fact, we added some tests
to verify. However, it turns out the tests use `grpc.Dial`, instead of
exposed aforementioned dial functions. Hence, after rolling the
resolver, the client could not use URLs with DNS scheme.
This commit fixes this problem. In addition, the test is strengthen to
cover such cases.
Changelog: fixed
|
|
The dnsresolver package already had target parsing. This commit adds a
new public helper method to validate the full DNS URL. This helper will
be used to validate the input URL in client dial function.
|
|
The error propagation tests for our gRPC proxy set up two gRPC servers,
the proxy server and the backend server. As we verify that errors are
correctly propagated at different leveles when proxying, some of the
subtests will never cause the backend server to be hit in case the proxy
server already retruns an error.
This can cause a race in our test setup between starting to serve and
tearing down the backend server when the backend server is never being
connected to. As nothing will synchronize the Goroutine that starts to
serve with the deferred function to stop it, they may be executed out of
order so that we first stop and then try to serve the server. This will
cause `grpc.Server.Serve()` to return an error:
=== FAIL: internal/praefect/grpc-proxy/proxy TestProxyErrorPropagation/director_error_is_propagated (0.01s)
handler_ext_test.go:358:
Error Trace: /home/pks/Development/gitlab/gdk/gitaly/internal/praefect/grpc-proxy/proxy/testhelper.go:123
/home/pks/Development/gitlab/gdk/gitaly/internal/praefect/grpc-proxy/proxy/handler_ext_test.go:358
/home/pks/Development/gitlab/gdk/gitaly/internal/praefect/grpc-proxy/proxy/asm_amd64.s:1594
Error: Received unexpected error:
grpc: the server has been stopped
Test: TestProxyErrorPropagation/director_error_is_propagated
--- FAIL: TestProxyErrorPropagation/director_error_is_propagated (0.01s)
Fix this by explicitly handling and ignoring `grpc.ErrServerStopped` in
this test. While we could move this error handling into `MustServe()`,
it does not feel right to do so as it indeed indicates a real error when
trying to serve. Furthermore, this error is really quite specific to
this test setup as you can typically expect to hit the gRPC server that
you're setting up.
|
|
We're regularly observing a flaky test in the grpc-proxy test suite that
is quite hard to decipher because the failure happens in a Goroutine
that fails when the subtest is done already. The resulting panic looks
like the following when executed locally, but in CI it is completely
lacking any further information:
=== FAIL: internal/praefect/grpc-proxy/proxy TestProxyErrorPropagation/director_error_is_propagated (unknown)
panic: Log in goroutine after TestProxyErrorPropagation/director_error_is_propagated has completed:
Error Trace: /home/pks/Development/gitlab/gdk/gitaly/internal/praefect/grpc-proxy/proxy/testhelper.go:123
/home/pks/Development/gitlab/gdk/gitaly/internal/praefect/grpc-proxy/proxy/asm_amd64.s:1594
Error: Received unexpected error:
grpc: the server has been stopped
Test: TestProxyErrorPropagation/director_error_is_propagated
goroutine 160225 [running]:
testing.(*common).logDepth(0xc000d229c0, {0xc0003e8600, 0x177}, 0x3)
/usr/lib/go/src/testing/testing.go:894 +0x4c7
testing.(*common).log(...)
/usr/lib/go/src/testing/testing.go:876
testing.(*common).Errorf(0xc000d229c0, {0xca598d?, 0xc000d229c0?}, {0xc0006e4030?, 0x47a765?, 0x13199a0?})
/usr/lib/go/src/testing/testing.go:940 +0x5a
github.com/stretchr/testify/assert.Fail({0x7ea60ee3caf8, 0xc000d229c0}, {0xc0004d2000, 0x3c}, {0x0, 0x0, 0x0})
/home/pks/Development/gitlab/.go/pkg/mod/github.com/stretchr/testify@v1.8.1/assert/assertions.go:264 +0x384
github.com/stretchr/testify/assert.NoError({0x7ea60ee3caf8, 0xc000d229c0}, {0xdcc1a0, 0xc0001196f0}, {0x0, 0x0, 0x0})
/home/pks/Development/gitlab/.go/pkg/mod/github.com/stretchr/testify@v1.8.1/assert/assertions.go:1392 +0x105
github.com/stretchr/testify/require.NoError({0xdd4278, 0xc000d229c0}, {0xdcc1a0, 0xc0001196f0}, {0x0, 0x0, 0x0})
/home/pks/Development/gitlab/.go/pkg/mod/github.com/stretchr/testify@v1.8.1/require/require.go:1261 +0x96
gitlab.com/gitlab-org/gitaly/v15/internal/testhelper.MustServe({0xddf1d8, 0xc000d229c0}, {0xdd0160, 0xc0005f6000}, {0xdd5d30, 0xc00067d230})
/home/pks/Development/gitlab/gdk/gitaly/internal/testhelper/testhelper.go:123 +0xb6
created by gitlab.com/gitlab-org/gitaly/v15/internal/praefect/grpc-proxy/proxy_test.TestProxyErrorPropagation.func4
/home/pks/Development/gitlab/gdk/gitaly/internal/praefect/grpc-proxy/proxy/handler_ext_test.go:347 +0x2c5
Synchronize shutdown of the gRPC servers so that the failure happens
while the testcase is still executing. This gives us the following, much
more reasonable test failure:
=== FAIL: internal/praefect/grpc-proxy/proxy TestProxyErrorPropagation/director_error_is_propagated (0.01s)
handler_ext_test.go:358:
Error Trace: /home/pks/Development/gitlab/gdk/gitaly/internal/praefect/grpc-proxy/proxy/testhelper.go:123
/home/pks/Development/gitlab/gdk/gitaly/internal/praefect/grpc-proxy/proxy/handler_ext_test.go:358
/home/pks/Development/gitlab/gdk/gitaly/internal/praefect/grpc-proxy/proxy/asm_amd64.s:1594
Error: Received unexpected error:
grpc: the server has been stopped
Test: TestProxyErrorPropagation/director_error_is_propagated
--- FAIL: TestProxyErrorPropagation/director_error_is_propagated (0.01s)
The failure itself will be fixed in the next commit.
|
|
Convert the grpc-proxy handler test to use the `MustClose()` helper
function.
|
|
We've recently seen one of our tests for storage cleanup flake because
it hit the timeout of two seconds. This isn't all that surprising on
machines that are as slow as our CI runners.
Bump the timeout to a full minute. While it would be very much
preferable to refactor the code so that it doesn't need any timeouts in
the first place it doesn't feel worth it to refactor the code now.
|
|
Fixes https://gitlab.com/gitlab-org/gitaly/-/issues/4645 by avoiding situations where the working dir may be
a symlink, but SOURCE_DIR is the resolved path.
|
|
|
|
|
|
|
|
updateref: Fix handling of context cancellation errors
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5345
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
tests: Unseed repositories to enable SHA256 testing
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5353
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
|
|
|