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-11-15Add debug code to TestOptimizeqmnguyen0711/test-macos-jobsQuang-Minh Nguyen
2022-11-14ci: Run macOS jobs when accepting merge requestsPatrick Steinhardt
While macOS is not a supported platform for Gitaly, most of the developers at GitLab do infact use macOS as their development platform. As such it is sensible to not regress the ability of developers to run the full test suite on macOS. While it would be nicest to just always run the CI job, it does take significantly longer to finish than our other tests. So instead, we do the same as for our FIPS jobs and run them whenever a merge request gets added to a merge train.
2022-11-14ci: Reorder macOS job propertiesPatrick Steinhardt
Reorder the properties of our macOS job to match the order in which other CI jobs are defined.
2022-11-14ci: Split up macOS script by lifecyclePatrick Steinhardt
The macOS job is currently executing all steps in the `script` part. Split it up into `before_script`, `script` and `after_script`. While this is conceptually cleaner, it also means that the `after_script` will get executed even if `script` fails to analyze tests for any panics.
2022-11-14ci: Deduplicate definition of macOS test artifactsPatrick Steinhardt
The artifacts defined for macOS tests are the same as the one we have defined for all other tests. Deduplicate them by using a JAML anchor.
2022-11-14Merge branch 'pks-ci-mandatory-fips-builds' into 'master'Quang-Minh Nguyen
ci: Fix FIPS job not running for merge trains See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5044 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2022-11-14ci: Fix FIPS job not running for merge trainsPatrick Steinhardt
The FIPS job is supposed to run whenever something gets merged onto the default branch. This is supposed to happen by checking whether the condition `CI_COMMIT_BRANCH == CI_DEFAULT_BRANCH` is true. But as it turns out, this variable is not set in merge request pipelines. Fix this by adding another condition that checks for the merge request event type.
2022-11-14Merge branch 'renovate/github.com-stretchr-testify-1.x' into 'master'Patrick Steinhardt
go: Update module github.com/stretchr/testify to v1.8.1 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4971 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2022-11-14Merge branch 'wc/remove-global-logger' into 'master'James Fargher
praefect: Remove global logger Closes #4500 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5041 Merged-by: James Fargher <proglottis@gmail.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Co-authored-by: Will Chandler <wchandler@gitlab.com>
2022-11-12Merge branch 'ps-hook-fix' into 'master'Will Chandler
hook: Standardize errors creation See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5045 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
2022-11-11praefect: Make add-repositories tests parallelWill Chandler
Now that the previous commit has removed the global logger from Praefect, re-enable parallel testing for the impacted add-repositories tests. Changelog: fixed
2022-11-11praefect: Remove global loggerWill Chandler
Currently Praefect uses a global `logger` variable. When running normally this is not an issue logged events occur serially. However, in testing we try to run in parallel whenever possible, leading to race-detector failures from events being logged concurrently. This was occurring frequently in `TestAddRepositories_Exec()` in particular. Make logger a local variable to resolve this.
2022-11-11Update changelog for 15.5.4GitLab Release Tools Bot
[ci skip]
2022-11-11go: Update module github.com/stretchr/testify to v1.8.1GitLab Renovate Bot
2022-11-11Merge branch 'renovate/google.golang.org-grpc-1.x' into 'master'Sami Hiltunen
go: Update module google.golang.org/grpc to v1.50.1 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4928 Merged-by: Sami Hiltunen <shiltunen@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Sami Hiltunen <shiltunen@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2022-11-11Merge branch 'renovate/golang.org-x-sync-0.x' into 'master'Patrick Steinhardt
go: Update module golang.org/x/sync to v0.1.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5022 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Approved-by: Toon Claes <toon@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2022-11-11Merge branch ↵Patrick Steinhardt
'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.50.1 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4965 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2022-11-11hook: Standardize errors creationPavlo Strokov
Replace usage of status.Errorf() with helper.Err<StatusCode>() to return proper error code with error unwrapping. Replace old %v with new %w for proper error wrapping. Replace fmt.Errorf() with errors.New() if used without a reason (no parameters to inject into error text). Check the error to convert it to the corresponding error code.
2022-11-11hook: Export an error errInvalidSidechannelAddressPavlo Strokov
The errInvalidSidechannelAddress made exportable, so we can check what is the cause of the error returned by the GetSidechannel() function. It will be used to return InvalidArgument for RPC. The error is also a bit refactored to have a value receiver for the Error() method and now has explicit address field.
2022-11-11Merge branch 'pks-makefile-bundled-git-version-via-repo' into 'master'John Cai
Makefile: Use Gitaly's tagged Git versions instead of ad-hoc patching See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5042 Merged-by: John Cai <jcai@gitlab.com> Approved-by: Christian Couder <chriscool@tuxfamily.org> Approved-by: karthik nayak <knayak@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2022-11-11Merge branch 'ps-internalgitaly-fix' into 'master'John Cai
internalgitaly: Standardize errors creation See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5043 Merged-by: John Cai <jcai@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
2022-11-11internalgitaly: Standardize errors creationPavlo Strokov
Return Internal code in case of an unexpected operation failure instead of Undefined by using helper.ErrInternal(). Replace usage of status.Errorf() with helper.ErrNotFoundf() to make error creation more standard.
2022-11-11Merge branch '4607-fix-fips-curl-issue' into 'master'Patrick Steinhardt
git: Don't use '*' wildcard with curl Closes #4607 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5037 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: Karthik Nayak <knayak@gitlab.com>
2022-11-11Makefile: Use Gitaly's tagged Git versions instead of ad-hoc patchingPatrick Steinhardt
Right now, the way we apply Git patches is by adding them to the Gitaly project and using git-apply(1) to apply them ad-hoc. This is starting to show its limits though: - It is hard for us to provide a simple pointer to the Git sources that we distribute to the customer. - It is hard to execute tests for the patched Git version in an automated fashion. - It is hard to work on top of the already-patched Git distribution to for example apply more patches. These limitations are getting more noticeable now that we have split up the Gitaly team into two teams, where we potentially want to backport patches more aggressively. With the split we have now made the repository at [1] the canonical Git repository for all our efforts. This indeed opens up a much better way to use custom Git versions: instead of hosting the patches in the Gitaly repository, we start to tag Gitaly-specific releases in that repository. These releases then carry all the additional patches on top. This makes it trivial to use normal workflows: - We can point customers to the Gitaly-specific tags which hold our patches on top. - We can automatically trigger CI pipelines on top of patched Gitaly-specific releases by just pushing branches or tags. - You can just clone the repository and checkout out the specific tags. Drop the infrastructure to patch releases in-place in favor of this new architecture. [1]: https://gitlab.com/gitlab-org/git.git
2022-11-10Merge branch 'kn-fix-dst-bug-housekeeping' into 'master'Justin Tobler
housekeeping: Remove usage of `Time.AddDate(...)` See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5035 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: Karthik Nayak <knayak@gitlab.com>
2022-11-10Merge branch 'no_object_hash_checksum' into 'master'Patrick Steinhardt
Extract a zero checksum constant See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5036 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: James Fargher <jfargher@gitlab.com>
2022-11-10Merge branch 'revert-9737f0aa' into 'master'Patrick Steinhardt
Revert "Merge branch 'ps-ref-fix' into 'master'" See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5039 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
2022-11-10housekeeping: Remove usage of `Time.AddDate(...)`Karthik Nayak
Currently we use `Time.AddDate(...)` in a few places in the housekeeping package. The problem with this is that it directly adds/subtracts days from the current time. This would not work well with DST changes. For e.g. if you're subtracting day around the time of when DST changes happen, you could potentially gain/loose an hour. Instead lets use `Time.Add(...)` where we'd specify the number of hours to be added/subtracted.
2022-11-10Revert "Merge branch 'ps-ref-fix' into 'master'"Pavlo Strokov
This reverts merge request !5027
2022-11-10Merge branch 'ps-objectpool-fix' into 'master'Christian Couder
objectpool: Standardize errors creation See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5033 Merged-by: Christian Couder <chriscool@tuxfamily.org> Approved-by: Christian Couder <chriscool@tuxfamily.org> Co-authored-by: Pavlo Strokov <pstrokov@gitlab.com>
2022-11-10Merge branch 'smh-parse-invalid-ref-name' into 'master'Toon Claes
Parse invalid reference name errors in Updater See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5034 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
2022-11-10git: Don't use '*' wildcard with curlKarthik Nayak
We are using the '*' wildcard for populating the `CURLOPT_RESOLVE` option with an entry `*:$port:$resolved_ip`. This is done to pre-resolve DNS names and prevent DNS rebinding issues. The problem is that the wildcard support in curl was only added in v7.64 and newer. Our FIPS build images use curl v7.61 though, and thus curl's pre-populated cache entry is not used at all. Consequentially, the vulnerability still exists on such systems. Lets directly use the hostname instead to ensure we cover all versions of curl.
2022-11-10objectpool: Standardize errors creationPavlo Strokov
Replace usage of status.Errorf() with helper.Err<StatusCode>f() to make error creation more standard. Return Internal code in case of an unexpected operation failure instead of Undefined by using helper.ErrInternal(). Replace old %v with new %w for proper error wrapping. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/4471
2022-11-10go: Update module google.golang.org/grpc to v1.50.1GitLab Renovate Bot
2022-11-10Merge branch 'renovate/golang.org-x-time-0.x' into 'master'Quang-Minh Nguyen
go: Update module golang.org/x/time to v0.2.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5024 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2022-11-10git: Allow checksum tests to run in sha256 modeJames Fargher
Now that these tests are more clearly object hash agnostic, we can run these tests in sha256 mode.
2022-11-10git: Extract a zero checksum constantJames Fargher
Previously when a constant zero checksum was required, it was retrieved from object hash. The checksum hash is completely decoupled from the object hash and so here we separate these concepts.
2022-11-10Merge branch 'renovate/github.com-prometheus-client_golang-1.x' into 'master'Will Chandler
go: Update module github.com/prometheus/client_golang to v1.14.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5021 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2022-11-09Parse invalid reference name errors in UpdaterSami Hiltunen
Our 'git update-ref' wrapper Updater doesn't currently parse the the error messages and report invalid reference names with a typed error. This commit adds support for that as it will be useful in the future to report more useful errors when Gitaly verifies references prior to accepting a transaction and logging it.
2022-11-09go: Update module golang.org/x/time to v0.2.0GitLab Renovate Bot
2022-11-09go: Update module golang.org/x/sync to v0.1.0GitLab Renovate Bot
2022-11-09go: Update module github.com/prometheus/client_golang to v1.14.0GitLab Renovate Bot
2022-11-09Merge branch 'qmnguyen0711/expose-test-logs-as-artifaccts' into 'master'Quang-Minh Nguyen
Expose logs as artifacts when running tests on CI See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5002 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
2022-11-09Merge branch 'toon-better-test' into 'master'Quang-Minh Nguyen
testing: Add some improvements to running tests See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4986 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Co-authored-by: Toon Claes <toon@gitlab.com>
2022-11-09Merge branch 'ps-ref-fix' into 'master'Pavlo Strokov
ref: Standardization of errors creation See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5027 Merged-by: Pavlo Strokov <pstrokov@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Approved-by: Christian Couder <chriscool@tuxfamily.org>
2022-11-09Merge branch 'renovate/github.com-getsentry-sentry-go-0.x' into 'master'Patrick Steinhardt
go: Update module github.com/getsentry/sentry-go to v0.14.0 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4905 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
2022-11-09Expose logs as artifacts when running tests on CIQuang-Minh Nguyen
Gitaly test suite on CI doesn't expose any logs. Sometimes, it's not easy to re-produce the tests on local environment. This commit exposes the logs generated while running tests. Those logs are then persisted as the artifacts of CI jobs for a reasonable amount of time. The folder storing logs are configured from TEST_LOG_DIR env variable. The dir is created and injected into testcfg builder and testserver as the dependency of started Gitaly server. We can also produce the logs on the local environment with TEST_LOG_DIR=/tmp/gitaly-logs make test-go Changelog: other
2022-11-09ref: Standardize error creationPavlo Strokov
Replace usage of status.Errorf() with helper.Err<StatusCode>f() to make error creation more standard. Replace old %v with new %w for proper error wrapping. Replace fmt.Errorf() with errors.New() if used without a reason (no wrapping or extra parameters for error text). Remove redundant prefix from error returned by RPC call. Return Internal code in case of an unexpected operation failure instead of Undefined by using helper.ErrInternal(). Add context to the error to make it more descriptive and standard. Check error type to convert it to the corresponding error code. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/4471
2022-11-09ci: Trigger QA on merged resultToon Claes
When merged result pipelines are enabled we had to set GITALY_SERVER_VERSION to the source branch SHA of the MR, otherwise QA wouldn't find this commit. This issue was reported in [1], and that's now fixed. So we can now remove that work around and run QA against merged result commits. [1]: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6482
2022-11-09Makefile: Make benchmark more verboseToon Claes
The default TEST_FORMAT is 'short', which doesn't output any expect for success or failure. This is pretty useless in the case of benchmarks, because you want to see the numbers of the benchmark. Therefore override the TEST_FORMAT to 'standard-verbose' for the 'bench' target.