You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If no `GITALY_CONNECTION_INFO` is set, the test suite will still run, but any
102
-
tests requiring Gitaly will be skipped. They will always run in the CI
103
-
environment.
104
-
105
-
## Logging Guidelines
106
-
107
-
In general, it should be possible to determine the structure, but not content,
108
-
of a gitlab-shell or gitlab-sshd session just from inspecting the logs. Some
109
-
guidelines:
110
-
111
-
- We use [`gitlab.com/gitlab-org/labkit/log`](https://pkg.go.dev/gitlab.com/gitlab-org/labkit/log)
112
-
for logging functionality
113
-
-**Always** include a correlation ID
114
-
- Log messages should be invariant and unique. Include accessory information in
115
-
fields, using `log.WithField`, `log.WithFields`, or `log.WithError`.
116
-
- Log success cases as well as error cases
117
-
- Logging too much is better than not logging enough. If a message seems too
118
-
verbose, consider reducing the log level before removing the message.
119
-
120
45
## Rate Limiting
121
46
122
47
GitLab Shell performs rate-limiting by user account and project for git operations. GitLab Shell accepts git operation requests and then makes a call to the Rails rate-limiter (backed by Redis). If the `user + project` exceeds the rate limit then GitLab Shell will then drop further connection requests for that `user + project`.
@@ -133,7 +58,8 @@ See [PROCESS.md](./PROCESS.md)
133
58
134
59
## Contributing
135
60
136
-
See [CONTRIBUTING.md](./CONTRIBUTING.md).
61
+
- See [CONTRIBUTING.md](./CONTRIBUTING.md).
62
+
- See the [beginner's guide](doc/beginners_guide.md).
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
5
+
---
6
+
7
+
# Beginner's guide to GitLab Shell contributions
8
+
9
+
## Check
10
+
11
+
Checks if GitLab API access and Redis via internal API can be reached:
12
+
13
+
```shell
14
+
make check
15
+
```
16
+
17
+
## Compile
18
+
19
+
Builds the `gitlab-shell` binaries, placing them into `bin/`.
20
+
21
+
```shell
22
+
make compile
23
+
```
24
+
25
+
## Install
26
+
27
+
Builds the `gitlab-shell` binaries and installs them onto the file system. The
28
+
default location is `/usr/local`, but you can change the location by setting the `PREFIX`
29
+
and `DESTDIR` environment variables.
30
+
31
+
```shell
32
+
make install
33
+
```
34
+
35
+
## Setup
36
+
37
+
This command is intended for use when installing GitLab from source on a single
38
+
machine. It compiles the GitLab Shell binaries, and ensures that
39
+
various paths on the file system exist with the correct permissions. Do not run
40
+
this command unless your installation method documentation instructs you to.
41
+
42
+
```shell
43
+
make setup
44
+
```
45
+
46
+
## Testing
47
+
48
+
Run tests:
49
+
50
+
```shell
51
+
bundle install
52
+
make test
53
+
```
54
+
55
+
Run Gofmt:
56
+
57
+
```shell
58
+
make verify
59
+
```
60
+
61
+
Run both test and verify (the default Makefile target):
62
+
63
+
```shell
64
+
bundle install
65
+
make validate
66
+
```
67
+
68
+
## Gitaly
69
+
70
+
Some tests need a Gitaly server. The
71
+
[`docker-compose.yml`](../docker-compose.yml) file runs Gitaly on port 8075.
72
+
To tell the tests where Gitaly is, set `GITALY_CONNECTION_INFO`:
0 commit comments