Age | Commit message (Collapse) | Author |
|
We want to utilize the newly added `--batch-command` flag in
git-cat-file(1). This is introduced in v2.36.0. So as a precursor to the
actual code change, let's bump the git version first.
Changelog: deprecated
|
|
featureflag: Ensure to only contain valid characters
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4793
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Co-authored-by: blanet <moweng.xx@alibaba-inc.com>
|
|
metrics: Remove Praefect read-only metric
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4858
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Will Chandler <wchandler@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Co-authored-by: Justin Tobler <jtobler@gitlab.com>
|
|
go: Update module github.com/jackc/pgx/v4 to v4.17.2
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4865
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: James Fargher <proglottis@gmail.com>
Co-authored-by: GitLab Renovate Bot <gitlab-bot@gitlab.com>
|
|
praefect: Read line-by-line in track-repositories
See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4855
Merged-by: John Cai <jcai@gitlab.com>
Approved-by: Justin Tobler <jtobler@gitlab.com>
Approved-by: John Cai <jcai@gitlab.com>
Co-authored-by: Will Chandler <wchandler@gitlab.com>
|
|
|
|
go: Update module github.com/pelletier/go-toml/v2 to v2.0.5
See merge request gitlab-org/gitaly!4856
|
|
Add #gitaly-alerts to team member onboarding template
See merge request gitlab-org/gitaly!4859
|
|
|
|
Log only mode for new repository calculation methods
Closes #4447
See merge request gitlab-org/gitaly!4848
|
|
Use the disk usage formatting directive to calculate the repository size
using cat-file. Also change the logging statement to log the bytes,
rather than kilobytes for the sake of clarity.
|
|
go: Update module google.golang.org/grpc to v1.49.0
See merge request gitlab-org/gitaly!4853
|
|
go: Update github.com/ProtonMail/go-crypto digest to 4b6e5c5
See merge request gitlab-org/gitaly!4847
|
|
blob: Standardize returned errors
See merge request gitlab-org/gitaly!4849
|
|
We should use %w for the error wrapping. That will
allow us to unwrap the error without loosing any context.
It is not use right now, but maybe in the future if we need
to change response based on the returned error in the chain
of interceptors.
And one simplification from fmt.Errorf() to errors.New().
|
|
In some cases error returned by RPC methods are prefixed with
its names. This is redundant as the caller knows exactly what
method is called and also the log entry always contains full
method name including service name. Instead, the prefixes for
errors in some cases were added to better describe what operation
failed. It should help to better navigate to the reason of the
error.
|
|
Replace different representation of the missing repository
argument error with the pre-defined ErrEmptyRepository.
Fix order of arguments validation with localrepo creation in GetBlob.
Replace status.Error(f) with helper.ErrXXX to have a common pattern
and omit possible double-wrapping of the gRPC Status.
|
|
Name of a feature flag must contain at least 2 characters. Can only
contain lowercase letters, digits, and '_'. Must start with a letter,
and cannot end with '_'.
Feature flag name would be used to construct the corresponding metadata
key, so:
- Only characters allowed by grpc metadata keys can be used and
uppercase letters would be normalized to lower, see
https://pkg.go.dev/google.golang.org/grpc/metadata#New
- It is critical that feature flags don't contain a dash, because the
client converts dashes to underscores when converting a feature flag's
name to the metadata key, and vice versa. The name wouldn't round-trip
in case it had underscores and must thus use dashes instead.
Signed-off-by: blanet <moweng.xx@alibaba-inc.com>
Helped-by: John Cai <jcai@gitlab.com>
Changelog: fixed
|
|
The %(objectsize:disk) formatting directive is useful for calculating
the amount of disk space that an object takes up. Add this as an option.
|
|
The RepositorySize is a high risk API, since an inaccurate number
(especially if it's much higher) can cause projects to be locked due to
usage quotas. In order to safely roll out a new calculation, add a log
only mode such that a feature flag has to be enabled in order to send
the value back to the Rails client. Without this feature flag, we merely
log the new calculation and continue to send the value calculated with
du.
|
|
README.md: Update minimum Go version
See merge request gitlab-org/gitaly!4857
|
|
The `gitaly_praefect_read_only_repositories` metric has been renamed to
`gitaly_praefect_unavailable_repositories` and is deprecated. This
change removes all references to the deprecated metric.
|
|
Our minimum Go version is now 1.17. Update the README to reflect this.
|
|
Remove snowman parameters from links to issues URL
Closes #4442
See merge request gitlab-org/gitaly!4830
|
|
|
|
[ci skip]
|
|
With e22d809f6 (praefect: Read line-by-line in track-repositories,
2022-09-01), `track-repositories` now has a hard requirement that each
input line contain the details of one and only one repository.
Refer to repos by line in user-facing output and our internal
variables, instead of the slightly unwieldy terms 'item' or 'reqNum'.
|
|
When parsing invalid input `json.Decoder` may go into an infinite loop
and consume an unbounded amount of memory. Admins who accidentally pass
a badly formatted file to `track-repositories` are at risk of
accidentally triggering OOM kills as a result.
To mitigate this risk, let's read the input line-by-line and then
attempt to unmarshall it, which will gracefully fail on invalid JSON.
This does prevent us from checking for unexpected fields in the input,
but so long as the expected fields are present extra data isn't a
problem.
|
|
praefect: Add `track-repositories` command
See merge request gitlab-org/gitaly!4845
|
|
A somewhat common way to migrate to Gitaly Cluster it to copy the
contents of an existing storage onto one node of the cluster and
manually track each repository. This is convenient for instances where
the migration must happen as a single 'big bang' with some downtime, vs
the zero-downtime, but much slower method of migrating via the API.
Currently admins can script the `track-repository` to run in a loop when
ingesting large numbers of repositories, but this is inconvenient and
error-prone. To better support this use case, a way to import
repositories in-bulk into Praefect is needed.
This commit add a new `track-repositories` subcommand that takes a JSON
file as input and adds each entry in a single execution.
Changelog: added
|
|
In preparation for a new Praefect subcommand that will track many
repositories in a single request, convert `track-repository` to use a
`trackRepositoryRequest` struct internally.
This will allow us to re-use this code when looping over multiple
requests.
|
|
Currently most output from the `track-repository` subcommand is made via
the commands writer, but a subset is done via logger. This leads to an
inconsistent format where some output is plaintext, while other messages
are in JSON, which is difficult to read.
Let's make this consistent by making all non-debug output use the
writer, which will be simpler to parse for a one-off CLI command.
|
|
Correct spelling of 'executed' in help string for `track-repository`
subcommand.
|
|
Address client issues
Closes #3206
See merge request gitlab-org/gitaly!4846
|
|
|
|
|
|
ruby: Update dependency gitlab-labkit to '~> 0.24'
See merge request gitlab-org/gitaly!4664
|
|
Simplify response type of FindLocalBranches
See merge request gitlab-org/gitaly!4850
|
|
template: Update issue templates
See merge request gitlab-org/gitaly!4837
|
|
[ci skip]
|
|
[ci skip]
|
|
[ci skip]
|
|
README: Add Praefect walkthrough video to training section
See merge request gitlab-org/gitaly!4852
|
|
|
|
New Gitaly team members need access to both Zendesk and gitaly ruby gem.
This change adds these requests to the onboarding issue template.
|
|
The `#g_create_gitaly` Slack channel has been renamed to `#g_gitaly`.
This change updates the feature flag and onboarding issue templates
accordingly.
|
|
[ci skip]
|
|
Do not assume client users want the same tracing interceptors with the same configuration.
|
|
|
|
Using a feature flag 'SimplifyFindLocalBranchesResponse', let's add
'LocalBranches' to the 'FindLocalBranchesResponse' structure. After the
rollout we'll deprecate the usage of 'Branches' field and only use
'LocalBranches'.
Modify the tests to accommodate this new flag.
|