Age | Commit message (Collapse) | Author |
|
The ApplyPatch RPC was using a default branch heuristic instead of
directly using HEAD.
|
|
'master'
Switch to using backticks for multiline strings for many commands
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6059
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Evan Read <eread@gitlab.com>
|
|
|
|
git: Implement new function to validate reference names
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6018
Merged-by: Sami Hiltunen <shiltunen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Sami Hiltunen <shiltunen@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
Update Gitaly's Team Member Onboarding.md
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5995
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Approved-by: Furhan Shabir <fshabir@gitlab.com>
Co-authored-by: Andras Horvath <ahorvath@gitlab.com>
|
|
Ensure backup.Sink get cleaned up properly
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6046
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: John Cai <jcai@gitlab.com>
Co-authored-by: James Fargher <jfargher@gitlab.com>
|
|
Don't assert repository paths in errors in tests
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6023
Merged-by: Will Chandler <wchandler@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: Sami Hiltunen <shiltunen@gitlab.com>
|
|
This allows removing the goroutine detection exception.
|
|
GoCloud requires that Close be called to properly clean up resources. In
order to do that we need to add Close to the backup.Sink interface.
For best practice, all direct uses of backup.FilesystemSink now also
call Close despite being a no-op.
|
|
'master'
Go back and update Gitaly CLI for new style guide updates
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6047
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Lorena Ciutacu <lciutacu@gitlab.com>
Reviewed-by: Evan Read <eread@gitlab.com>
Reviewed-by: Justin Tobler <jtobler@gitlab.com>
Reviewed-by: Lorena Ciutacu <lciutacu@gitlab.com>
Co-authored-by: Evan Read <eread@gitlab.com>
|
|
|
|
Refactor limithandler package
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6038
Merged-by: James Fargher <jfargher@gitlab.com>
Approved-by: James Fargher <jfargher@gitlab.com>
Reviewed-by: James Fargher <jfargher@gitlab.com>
Reviewed-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
|
|
Add UserRebaseToRef RPC
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5956
Merged-by: karthik nayak <knayak@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Reviewed-by: Hordur Freyr Yngvason <hfyngvason@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Hordur Freyr Yngvason <hfyngvason@gitlab.com>
|
|
|
|
go: Update module golang.org/x/crypto to v0.11.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6041
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>
|
|
operations: Implement UserCherryPick in pure git
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6000
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: Toon Claes <toon@gitlab.com>
|
|
cgroup: Add support for cgroups v2
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5547
Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: Steve Xuereb <sxuereb@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: ZheNing Hu <adlternative@gmail.com>
|
|
Recently, all limiter logic locate in limithandler middleware package
(internal/grpc/middleware/limithandler). Technically speaking, this
package is not the right location. The limiters include Per-RPC
concurrency limiter, Per-RPC rate limiter, and pack-objects limiter. The
pack-objects limiter is not a part of gRPC middleware. We plan to create
some more limiters and advance them with adaptive limiters.
This commit extracts the core limiter functionalities out of the
limithandler package. The new location for them is at internal/limiter.
The ones that belong to gRPC middleware stay intact.
|
|
Limithandler has a dedicated utility to store gRPC log fields. This
utility suite consists of a recorder, a FieldsProducer, and two
interceptors to plug in gRPC server. customfields can provide the same
service. It was built for general purposes. Hence, there is no reason to
keep both of them. This commit removes limithandler's dedicated stats
handler in favor of customfields.
|
|
`customfields` is an utility helper for attaching custom fields to gRPC
logs. Recently, it supports logging metadata whose keys and values are
string types only. This commit expand its ability to log data with any
type. Eventually, the custom fields are converted to `logrus.Fields`
type, which support any type already.
|
|
.gitlab-ci.yml: Add rails job
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5937
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: John McDonnell <jmcdonnell@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Reviewed-by: Will Chandler <wchandler@gitlab.com>
Reviewed-by: Lin Jen-Shin <jen-shin@gitlab.com>
Reviewed-by: Nao Hashizume <nhashizume@gitlab.com>
|
|
go: Update module google.golang.org/protobuf to v1.31.0
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6005
Merged-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
Adding a job to run the full rails suite of tests. This allows
developers to trigger the job to see if their changes pass the rails
test suite.
We have three jobs to accomplish this. First, start-rails-specs will
create a branch and modify the GITALY_SERVER_VERSION on it. Then,
rails-specs will run the Rails test suite on that branch. Finally,
rails-specs-cleanup will delete that branch.
|
|
Some errors include the repository's relative path in the error
metadata and assert the metadata for equality. This is not ideal
as the relative path is an internal storage detail and should not
be asserted against elsewhere as we are now doing in handler tests.
These tests will all fail when the relative path is rewritten. Address
this by overriding the relative path field when constructing intecepted
metadata. This way the key's existence in the error metadata is asserted
but not the actual contents of the key.
It would be better to fix the problem in a less magical way but there's
a large number of tests that are asserting the relative paths for equality.
Fix these tests for now by overriding the value. We can later fix the tests
one by one to not assert the relative path to remove this.
|
|
|
|
As the metrics detected by Prometheus in cgroups V1 and V2
are basically the same but slightly different, the initialization
of all V1/V2 metrics is put into metrics.go. This makes the
code cleaner and easier to observe the differences between
the detection meterics of V1 and V2.
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
|
|
Due to the lack of cgroup V2 support in Gitaly, some operating systems
that use cgroup V2 may not be able to use cgroups in Gitaly properly.
Therefore, this patch adds support for cgroup V2 in Gitaly, which maintains
a similar interface to cgroup V1 but removes the
"gitaly_cgroup_memory_reclaim_attempts_total" metric and modifies the label
of the "gitaly_cgroup_procs_total" metric compared to V1.
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
|
|
Danger: Do not label devops::systems indiscriminantly
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6035
Merged-by: Andras Horvath <ahorvath@gitlab.com>
Approved-by: Andras Horvath <ahorvath@gitlab.com>
Co-authored-by: John Cai <jcai@gitlab.com>
|
|
We're preparing to add V2 implementation for cgroup. Since
cgroup V1 and V2 have similar implementation logic, we've
extracted the common logic into the cgroupHandler interface,
and implemented CGroupManager that satisfies the original
Manager interface, which internally uses the cgroupHandler
interface. Currently, only V1 implementation is available.
To be compatible with non-Linux environments, we've added
a Noop CgroupManger implementation in manager.go by specifying
a build tag for non-Linux operating systems. We've also
ensured that the existing multiple test files can only run
on Linux by specifying the linux operating system in the build tags.
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
|
|
.gitlab-ci.yml: Skip tests for non code changes
Closes #5419
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5997
Merged-by: Will Chandler <wchandler@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Co-authored-by: John Cai <jcai@gitlab.com>
|
|
housekeeping: Always enable geometric repacking strategy
Closes #5031
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6031
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: Patrick Steinhardt <psteinhardt@gitlab.com>
|
|
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>
|
|
Fix broken test GetCustomHooks_nonExistentHooks
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6020
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: James Fargher <jfargher@gitlab.com>
Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
|
|
operations: Remove CommitFilesInGit feature flag
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5984
Merged-by: Toon Claes <toon@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
Co-authored-by: John Cai <jcai@gitlab.com>
|
|
There wasn't any test coverage for cherry-picking a commit which has
more than one parent. This change adds that.
The added test has the following `git-log`:
* 2905b7e (cherry-picking-dst) Cherry-picking a04f7be
| create mode 100644 c
| create mode 100644 d
* a4da336 add zucchini
| create mode 100644 z
| * a04f7be merge coconut & dragon fruit into banana
| |\
| | * 1a9b416 add dragon fruit
| | | create mode 100644 d
| | * 77b3f23 add coconut
| |/ create mode 100644 c
|/|
| |
| * ecd2b2c add banana
|/ create mode 100644 b
|
* 80765b6 (HEAD -> main) add apple
create mode 100644 a
|
|
To be sure a bunch of commits can be cherry-picked in reserve order a
test is added.
|
|
Because there's a pure git implementation of UserCherryPick, we can use
it with SHA256 repositories. These changes enable use of SHA256 repos
and test it when using pure git.
These changes also include a few cleanups to make the tests a bit more
consistent.
|
|
Implement the UserCherryPick RPC using pure git commands, using
git-merge-tree(1) more specific.
This change is still behind a feature flag[1].
[1]: https://gitlab.com/gitlab-org/gitaly/-/issues/5421
Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/4574
Changelog: changed
Milestone: 16.2
Label: maintenance::refactor
|
|
A new config option for localrepo.MergeTree allows the caller to set the
merge base, which is passed to git-merge-tree(1) with the argument
--merge-base.
|
|
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>
|
|
Add missing fsyncs
Closes #5072
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5999
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Sami Hiltunen <shiltunen@gitlab.com>
Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
|
|
Currently we add the devops::systems label irregardless of what group
the author is part of. triage-ops already takes care of applying labels
based on the MR author so this ends up being noisy and unnecessary.
Let's just not set devops::systems since triage-ops already sets the
group label.
|
|
Add operation type annotations on RemoveAll
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6030
Merged-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Co-authored-by: Sami Hiltunen <shiltunen@gitlab.com>
|
|
We don't need the full pipeline to run for things in the .gitlab/
folder, nor any documentation in .md files. Create a rule to skip tests
if we detect such files.
|
|
|
|
We have converted all callsites of `CheckRefNameFormat()` to instead use
`git.ValidateReference()`, which is both more efficient and has better
error reporting. So let's drop `CheckRefNameFormat()`.
|
|
Convert the localrepo package to use `git.ValidateReference()` instead
of `git.CheckRefNameFormat()`. The new function is more efficient as it
doesn't spawn an external process.
|
|
Convert the storage manager logic to use `git.ValidateReference()`
instead of `git.CheckRefNameFormat()`. The new function is more
efficient as it doesn't spawn an external process and can thus be used
to catch all invalid reference names up front.
Note that this also allows us to significantly clean up our tests.
Before we used to rely on git-update-ref(1) to catch many of the edge
cases, and thus the errors differred depending on whether they were
raised by our own verification or via the `updateref` package. Now we
always get errors via our own verification, which makes the tests a lot
more straight forward.
|
|
While we already provide `git.CheckRefNameFormat()` to verify the format
of reference names, this function relies on git-check-ref-format(1) to
do the verification for us. It is thus not usable as a general purpose
function as it is simply too expensive to run once per reference we are
to verify.
As a first step towards a fix this commit introduces a new function that
performs thorough validation of reference names inside Gitaly itself.
The function aims to be a faithful reimplementation of what Git does and
catch the exact same edge cases.
Subsequent commits will convert callsites of `CheckRefNameFormat()` to
instead use this new function.
|
|
Introduced generic error metadata and improve updateref errors
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6029
Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Approved-by: karthik nayak <knayak@gitlab.com>
Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com>
Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com>
Reviewed-by: karthik nayak <knayak@gitlab.com>
|