Age | Commit message (Collapse) | Author |
|
Enhance developing workflow with Ruby gem in Gitlab Rails
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6593
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Approved-by: Eric Ju <eju@gitlab.com>
Reviewed-by: Toon Claes <toon@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: Eric Ju <eju@gitlab.com>
|
|
There is a known vulnerability in protoc-gen-doc. Fix this by updating
to v1.3.2.
|
|
Sometimes, we need to work on both Gitaly and GitLab Rails
implementations in parallel. Ideally, we can define and publish all
Protobuf changes beforehand. In practice, a complicated change might
require modifying the Protobuf multiple times until reaching a stable
state. It's more convenient to let GitLab Rails point the gem to the the
developing branch in Gitaly.
Unfortunately, Gitaly source code doesn't include the gemspec or any
autogenerated Ruby codes. All of them are generated on the flight while
running `make build-proto-gem`. Thus, we cannot point the gem to the
developing branch directly on CI environment.
This commit tweaks the gem generation script:
- Use current HEAD hash as the pre-release version.
- Persist gem working directory after building. This allows local GitLab
Rails point to that directory directly.
- Add support for gem name customization. This allows the developer
publish the gem under a different name during development.
|
|
There are known vulnerabilities in golang.org/x/text v0.3.* used by
protolint. Update to the most recent version.
|
|
Even though we don't link to the location where the source code of our
Ruby Gem exists, rubygems.org does have that information set. It points
to the legacy location of our Ruby Gem though, which is hosted in the
gitlab-org/gitaly-proto repository. It's been ages since we have
deprecated that repository though, so it's kind of puzzling that the
site still has that information. My best guess is that it simply uses
information that was at one point in time present in our Gemspec.
Let's explicitly document these URIs as part of our metadata. As
documented in the specification [1], these URIs should indeed end up on
rubygems.org and thus fix the out-of-date links.
[1]: https://guides.rubygems.org/specification-reference/#metadata
|
|
The current author name and address of our Gitaly Protobuf Gem still
lists Jacob Vosmaer, who has left GitLab a while ago. Let's update this
to instead use "engineering@gitlab.com".
|
|
tools/goimports: Update module golang.org/x/tools to v0.14.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6452
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Christian Couder <chriscool@tuxfamily.org>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
tools/dlv: Update module github.com/go-delve/delve to v1.21.1
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6460
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
tools/golangci-lint: Update module golang.org/x/tools to v0.14.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6453
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
|
|
|
|
|
|
|
|
|
|
tools/goimports: Update module golang.org/x/tools to v0.13.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6341
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
client: Strictly distinguish internal and public code
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6336
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
tools/golangci-lint: Update module golang.org/x/tools to v0.13.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6342
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
Refactor all callsites of our public `client` package such that they
instead use our internal packages. This ensures that we can stay agile
and refactor our internal APIs without breaking users of our public API.
|
|
|
|
|
|
With 3adbbfb5a (lint: Add linter for testhelper.Run, 2023-08-24) we
added a linter to detect if a package did not contain a `TestMain`
function. This was limited to checking non-test packages as each
analysis pass is self-contained and does not allow us to
cross-reference another package.
To allow us to reliably detect when a primary package does not have
tests, but its `_test` package does, start exporting a
`testhelperFact` that indicates if a package has a `TestMain` function.
When analyzing a `_test` package, we can import the fact of its related
package and prevent false positives.
|
|
lint: Add linter for testhelper.Run
Closes #5522
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6284
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Will Chandler <wchandler@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Will Chandler <wchandler@gitlab.com>
|
|
into 'master'
tools/protolint: Update module github.com/yoheimuta/protolint to v0.46.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6289
Merged-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
Our tests will check for leaked goroutines, but only if `testhelper.Run`
is called in the package being tested. A recent production outage was
caused by leaked goroutines which our tests did not catch as the package
did not use the required helper.
Create a custom linter to validate the following:
- Each package that has tests also contains a `TestMain`.
- `TestMain` calls `testhelper.Run`.
- `TestMain` is located in a file named `testhelper_test.go`.
One limitation is that the `_test` package is scanned in a separate pass
from the primary package, preventing us from validating that either the
primary package or its `_test` package has defined `TestMain`. By
default each analysis pass has no knowledge of what other packages have
or will be scanned.
To avoid accidentally requiring `TestMain` to be defined twice, we skip
linting any package with a name ending with `_test`. However, this
potentially leads to coverage gaps if all tests are in the `_test`
package. We would pass the primary package as it has no tests, and then
skip checking the test package based on its name, missing that it did
not execute `TestMain`.
A future iteration of this linter should use `Facts` to pass information
on package state between passes, but this first implementation gets us
90% of the value.
|
|
Currently `Matcher` will only match against selector expressions, e.g.
`fmt.Println`. A bare function call, e.g. `Println`, will not be
matched.
Update `Matcher` to handle both package qualified and bare function
calls.
Also, fix the test comment for `NewUnavailable` to include `want`. Prior
to updating `Matcher` this condition was not being tested and was
silently failing. We leave off the URL at the end of the report for ease
of matching, this was being interpreted as a regexp by the `analysis`
package and is a pain to escape properly.
|
|
Migrate the test-boot tool away from the gitlab-shell configuration in
favor of configuring the GitLab secret directly.
|
|
|
|
'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.54.2
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6269
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
into 'master'
tools/protolint: Update module github.com/yoheimuta/protolint to v0.45.1
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6255
Merged-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
|
|
|
|
golangci-lint v1.54 updates[0] the contract custom linters should use
from an `AnalyzerPlugin` interface to a
`New(any) ([]*analysis.Analyzer, error)` function. A deprecation warning
for the old API is occurring when executing `make lint`.
Update to the new API to silence the warning.
[0] https://github.com/golangci/golangci-lint/pull/3887
|
|
'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.54.1
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6213
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
This MR implements an analyzer to detect parameters of test helper
functions. testing.TB arguments should always be passed as first
parameter, followed by context.Context.
|
|
|
|
tools/goimports: Update module golang.org/x/tools to v0.12.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6193
Merged-by: Will Chandler <wchandler@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
|
|
|
|
tools/golangci-lint: Update module golang.org/x/tools to v0.11.1
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6167
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
|
|
|
|
|
|
|
|
The viper updates from v1.12.0 onwards breaks backward compatibility.
See https://github.com/spf13/viper/pull/1577. To keep the bot from
updating, let's update the exclude version.
|
|
tools/golangci-lint: Update module golang.org/x/tools to v0.11.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6034
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Approved-by: Christian Couder <chriscool@tuxfamily.org>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
tools/goimports: Update module golang.org/x/tools to v0.11.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6033
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
The `intercepted_method` option was used to mark a method as being handled
by Praefect. Since the operation type and scope annotations were mostly for
Praefect's proxy, marking a method as intecepted allowed for dropping the
annotations as they were not needed. As we've now annotated again the methods
that had the option set, let's remove the option as it is no longer needed.
|
|
|
|
|
|
tools/protoc-gen-go: Update module google.golang.org/protobuf to v1.31.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6011
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|