Age | Commit message (Collapse) | Author |
|
Add stackdriver profiler support with LabKit
See merge request gitlab-org/gitaly!1842
|
|
Change `make clean` to prune specific files
See merge request gitlab-org/gitaly!2015
|
|
Validate content of alternates file
Closes #2421
See merge request gitlab-org/gitaly!1946
|
|
During a review, we noticed that the implementation of GetSnapshot
did not work with relative paths but the tests did not catch it.
This commit adds additional test cases for relative paths and
absolute paths that go outside the repository directory.
|
|
Replaces the custom alternates parsing in GetSnapshot with a parser
that validates that the alternates are inside the storage root. Previously
GetSnapshot only walked the first alternate object directory. The new parser
returns multiple alternates if present so this modifies GetSnapshot to walk
possibly multiple alternate object directories.
This fixes a potential file inclusion vulnerability if the alternates file
refers to a directory outside the storage.
|
|
Validates that the alternate object directory is within the storage
root of the repository.
|
|
`lint` CI job doesn't require `image` configuration.
See merge request gitlab-org/gitaly!2012
|
|
Drop go 1.12 support
See merge request gitlab-org/gitaly!1976
|
|
`git clean -f` is pretty destructive and should only be run manually. I
accidentally nuked config files and Terraform state files by running
`make clean`.
|
|
Terraform: deduplicate gitaly instance definition
See merge request gitlab-org/gitaly!2002
|
|
|
|
Bumps Labkit version in order to be able to start
Gitaly / Praefect with the Go Profiler.
Once Gitaly is compiled with continuous profiling,
the profiler configuration can be set via GITLAB_CONTINUOUS_PROFILING
environment variable:
```shell
GITLAB_CONTINUOUS_PROFILING="stackdriver?service=gitaly&service_version=1.0.1&project_id=test-123 ./binary"
```
|
|
Praefect: Postgres queue implementation in use
Closes #2166
See merge request gitlab-org/gitaly!1989
|
|
Implementation of the replication events queue now can be
switched using `postgres_queue_enabled` between in-memory
and Postgres.
`Datastore` changed from interface to struct as there is no
single struct implementation for it anymore.
Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/2166
|
|
Bad test setup as a cause of the race failure
Closes #2592
See merge request gitlab-org/gitaly!1988
|
|
Local gitlab runner differs from one used for CI:
https://gitlab.com/gitlab-org/gitlab-runner/issues/4604
So there is no reason to have `image` configuration for
`lint` job. It still can be run locally with command:
`gitlab-runner exec docker --docker-image
registry.gitlab.com/gitlab-org/gitlab-build-images:
ruby-2.6-golang-1.14-git-2.24 lint`
|
|
Test setup for checking of replication events processing
was incorrect and it lead to failing tests from time to
time (especially with a race detector).
Use of properly initialized global gitay-ruby instance.
Right order of binaries preparation and config setup.
It is imbossible to use multiple Gitaly instances in one
or multiple tests because of global Config used throw the
project.
gRPC services must be registered before Serve call for it.
Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/2592
|
|
Check for git-linguist error code
See merge request gitlab-org/gitaly!1923
|
|
When running Git linguist on a repository, Gitaly tries to parse output
which is not intended to be parsed as the exit code might be
non-zero. Gitaly expect success on the command, and JSON output. On an
error, the output is an error message string, not in JSON.
This creates parsing errors, and issues like:
https://gitlab.com/gitlab-org/gitaly/-/issues/2294. The current change
checks the exit status of the command, where the expectation is that
linguist will never output invalid JSON if the exit code is zero.
Other cases will bubble up the error string in the error itself.
|
|
Remove gitaly-remote command
Closes #1706
See merge request gitlab-org/gitaly!1992
|
|
Since the gitaly-remote command was added in 22eb30d2 (Add gitaly-remote
binary to add or update remote URL, 2019-03-27), it didn't catch much
interest and is not really used anywhere. It does require us to do quite
some build hacks, though, because of its dependency on git2go and thus
indirectly on libgit2, and in fact building gitaly-remote does not
currently work. Furthermore, it breaks our gosec-sast job that performs
scanning for security vulnerabilities.
So given that we'd require additional hacks to keep gitaly-remote while
nobody really uses it, let's instead remove it and the git2go/libgit2
dependencies altogether.
|
|
Add JUnit style test reports
See merge request gitlab-org/gitaly!2005
|
|
|
|
Fix timer firing too frequently for localElector
See merge request gitlab-org/gitaly!2010
|
|
Somehow the timer got dropped in this refactor. This caused
the Gitaly process to ping the node too frequnently.
|
|
UserCreateTag: pass tag object to hooks when creating annotated tag
Closes #2541
See merge request gitlab-org/gitaly!1956
|
|
|
|
Praefect: Enable Postgres binary protocol
See merge request gitlab-org/gitaly!1995
|
|
Correct bare repository naming in tests
See merge request gitlab-org/gitaly!1951
|
|
Make `lint` independent from golangci-lint-alpine image
See merge request gitlab-org/gitaly!2000
|
|
Docker image that contains `golangci-lint` is not versioned
by Go version and does not make much sense for us by creating
report.
As result of moving to Go 1.14 we also need to update version
of `golangci-lint`. Otherwise it won't be run correctly.
Support for Go 1.14 included in
https://github.com/golangci/golangci-lint/releases/tag/v1.23.8
Changed to the latest 1.24.o release.
|
|
Define default image, and tags in .gitlab-ci.yml
See merge request gitlab-org/gitaly!1998
|
|
Move standard stream into its own internal package
See merge request gitlab-org/gitaly!1994
|
|
|
|
Explicitly check for existing repository in CreateRepositoryFromBundle
Closes #1376
See merge request gitlab-org/gitaly!1980
|
|
Refactor Praefect node manager
See merge request gitlab-org/gitaly!1940
|
|
Move logic for local-memory based elections into its own strategies in
preparation for supporting SQL and Consul-based strategies.
|
|
PgBouncer limits usage of placeholders in queries, because
it prepares statement first and execute it afterwards.
The problem could be if statement will be prepared using
one session, but executed using another session.
Binary format will issue only single operation without
preparing statement.
Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/2166
|
|
|
|
[ci skip]
|
|
Does not append the '.git' suffix to bare repositories.
|
|
When a repository already exists, CreateRepositoryFromBundle returns a
cryptic exit 128 error. We can check for this condition in the
RPC handler itself to give a better error message.
|
|
Make deprecation warnings a hard failure
See merge request gitlab-org/gitaly!1982
|
|
Enable client prometheus histogram
See merge request gitlab-org/gitaly!1987
|
|
We had several deprecation warnings in our code, which is why we
disabled these linting rules in our linter job and instead moved it to a
warnings-only job that is allowed to fail. As all of these warnings have
been fixed by now, let's remove that warnings-only job and re-enable
these linting rules in the main job again, making them a hard
requirement.
|
|
There are currently two deprecation warnings related to gRPC in the
balancer code for `conn.NewAddress()` and `conn.NewServiceConfig()`
which should both be replaced with calls to `conn.UpdateState()`
instead. The issue with `UpdateState()` though is that you can only
replace the complete state, that is both address and configuration, at
the same time. As we do not have both pieces of information ready when
calling `NewAddress()` and `NewServiceConfig()`, let's silence those
warnings for now to allow the linter to become warning-free.
|
|
Since having migrated to golangci-lint in 713d1e48 (Use golangci-lint
for static code analysis, 2020-02-06), there are two linting warnings
in `raw_changes_test.go` that ought to be ignored but arent due to using
the old "lint:ignore" syntax instead of the new "nolint:golint" one.
Adjust to use golangci-linter's syntax to fix these warnings.
|
|
Use reference counting in limithandler middleware
Closes #2588 and #2574
See merge request gitlab-org/gitaly!1984
|
|
In Praefect we want to instrument the client latency of requests going
to the internal gitaly nodes. To do so, we must enable the client
histogram explicitly.
|
|
Propagate GarbageCollect, RepackFull, RepackIncremental to secondary nodes
See merge request gitlab-org/gitaly!1970
|