@@ -1109,7 +1109,7 @@ If you enable Monitoring, it must be enabled on **all** database servers.
...
@@ -1109,7 +1109,7 @@ If you enable Monitoring, it must be enabled on **all** database servers.
## Troubleshooting
## Troubleshooting
#### Consul and PostgreSQL changes not taking effect.
### Consul and PostgreSQL changes not taking effect.
Due to the potential impacts, `gitlab-ctl reconfigure` only reloads Consul and PostgreSQL, it will not restart the services. However, not all changes can be activated by reloading.
Due to the potential impacts, `gitlab-ctl reconfigure` only reloads Consul and PostgreSQL, it will not restart the services. However, not all changes can be activated by reloading.
...
@@ -1119,7 +1119,7 @@ For PostgreSQL, it is usually safe to restart the master node by default. Automa
...
@@ -1119,7 +1119,7 @@ For PostgreSQL, it is usually safe to restart the master node by default. Automa
On the consul server nodes, it is important to restart the consul service in a controlled fashion. Read our [consul documentation](consul.md#restarting-the-server-cluster) for instructions on how to restart the service.
On the consul server nodes, it is important to restart the consul service in a controlled fashion. Read our [consul documentation](consul.md#restarting-the-server-cluster) for instructions on how to restart the service.
@@ -10,7 +10,7 @@ By default, merge request diffs are stored in the database, in a table named
...
@@ -10,7 +10,7 @@ By default, merge request diffs are stored in the database, in a table named
`merge_request_diff_files`. Larger installations may find this table grows too
`merge_request_diff_files`. Larger installations may find this table grows too
large, in which case, switching to external storage is recommended.
large, in which case, switching to external storage is recommended.
### Using external storage
## Using external storage
Merge request diffs can be stored on disk, or in object storage. In general, it
Merge request diffs can be stored on disk, or in object storage. In general, it
is better to store the diffs in the database than on disk.
is better to store the diffs in the database than on disk.
...
@@ -46,7 +46,7 @@ To enable external storage of merge request diffs, follow the instructions below
...
@@ -46,7 +46,7 @@ To enable external storage of merge request diffs, follow the instructions below
enabled: true
enabled: true
```
```
1. _The external diffs will be stored in
1. _The external diffs will be stored in
`/home/git/gitlab/shared/external-diffs`._ To change the path, for example,
`/home/git/gitlab/shared/external-diffs`._ To change the path, for example,
to `/mnt/storage/external-diffs`, edit `/home/git/gitlab/config/gitlab.yml`
to `/mnt/storage/external-diffs`, edit `/home/git/gitlab/config/gitlab.yml`
and add or amend the following lines:
and add or amend the following lines:
...
@@ -59,13 +59,13 @@ To enable external storage of merge request diffs, follow the instructions below
...
@@ -59,13 +59,13 @@ To enable external storage of merge request diffs, follow the instructions below
1. Save the file and [restart GitLab](restart_gitlab.md#installations-from-source) for the changes to take effect.
1. Save the file and [restart GitLab](restart_gitlab.md#installations-from-source) for the changes to take effect.
### Using object storage
## Using object storage
Instead of storing the external diffs on disk, we recommended the use of an object
Instead of storing the external diffs on disk, we recommended the use of an object
store like AWS S3 instead. This configuration relies on valid AWS credentials to
store like AWS S3 instead. This configuration relies on valid AWS credentials to
be configured already.
be configured already.
### Object Storage Settings
## Object Storage Settings
For source installations, these settings are nested under `external_diffs:` and
For source installations, these settings are nested under `external_diffs:` and
then `object_store:`. On Omnibus installations, they are prefixed by
then `object_store:`. On Omnibus installations, they are prefixed by
...
@@ -80,7 +80,7 @@ then `object_store:`. On Omnibus installations, they are prefixed by
...
@@ -80,7 +80,7 @@ then `object_store:`. On Omnibus installations, they are prefixed by
| `proxy_download` | Set to true to enable proxying all files served. Option allows to reduce egress traffic as this allows clients to download directly from remote storage instead of proxying all data | `false` |
| `proxy_download` | Set to true to enable proxying all files served. Option allows to reduce egress traffic as this allows clients to download directly from remote storage instead of proxying all data | `false` |
| `connection` | Various connection options described below | |
| `connection` | Various connection options described below | |
#### S3 compatible connection settings
### S3 compatible connection settings
The connection settings match those provided by [Fog](https://github.com/fog), and are as follows:
The connection settings match those provided by [Fog](https://github.com/fog), and are as follows:
...
@@ -146,7 +146,7 @@ The connection settings match those provided by [Fog](https://github.com/fog), a
...
@@ -146,7 +146,7 @@ The connection settings match those provided by [Fog](https://github.com/fog), a
1. Save the file and [restart GitLab](restart_gitlab.md#installations-from-source) for the changes to take effect.
1. Save the file and [restart GitLab](restart_gitlab.md#installations-from-source) for the changes to take effect.
### Alternative in-database storage
## Alternative in-database storage
Enabling external diffs may reduce the performance of merge requests, as they
Enabling external diffs may reduce the performance of merge requests, as they
must be retrieved in a separate operation to other data. A compromise may be
must be retrieved in a separate operation to other data. A compromise may be
Uploads represent all user data that may be sent to GitLab as a single file. As an example, avatars and notes' attachments are uploads. Uploads are integral to GitLab functionality, and therefore cannot be disabled.
Uploads represent all user data that may be sent to GitLab as a single file. As an example, avatars and notes' attachments are uploads. Uploads are integral to GitLab functionality, and therefore cannot be disabled.
### Using local storage
## Using local storage
>**Notes:**
>**Notes:**
This is the default configuration
This is the default configuration
...
@@ -48,7 +48,7 @@ _The uploads are stored by default in
...
@@ -48,7 +48,7 @@ _The uploads are stored by default in
1. Save the file and [restart GitLab][] for the changes to take effect.
1. Save the file and [restart GitLab][] for the changes to take effect.
### Using object storage **(CORE ONLY)**
## Using object storage **(CORE ONLY)**
> **Notes:**
> **Notes:**
>
>
...
@@ -60,7 +60,7 @@ If you don't want to use the local disk where GitLab is installed to store the
...
@@ -60,7 +60,7 @@ If you don't want to use the local disk where GitLab is installed to store the
uploads, you can use an object storage provider like AWS S3 instead.
uploads, you can use an object storage provider like AWS S3 instead.
This configuration relies on valid AWS credentials to be configured already.
This configuration relies on valid AWS credentials to be configured already.
### Object Storage Settings
## Object Storage Settings
For source installations the following settings are nested under `uploads:` and then `object_store:`. On omnibus installs they are prefixed by `uploads_object_store_`.
For source installations the following settings are nested under `uploads:` and then `object_store:`. On omnibus installs they are prefixed by `uploads_object_store_`.
...
@@ -73,7 +73,7 @@ For source installations the following settings are nested under `uploads:` and
...
@@ -73,7 +73,7 @@ For source installations the following settings are nested under `uploads:` and
| `proxy_download` | Set to true to enable proxying all files served. Option allows to reduce egress traffic as this allows clients to download directly from remote storage instead of proxying all data | `false` |
| `proxy_download` | Set to true to enable proxying all files served. Option allows to reduce egress traffic as this allows clients to download directly from remote storage instead of proxying all data | `false` |
| `connection` | Various connection options described below | |
| `connection` | Various connection options described below | |
#### S3 compatible connection settings
### S3 compatible connection settings
The connection settings match those provided by [Fog](https://github.com/fog), and are as follows:
The connection settings match those provided by [Fog](https://github.com/fog), and are as follows:
-`iid` filter has been removed from `GET /projects/:id/issues`[!8967](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8967)
-`iid` filter has been removed from `GET /projects/:id/issues`[!8967](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8967)
...
@@ -18,7 +18,7 @@ Below are the changes made between V3 and V4.
...
@@ -18,7 +18,7 @@ Below are the changes made between V3 and V4.
- Project snippets do not return deprecated field `expires_at`[!8723](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8723)
- Project snippets do not return deprecated field `expires_at`[!8723](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8723)
- Endpoints under `GET /projects/:id/keys` have been removed (use `GET /projects/:id/deploy_keys`) [!8716](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8716)
- Endpoints under `GET /projects/:id/keys` have been removed (use `GET /projects/:id/deploy_keys`) [!8716](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8716)
### 9.0
## 9.0
- Status 409 returned for `POST /projects/:id/members` when a member already exists [!9093](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9093)
- Status 409 returned for `POST /projects/:id/members` when a member already exists [!9093](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9093)
- Moved `DELETE /projects/:id/star` to `POST /projects/:id/unstar`[!9328](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9328)
- Moved `DELETE /projects/:id/star` to `POST /projects/:id/unstar`[!9328](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9328)
@@ -32,7 +32,7 @@ through the process of setting up GitLab CI/CD for end-to-end testing Javascript
...
@@ -32,7 +32,7 @@ through the process of setting up GitLab CI/CD for end-to-end testing Javascript
with WebdriverIO, but the general strategy should carry over to other languages.
with WebdriverIO, but the general strategy should carry over to other languages.
We assume you are familiar with GitLab, [GitLab CI/CD](../../README.md), [Review Apps](../../review_apps/index.md), and running your app locally, e.g., on `localhost:8000`.
We assume you are familiar with GitLab, [GitLab CI/CD](../../README.md), [Review Apps](../../review_apps/index.md), and running your app locally, e.g., on `localhost:8000`.
### What to test
## What to test
In the widely-used [testing pyramid strategy](https://martinfowler.com/bliki/TestPyramid.html), end-to-end tests act more like a
In the widely-used [testing pyramid strategy](https://martinfowler.com/bliki/TestPyramid.html), end-to-end tests act more like a
safeguard: [most of your code should be covered by
safeguard: [most of your code should be covered by
...
@@ -40,9 +40,9 @@ unit tests](https://vincenttunru.com/100-percent-coverage/) that allow you to ea
...
@@ -40,9 +40,9 @@ unit tests](https://vincenttunru.com/100-percent-coverage/) that allow you to ea
will likely want to
will likely want to
[limit the number of end-to-end tests](https://testing.googleblog.com/2015/04/just-say-no-to-more-end-to-end-tests.html)
[limit the number of end-to-end tests](https://testing.googleblog.com/2015/04/just-say-no-to-more-end-to-end-tests.html)
to just enough to give you the confidence that the deployment went as intended, that your
to just enough to give you the confidence that the deployment went as intended, that your
infrastructure is up and running, and that your units of code work well together.
infrastructure is up and running, and that your units of code work well together.
### Selenium and WebdriverIO
## Selenium and WebdriverIO
[Selenium](http://www.seleniumhq.org/) is a piece of software that can control web browsers, e.g., to make them
[Selenium](http://www.seleniumhq.org/) is a piece of software that can control web browsers, e.g., to make them
visit a specific URL or interact with elements on the page. It can be programmatically controlled
visit a specific URL or interact with elements on the page. It can be programmatically controlled
...
@@ -65,7 +65,7 @@ describe('A visitor without account', function(){
...
@@ -65,7 +65,7 @@ describe('A visitor without account', function(){
@@ -6,12 +6,12 @@ Libravatar is a service which delivers your avatar (profile picture) to other we
...
@@ -6,12 +6,12 @@ Libravatar is a service which delivers your avatar (profile picture) to other we
This means that it is not complicated to switch to Libravatar avatar service or even self hosted Libravatar server.
This means that it is not complicated to switch to Libravatar avatar service or even self hosted Libravatar server.
# Configuration
## Configuration
In [gitlab.yml gravatar section](https://gitlab.com/gitlab-org/gitlab-ce/blob/672bd3902d86b78d730cea809fce312ec49d39d7/config/gitlab.yml.example#L122) set
In [gitlab.yml gravatar section](https://gitlab.com/gitlab-org/gitlab-ce/blob/672bd3902d86b78d730cea809fce312ec49d39d7/config/gitlab.yml.example#L122) set
the configuration options as follows:
the configuration options as follows:
## For HTTP
### For HTTP
```yml
```yml
gravatar:
gravatar:
...
@@ -20,7 +20,7 @@ the configuration options as follows:
...
@@ -20,7 +20,7 @@ the configuration options as follows:
- If we have typos in the partial name, it would be silently ignored.
- If we have typos in the partial name, it would be silently ignored.
##### Caveats
##### Caveats
The `render_if_exists` view path argument must be relative to `app/views/` and `ee/app/views`.
The `render_if_exists` view path argument must be relative to `app/views/` and `ee/app/views`.
...
@@ -973,7 +972,7 @@ For regular JS files, the approach is similar.
...
@@ -973,7 +972,7 @@ For regular JS files, the approach is similar.
1. An EE file should be created with the EE only code, and it should extend the CE counterpart.
1. An EE file should be created with the EE only code, and it should extend the CE counterpart.
1. For code inside functions that can't be extended, the code should be moved into a new file and we should use `ee_else_ce` helper:
1. For code inside functions that can't be extended, the code should be moved into a new file and we should use `ee_else_ce` helper:
##### Example:
#### Example:
```javascript
```javascript
importeeCodefrom'ee_else_ce/ee_code';
importeeCodefrom'ee_else_ce/ee_code';
...
@@ -1000,7 +999,7 @@ styles are usually kept in stylesheet that is common for both CE and EE, and it
...
@@ -1000,7 +999,7 @@ styles are usually kept in stylesheet that is common for both CE and EE, and it
to isolate such ruleset from rest of CE rules (along with adding comment describing the same)
to isolate such ruleset from rest of CE rules (along with adding comment describing the same)
to avoid conflicts during CE to EE merge.
to avoid conflicts during CE to EE merge.
#### Bad
### Bad
```scss
```scss
.section-body{
.section-body{
...
@@ -1016,7 +1015,7 @@ to avoid conflicts during CE to EE merge.
...
@@ -1016,7 +1015,7 @@ to avoid conflicts during CE to EE merge.
}
}
```
```
#### Good
### Good
```scss
```scss
.section-body{
.section-body{
...
@@ -1034,7 +1033,7 @@ to avoid conflicts during CE to EE merge.
...
@@ -1034,7 +1033,7 @@ to avoid conflicts during CE to EE merge.
// EE-specific end
// EE-specific end
```
```
### Backporting changes from EE to CE
## Backporting changes from EE to CE
Until the work completed to merge the ce and ee codebases, which is tracked on [epic &802](https://gitlab.com/groups/gitlab-org/-/epics/802), there exists times in which some changes for EE require specific changes to the CE
Until the work completed to merge the ce and ee codebases, which is tracked on [epic &802](https://gitlab.com/groups/gitlab-org/-/epics/802), there exists times in which some changes for EE require specific changes to the CE
code base. Examples of backports include the following:
code base. Examples of backports include the following: