Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)Author
2024-01-19Create new hook to export git trace 2 events in gitaly logsEmily Chui
2024-01-17fix: Fix a collection of typos found by typos-cliXing Xin
Fix typos found by typos-cli(https://github.com/crate-ci/typos). Some affected tests are adjusted. There are a bunch of other typos are ignored, including * CHANGELOG.md * NOTICE * internal/.../migrations/20201208163237_cleanup_notifications_payload.go * other intended typos or false positives Signed-off-by: Xing Xin <xingxin.xx@bytedance.com>
2024-01-05Merge branch 'qmnguyen0711/publish-development-gem' into 'master'Quang-Minh Nguyen
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>
2024-01-04Updating link because I removed Pajamas pageSuzanne Selhorn
2024-01-04Enhance Ruby's gem generation scriptQuang-Minh Nguyen
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.
2023-12-01doc: Add overview of Gitaly release processJames Liu
2023-10-11Apply 1 suggestion(s) to 1 file(s)Evan Read
2023-10-11doc: Add instructions on invoking gRPC endpoints locallyJames Liu
2023-09-08Update Gitaly CLI command help text with usage textEvan Read
2023-09-05docs: Stop mentioning libgit2Patrick Steinhardt
We don't use either Git2go nor libgit2 anymore, so let's stop mentioning it.
2023-09-05gitaly-git2go: Remove the now-unused commandPatrick Steinhardt
Remove the now-unused gitaly-git2o command as well as its supporting infrastructure.
2023-07-18docs: Add initial server-side backupsJames Fargher
Now that restore is supported by gitaly-backup we can add a more complete section on server-side backups.
2023-07-13Merge branch 'backup_server_side_adapter' into 'master'Toon Claes
Add server-side flag to gitaly-backup create See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6026 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Co-authored-by: James Fargher <jfargher@gitlab.com>
2023-07-12Switch to using backticks for multiline strings for many commandsEvan Read
2023-07-12Go back and update Gitaly CLI for new style guide updatesEvan Read
2023-07-10gitaly-backup: Add -server-side option to create sub-commandJames Fargher
This option triggers gitaly-backup to use the new BackupRepository RPC to create backups. These backups are streamed from the gitaly node directly to the object-storage configured in config.backup.go_cloud_url. Tests added for the command are smoke tests as the backup logic itself is tested on backup.Manager. Changelog: added
2023-06-20Merge branch 'restore_from_backup_id' into 'master'Justin Tobler
Restore to given backup ID Closes #5356 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5930 Merged-by: Justin Tobler <jtobler@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Reviewed-by: Evan Read <eread@gitlab.com> Co-authored-by: James Fargher <jfargher@gitlab.com>
2023-06-19gitaly-backup: Add backup-id option to restore commandJames Fargher
Allow the backup-id to be specified by the user. The manager backup ID used to be arbitrarily set to a timestamp. This matches what the create command does. It never used to matter because the backup ID was ignored on restore. Changelog: changed
2023-06-19Edit Praefect command usage stringsEvan Read
2023-06-12Merge branch 'eread/create-help-text-style-guide' into 'master'Andras Horvath
Create help text style guide for project See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5899 Merged-by: Andras Horvath <ahorvath@gitlab.com> Approved-by: Russell Dickenson <rdickenson@gitlab.com> Approved-by: Andras Horvath <ahorvath@gitlab.com> Reviewed-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com>
2023-06-12Create help text style guide for projectEvan Read
2023-06-12Document linting and improve documentation lintingEvan Read
2023-06-07Add configuration validation docsRaditya Surya
2023-05-16featureflag: Move into standalone packagePatrick Steinhardt
The feature flag logic is currently hosted inside of `internal/metadata/featureflag`. And while they do have something to do with metadata, they really are a standalone concept. Move the package to `internal/featureflag` to reflect this.
2023-05-16Apply 1 suggestion(s) to 1 file(s)Evan Read
2023-05-15docs: Add protobuf documentation gitlab pages linkJohn Cai
Add a link to our gitlab pages site that has generated HTML docs for each of our RPCs.
2023-05-10Complicates to complicateBrad Sevy
2023-04-25Merge branch 'pks-housekeeping-drop-fine-grained-rpcs' into 'master'Patrick Steinhardt
Remove fine-grained repository housekeeping RPCs Closes #4039 See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5654 Merged-by: Patrick Steinhardt <psteinhardt@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com>
2023-04-21global: Remove RepackFull RPCPatrick Steinhardt
The RepackFull RPC has been deprecated in favor of OptimizeRepository. Remove its Protobuf declaration and implementation. Changelog: removed
2023-04-21Minor documentation formatting updatesEvan Read
2023-04-20doc: Add trace2 integration docQuang-Minh Nguyen
Trace2 was integrated into Gitaly. It runs in production and offers great benefits for observability. This commit adds a technical documentation about this tool, especially how to implement a custom trace2 hook.
2023-04-14docs: Clean up small remainder from gitaly-ruby configToon Claes
2023-04-13Merge branch 'qmnguyen0711/add-tracing-doc' into 'master'Quang-Minh Nguyen
doc: Add a doc about using Jaeger for local development See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5628 Merged-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Approved-by: Evan Read <eread@gitlab.com> Approved-by: Justin Tobler <jtobler@gitlab.com> Reviewed-by: Evan Read <eread@gitlab.com> Reviewed-by: Quang-Minh Nguyen <qmnguyen@gitlab.com> Reviewed-by: Justin Tobler <jtobler@gitlab.com>
2023-04-13doc: Add a doc about using Jaeger for local developmentQuang-Minh Nguyen
Distributed tracing and Jaeger are powerful tool. They are integrated deep into Gitaly and other services at GitLab. Unfortunately, the adoption at GitLab is not high. This commit adds a development doc to get started with using Jaeger for Gitaly local development.
2023-04-12Merge branch 'toon-no-moar-rspec-docs' into 'master'James Fargher
docs: Remove rspec from the beginner's guide See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5617 Merged-by: James Fargher <proglottis@gmail.com> Approved-by: Evan Read <eread@gitlab.com> Approved-by: James Fargher <proglottis@gmail.com> Reviewed-by: Evan Read <eread@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com> Co-authored-by: Toon Claes <toon@gitlab.com>
2023-04-11Apply 4 suggestion(s) to 1 file(s)Evan Read
2023-04-06doc: Mention the use of GDK for Praefect testingToon Claes
When using GDK it's even easier to set up a Postgres database, so document this.
2023-04-06docs: Remove rspec from the beginner's guideToon Claes
We no longer have rspec tests (in use), so remove documentation about those. While at it, restructure the text a bit.
2023-04-06config: Remove ruby configurationToon Claes
2023-03-29docs: Remove gitaly-ruby from docsToon Claes
There is no sidecar no more, so no need to have docs about it.
2023-03-20doc: Add gRPC load balancing documentationQuang-Minh Nguyen
2023-03-15docs: Document Gitaly major module versionJohn Cai
We've gone back and forth about whether or not to remove the major version in Gitaly. We decided that we will not. Here's a brief history and background as to why.
2023-03-13Cgroups: add cpu_quota_us limitSteve Azzopardi
What --- - Add a new configuration under `cgroups` called `cpu_quota_us` to configure `cfs_quota_us` for the parent cgroup https://docs.kernel.org/scheduler/sched-bwc.html?highlight=cfs_quota_us - Add a new configuration under `cgroups.repositories` called `cpu_quota_us` to configure `cfs_quota_us` for the repository cgroup https://docs.kernel.org/scheduler/sched-bwc.html?highlight=cfs_quota_us - Add metrics - `gitaly_cgroup_cpu_cfs_periods_total`: Read from `cpu.stat` nr_periods https://docs.kernel.org/scheduler/sched-bwc.html#statistics - `gitaly_cgroup_cpu_cfs_throttled_periods_total`: Read from `cpu.stat` nr_throttled https://docs.kernel.org/scheduler/sched-bwc.html#statistics - `gitaly_cgroup_cpu_cfs_throttled_seconds_total`: Read from `cpu.stat` throttled_time https://docs.kernel.org/scheduler/sched-bwc.html#statistics - Add more test coverage when only specific values are set. Why --- At the moment we limit memory and CPU via [`cpu.shares`](https://kernel.googlesource.com/pub/scm/linux/kernel/git/glommer/memcg/+/cpu_stat/Documentation/cgroups/cpu.txt) which will only throttle a cgroup when there is contention on the CPU. This means that potentially a single repository can still hog all of the CPU on a gitaly node. We've seen a case of this in https://gitlab.com/gitlab-com/gl-infra/production/-/issues/8318, a single repository saturated the CPU, and the scheduler couldn't balance the CPU for other tasks/requests to be scheduled. We hoped CPU shares would be enough, but we need an upper CPU quota for gitaly cgroups so no single repository can fully saturate the CPU. There are a few concerns that are addressed Concern 1: cfs_period_us `cfs_period_us` is used to calculate the `cfs_quota_us` (what we are setting now), the default value seems to be [hardcoded](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kernel/sched/fair.c?h=v5.15.92#n5492) but the Linux kernel but this can be updated, so Gitaly is explicitly settings this to 100ms (default value) Concern 2: not using `cfs_burst_us` This could allow for CPU bursts, even when they exceed the `cfs_quota_us`, we don't set this because it's available on the newer kernel versions (5.15). The way users can avoid throttling is by oversubscribing `cfs_quota_us` Concern 3: Wasting available resources When the user sets these we'll be artificially limiting the CPU that they consume, this can leave performance on the table when a repository is using all its quota, and no other process is using the CPU. This is the only drawback and one we are willing to take since it adds more reliability in the long run. We can reduce the effect of this by oversubscribing. Concern 4: Observability The kernel already exports [stats](https://docs.kernel.org/scheduler/sched-bwc.html#statistics) which Gitaly exposes as, and also [cadvisor](https://github.com/google/cadvisor/blob/master/docs/storage/prometheus.md#prometheus-container-metrics) Reference: https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/17332 Changelog: added Signed-off-by: Steve Azzopardi <sazzopardi@gitlab.com>
2023-03-02docs: Update gitaly-backup docs for -remove-all-repositoriesJames Fargher
2023-02-13gitaly-backup: Use pointer layout by defaultJames Fargher
gitlab has been using the pointer layout since 15.3. See https://gitlab.com/gitlab-org/gitlab/-/issues/355945 Changelog: changed
2023-01-09limithandler: Fix queueing mechanism in the concurrency limiterPatrick Steinhardt
The concurrency limiter has two different mechanisms: 1. Callers first get put into a queue that is global across all limiting keys. This queue is depth- and time-limited, which means that callers will get rejected if it is full and will be evicted when they took too long to acquire the concurrency token. 2. The concurrency limit itself that will only allow a set number of callers at the same time. This functionality is per limiting key. While the intent is usually to concurrency-limit either by user or by repository, this is sabotaged by the fact that the queue is key-agnostic and thus global. So even if almost all calls would apply to a single repository only, if the queue is enabled and full then it would become impossible to invoke the function for any other repository now. As a result the queue is rather useless as a concurrency-limiting primitive. But there is another big design flaw: as callers need to be in the queue to obtain the concurrency-limiting token, and the number of callers in the queue is strictly limited, we essentially have a global concurrency limit to obtain the concurrency-limiting tokens. Suppose you have two calls to a function that has a maximum queue depth of 1 and two calls to this function at the same time. Even if the concurrency limit would now theoretically allow for both functions to run at the same time, there is a race window where both callers might try to enter the queue at the same point in time. If this race is lost, then one of both callers will be rejected due to the queue being full while the other one is trying to obtain the concurrency token. This issue in fact surfaces in our tests, where the `TestStreamLimitHandler` test is frequently failing because the race is often lost. This second design flaw cannot easily be fixed while the queue remains global: we need to remain in the queue when trying to acquire the concurrency token, or otherwise it wouldn't really be limiting anything at all. Convert the queue to be per-key so that each resource identified by a key essentially has its own queue. This fixes both issues: - If the queue is full then we only limit access to the specific resource for which it is full. This makes the queueing mechanism useful again. - We can now change the queueing logic to allow as many callers into the queue as the concurrency limit would allow _plus_ the allowed depth of the queue itself. This fixes the race described aboved. Changelog: fixed
2022-12-14tests: Remove unneeded seed repositoriesPatrick Steinhardt
Remove infrastructure to clone the "gitlab-test-mirror.git" and "gitlab-git-test.git" seed repositories. They are not used anymore.
2022-11-30doc: Document `make help` target in the beginners guidePatrick Steinhardt
While we already have some advice in our beginners guide about how to use our Makefile, it doesn't hint at the available `make help` target. Mention it so that users can discover by themselves what other targets exist.
2022-11-25Update feature flag documentationQuang-Minh Nguyen
After https://gitlab.com/groups/gitlab-org/-/epics/8005 yields some early results, the way we use feature flag changes. Now Gitaly fully supports feature flag actors. Although the set of supported actors are the same, the way we intercept them is a bit different from GitLab Rails This commit updates the feature flag documentation: * Add overall architecture and explains how a flag is propagated around * Add FF Development guideline * Add new rollout strategies Changelog: other Co-authored-by: John Cai <jcai@gitlab.com> Co-authored-by: Evan Read <eread@gitlab.com>
2022-11-17Merge branch 'doc/update_GIT_VERSION_doc' into 'master'Christian Couder
Document Gitaly Git distribution method See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4864 Merged-by: Christian Couder <chriscool@tuxfamily.org> Approved-by: Patrick Steinhardt <psteinhardt@gitlab.com> Co-authored-by: Siddharth Asthana <siddharthasthana31@gmail.com>