Age | Commit message (Collapse) | Author |
|
This commit utilizes the newly added 'UserCreateBranchError' in the
'UserCreateBranch' function. Since this replaces the old behavior and is
a breaking change because the old behavior would return StatusOk with
the error ingrained, we add this functionality behind a feature flag
introduced in the previous commit (1117a3665).
|
|
Add a new flag to control the release of 'UserCreateBranchError' which
was introduced in the previous
commit (2d7e0ee3598caa9b127864c6bd8956ae80a9b8a9).
This flag will be used in the upcoming commits to enable the use of this
struct and eventually be deprecated once the struct is released and
adopted.
|
|
Add a new message type `UserCreateBranchError`, which will be used to
provide structured errors for the `UserCreateBranch` RPC. This will be
released behind a feature flag.
Currently this structure only holds a single data type within it, i.e.
`CustomHookError`. Potentially can be extended in the future.
Run `make proto` to generate the related proto files from this.
Signed-off-by: Karthik Nayak <knayak@gitlab.com>
|
|
go: Update module gocloud.dev to v0.26.0
See merge request gitlab-org/gitaly!4808
|
|
feat(gitaly-git2go): sign commits with OpenPGP key
See merge request gitlab-org/gitaly!4802
|
|
|
|
Update maintainers
See merge request gitlab-org/gitaly!4838
|
|
STYLE.md: Discourage the use of seed repos for test data
Closes #4308
See merge request gitlab-org/gitaly!4799
|
|
[ci skip]
|
|
|
|
|
|
license: Extend license find response with additional data
Closes #3782
See merge request gitlab-org/gitaly!4198
|
|
To remove the Licensee gem and replace it with the
go-license-detector package, in a previous commit, we extended
the interface of the FindLicense RPC to return additional
license details. Because implementations are different they
produce a bit different results for the same input. Let's try
to make it as much consistent as possible by adjusting
the license identifier (to lower-case) and the nickname
(we use a hardcoded dictionary of license id to nickname).
Because the changes we contributed to the
github.com/go-enry/go-license-detector package
are not yet applied by the maintainers, let's use a fork of it
with the changes we need. Once they are merged, we should update
the dependency.
Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/3782
|
|
Gitaly uses the Licensee gem to find the license used in a
repository and return the corresponding license identifier
to GitLab. GitLab uses the same Licensee gem to get additional
info about the license using the identifier to show it on
the UI. Go and Ruby implementations of the FindLicense RPC
rely on different algorithms for license detection and the
set of licenses that could be detected are different as well,
that is why they are not fully compatible. Let's extend
FindLicenseResponse with additional fields, so GitLab
doesn't need to get that info from the Licensee gem anymore.
It solves the problem of the compatibility of the two
implementations.
Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/3782
|
|
[ci skip]
|
|
[ci skip]
|
|
[ci skip]
|
|
Prune old cgroup directories
See merge request gitlab-org/gitaly!4760
|
|
Attempt to prune old cgroups directories on startup. On shutdown, we
attempt to clean the cgroups. However, this code is far down. Move it closer so
it's easier to follow.
|
|
Now that we have a GetGitalyProcessTempDir() function, call it to get
the name of the cgroup directory.
|
|
Add a helper function to specifically clean out old cgroups from both
the memory and cpu subsystems.
|
|
To make testing easier, inject the current running pid into the cgroup
manager instead of having the cgroup manager call the global
os.Getpid(). This way, tests become safer from flakes.
|
|
When pruning old directories, we want to prune as many as we
can. We don't want to bail early as soon as there is an issue
with one of the entries. For instance, we will error out
and stop trying to prune if there's an error trying to find
the pid.
We can simplify the code to just log the error and continue
each time.
|
|
Pruning directories is a common operation. Currently it's used for
pruning Gitaly runtime directories. However, Cgroup directories are made
according to the same convention as Gitaly runtime directories in the
form of gitaly-<pid>. Instead of reproducing the logic, simply rename
the function so it can be reused.
To do this, we also need to encapsulate the logic that constructs the
name of a process directory and the logic that parses out the pid from
such a directory into functions.
|
|
'qmnguyen0711/4440-repository-searchfilesbyname-doesn-t-work-well-with-non-ascii-file-names' into 'master'
Fix bug that Repository SearchFilesByName doesn't work well with non-ASCII file names
See merge request gitlab-org/gitaly!4827
|
|
gitlab: Copy client code from `gitlab-shell`
Closes #4341
See merge request gitlab-org/gitaly!4819
|
|
Repository SearchFilesByName doesn't work well with non-ASCII file
names. Underlying, this RPC uses git-ls-tree to get the file names. Git
automatically escapes non-ASCII characters and add the quotes around the
paths. Git defines this behavior with core.quotePath option.
SearchFilesByName did not handle this case well. The solution is to
force git-ls-tree to use NULL-byte termination.
Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/4440
Changelog: fixed
|
|
These files were directly copied over from 'gitlab-shell' in
823a6893bb4275f7d21035a34c778317af7d3d16. Let's fix the linter issues
pre-existing in these files.
|
|
Instead of using the external 'client' package from 'gitlab-shell', use
the internally created one 'internal/gitlab/client'. This drops the
dependency on 'gitlab-shell'.
Run 'go mod tidy' to remove the dependency on 'gitlab-shell' from our
'go.{mod, sum}' files.
|
|
Currently 'gitlab-shell' contains the code for the gitlab client. We use
this in our 'gitaly' code, but this causes a cyclic dependency since
'gitlab-shell' also imports parts of our code.
To remove this cyclic dependency, we decided to move most of the code
in-house. In this commit we do this by copying over the following files:
1. gitlabnet.go
2. httpclient.go
from 'gitlab-shell' without modification to a new 'client' package under
'internal/gitlab'.
We do not copy over the tests, since our repo has its own helpers for
tests which we'll leverage to rewrite the tests.
|
|
go: Update module github.com/pelletier/go-toml to v2
See merge request gitlab-org/gitaly!4652
|
|
With this change we upgrade go-toml to v2. This includes changing the
import paths to include v2.
|
|
go-toml v2 forces us to use `TextMarshaller` and this means we now need
the Duration wrapper in several packages. To prevent import loops, this
requires moving the type to its own package.
|
|
It's annoying to keep the list of maintainers up-to-date, so just refer
to the group of maintainers.
|
|
Specify who needs to give approval on Merge Requests.
|
|
doc: Fix incorrect dashboard URLs
See merge request gitlab-org/gitaly!4824
|
|
'master'
go: Update module gitlab.com/gitlab-org/gitlab-shell/v14 to v14.11.0
See merge request gitlab-org/gitaly!4832
|
|
ruby: Update dependencies
Closes #4430 and #4371
See merge request gitlab-org/gitaly!4826
|
|
[ci skip]
|
|
Currently the README has two images which also serve as hyperlinks, this
is confusing cause its not obvious. Let's make them explicit.
|
|
Update `rails-html-sanitizer` and `addressable` gems to remediate
securitiy vulnerabilities.
|
|
Add support for MulanPSL-2.0 in license detection
See merge request gitlab-org/gitaly!4825
|
|
Revert "config: Set autocrlf to false"
See merge request gitlab-org/gitaly!4833
|
|
This reverts commit d0e60a800ddadd6531a5c4030d86b09564004a21. Due to an
issue with some tests in the main GitLab project this commit needs to be
reverted to unblock the update flow and allow time for further
investigation.
|
|
Remove custom duration type
See merge request gitlab-org/gitaly!4829
|
|
|
|
gitaly: Exit code 1 on error
Closes #4238
See merge request gitlab-org/gitaly!4821
|
|
Back in the day, a custom duration type was added to Gitaly's config
package as the TOML parser used didn't support parsing duration types
natively. The TOML parser used these days supports the native
time.Duration type of Go. Remove the custom type and update all sites
to use the native duration type.
|
|
Update rack and rouge gems to match GitLab Rails
See merge request gitlab-org/gitaly!4817
|
|
go: Update Postgres dependencies
See merge request gitlab-org/gitaly!4818
|