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
2023-05-05saveash2k/clean-clientMikhail Mazurskiy
2023-02-11importsMikhail Mazurskiy
2023-02-11Extract gRPC client into a separate Go moduleMikhail Mazurskiy
2023-02-10Update VERSION filesv15.9.0-rc4GitLab Release Tools Bot
[ci skip]
2023-02-10Merge branch 'renovate/github.com-protonmail-go-crypto-digest' into 'master'James Fargher
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>
2023-02-09Merge branch 'jt-quarantine-template' into 'master'John Cai
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>
2023-02-09Merge branch 'qmnguyen0711/add-dial-support-to-client-dials' into 'master'John Cai
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>
2023-02-09template: remove extra ", assign to submitter, add workflow labelAndras Horvath
2023-02-09Merge branch 'wc/update-grpc-1_53_0' into 'master'Justin Tobler
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>
2023-02-09Merge branch 'renovate/github.com-getsentry-sentry-go-0.x' into 'master'Justin Tobler
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>
2023-02-09template: Add flaky test issue templateJustin Tobler
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.
2023-02-09go: Update grpc to v1.53.0Will Chandler
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.
2023-02-09Merge branch 'jt-quarantine-tests' into 'master'John Cai
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>
2023-02-09Merge branch 'pks-grpc-proxy-fix-flaky-serve' into 'master'Quang-Minh Nguyen
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>
2023-02-09Merge branch 'pks-housekeeping-remove-bitmap-lookup-table-ff' into 'master'Toon Claes
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>
2023-02-09Merge branch 'jmd-fix-make-go-build-from-symlink' into 'master'qmnguyen0711/gitaly-proxy-pocSami Hiltunen
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>
2023-02-09Merge branch 'pks-datastore-cleanup-increase-timeout' into 'master'Sami Hiltunen
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>
2023-02-09Merge branch 'extract_file_permissions' into 'master'Sami Hiltunen
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>
2023-02-09Merge branch 'pks-git-more-robust-version-parsing' into 'master'Toon Claes
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>
2023-02-08Extract constant for the most restricted write-once private filesJames Fargher
These files are only written once and must only be read by gitaly.
2023-02-08Extract file and executable permissionsJames Fargher
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.
2023-02-08perm: Add constants for files and executablesJames Fargher
This is in preparation for a bulk permission replace.
2023-02-08housekeeping: Rearrange function calls to be in correct orderJames Fargher
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.
2023-02-08Change inconsistent 655 permission to non-executable 644James Fargher
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.
2023-02-08Convert previously missed directory permissions to use constantsJames Fargher
These directory permissions were missed in the previous MR.
2023-02-08housekeeping: Change test file permissions from 770 to 644James Fargher
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.
2023-02-08Merge branch 'jc-update-onboarding-with-pto-integration' into 'master'John Cai
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>
2023-02-08Merge branch 'renovate/github.com-rubenv-sql-migrate-1.x' into 'master'Justin Tobler
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>
2023-02-08Merge branch 'pks-ssh-refactor-receive-pack-tests' into 'master'Justin Tobler
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>
2023-02-08Merge branch ↵Justin Tobler
'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>
2023-02-08repository: Quarantine replicate repository testJustin Tobler
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.
2023-02-08testhelper: Skip quarantined testsJustin Tobler
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.
2023-02-08Merge branch 'limit-handler-stats' into 'master'Will Chandler
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>
2023-02-08Merge branch 'renovate/golang.org-x-sys-0.x' into 'master'Pavlo Strokov
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>
2023-02-08go: Update module golang.org/x/sys to v0.5.0GitLab Renovate Bot
2023-02-08Update VERSION filesv15.9.0-rc3GitLab Release Tools Bot
[ci skip]
2023-02-08dnsresolver: Support DNS scheme in client dial functionsQuang-Minh Nguyen
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
2023-02-08dnsresolver: Implement dns scheme validationQuang-Minh Nguyen
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.
2023-02-08grpc-proxy: Fix flake caused by race between serving and stoppingPatrick Steinhardt
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.
2023-02-08grpc-proxy: Synchronize shutdown of the gRPC serversPatrick Steinhardt
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.
2023-02-08grpc-proxy: Use `testhelper.MustClose()` helper functionPatrick Steinhardt
Convert the grpc-proxy handler test to use the `MustClose()` helper function.
2023-02-08datastore: Increase timeout for storage cleanup testPatrick Steinhardt
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.
2023-02-08Change dir to SOURCE_DIR prior to go buildjohn.mcdonnell
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.
2023-02-08Port changes from stats_interceptor to commandstatshandler testIgor Wiedler
2023-02-08limithandler: Add integration test for gRPC interceptorsIgor Wiedler
2023-02-08limithandler: Log queue duration in limit.queue_ms log fieldIgor Wiedler
2023-02-08Merge branch 'pks-updateref-fix-context-cancellation-races' into 'master'Quang-Minh Nguyen
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>
2023-02-08Merge branch 'pks-unseed-repos-for-sha256-testing' into 'master'Quang-Minh Nguyen
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>
2023-02-08go: Update module github.com/getsentry/sentry-go to v0.18.0GitLab Renovate Bot
2023-02-08go: Update module github.com/rubenv/sql-migrate to v1.3.1GitLab Renovate Bot