From 7c8468c5ba828e1c1afe6ba0b25c77c130a69413 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 3 Apr 2023 18:08:58 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- doc/development/database/multiple_databases.md | 18 ++++++++++++++++++ doc/user/profile/achievements.md | 9 +++++++++ 2 files changed, 27 insertions(+) (limited to 'doc') diff --git a/doc/development/database/multiple_databases.md b/doc/development/database/multiple_databases.md index 8a6f1630769..6adfdc90cf2 100644 --- a/doc/development/database/multiple_databases.md +++ b/doc/development/database/multiple_databases.md @@ -580,6 +580,24 @@ or records that point to nowhere, which might lead to bugs. As such we created ["loose foreign keys"](loose_foreign_keys.md) which is an asynchronous process of cleaning up orphaned records. +## Testing for multiple databases + +In our testing CI pipelines, we test GitLab by default with multiple databases set up, using +both `main` and `ci` databases. But in merge requests, for example when we modify some database-related code or +add the label `~"pipeline:run-single-db"` to the MR, we additionally run our tests in +[two other database modes](../pipelines/index.md#single-database-testing): +`single-db` and `single-db-ci-connection`. + +To handle situations where our tests need to run in specific database modes, we have some RSpec helpers +to limit the modes where tests can run, and skip them on any other modes. + +| Helper name | Test runs | +|---------------------------------------------| --- | +| `skip_if_shared_database(:ci)` | On **multiple databases** | +| `skip_if_database_exists(:ci)` | On **single-db** and **single-db-ci-connection** | +| `skip_if_multiple_databases_are_setup(:ci)` | Only on **single-db** | +| `skip_if_multiple_databases_not_setup(:ci)` | On **single-db-ci-connection** and **multiple databases** | + ## Locking writes on the tables that don't belong to the database schemas When the CI database is promoted and the two databases are fully split, diff --git a/doc/user/profile/achievements.md b/doc/user/profile/achievements.md index fcbbbe65639..c06700bd2ef 100644 --- a/doc/user/profile/achievements.md +++ b/doc/user/profile/achievements.md @@ -223,3 +223,12 @@ mutation { } } ``` + +## Hide achievements + +If you don't want to display achievements on your profile, you can opt out. To do this: + +1. On the top bar, in the upper-right corner, select your avatar. +1. Select **Edit profile**. +1. In the **Main settings** section, clear the **Display achievements on your profile** checkbox. +1. Select **Update profile settings**. -- cgit v1.2.3