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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 21:08:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-02 21:08:11 +0300
commit8a7efa45c38ed3200d173d2c3207a8154e583c16 (patch)
tree1bb4d579b95c79aae4946a06fefa089e5549b722 /doc
parent53b1f4eaa2a451aaba908a5fee7ce97a930021ac (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/api/README.md18
-rw-r--r--doc/development/README.md4
-rw-r--r--doc/development/api_styleguide.md2
-rw-r--r--doc/development/database_review.md1
-rw-r--r--doc/development/migration_style_guide.md88
-rw-r--r--doc/install/aws/index.md25
-rw-r--r--doc/install/installation.md9
-rw-r--r--doc/user/project/issues/design_management.md13
8 files changed, 141 insertions, 19 deletions
diff --git a/doc/api/README.md b/doc/api/README.md
index 319a697b082..24b81852dc5 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -436,6 +436,24 @@ Keyset-based pagination is only supported for selected resources and ordering op
| ------------------------- | -------------------------- |
| [Projects](projects.md) | `order_by=id` only |
+## Path parameters
+
+If an endpoint has path parameters, the documentation shows them with a preceding colon.
+
+For example:
+
+```plaintext
+DELETE /projects/:id/share/:group_id
+```
+
+The `:id` path parameter needs to be replaced with the project id, and the `:group_id` needs to be replaced with the id of the group. The colons `:` should not be included.
+
+The resulting cURL call for a project with id `5` and a group id of `17` is then:
+
+```shell
+curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/share/17
+```
+
## Namespaced path encoding
If using namespaced API calls, make sure that the `NAMESPACE/PROJECT_PATH` is
diff --git a/doc/development/README.md b/doc/development/README.md
index 2089cf794ba..e55989e312a 100644
--- a/doc/development/README.md
+++ b/doc/development/README.md
@@ -98,6 +98,8 @@ Complementary reads:
- [Application limits](application_limits.md)
- [Redis guidelines](redis.md)
- [Rails initializers](rails_initializers.md)
+- [Code comments](code_comments.md)
+- [Renaming features](renaming_features.md)
## Performance guides
@@ -150,9 +152,7 @@ Complementary reads:
- [Verifying database capabilities](verifying_database_capabilities.md)
- [Database Debugging and Troubleshooting](database_debugging.md)
- [Query Count Limits](query_count_limits.md)
-- [Code comments](code_comments.md)
- [Creating enums](creating_enums.md)
-- [Renaming features](renaming_features.md)
### Case studies
diff --git a/doc/development/api_styleguide.md b/doc/development/api_styleguide.md
index 7c0146017b1..37d8a677389 100644
--- a/doc/development/api_styleguide.md
+++ b/doc/development/api_styleguide.md
@@ -121,7 +121,7 @@ For instance:
The [internal API](./internal_api.md) is documented for internal use. Please keep it up to date so we know what endpoints
different components are making use of.
-[Entity]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/api/entities.rb
+[Entity]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/api/entities
[validation, and coercion of the parameters]: https://github.com/ruby-grape/grape#parameter-validation-and-coercion
[installing GitLab under a relative URL]: https://docs.gitlab.com/ee/install/relative_url.html
diff --git a/doc/development/database_review.md b/doc/development/database_review.md
index 0fdf255e266..650c6fc7936 100644
--- a/doc/development/database_review.md
+++ b/doc/development/database_review.md
@@ -79,6 +79,7 @@ the following preparations into account.
- Include either a rollback procedure or describe how to rollback changes.
- Add the output of the migration(s) to the MR description.
- Add tests for the migration in `spec/migrations` if necessary. See [Testing Rails migrations at GitLab](testing_guide/testing_migrations_guide.md) for more details.
+- When [high-traffic](https://gitlab.com/gitlab-org/gitlab/-/blob/master/rubocop/migration_helpers.rb#L12) tables are involved in the migration, use the [`with_lock_retries`](migration_style_guide.md#retry-mechanism-when-acquiring-database-locks) helper method. Review the relevant [examples in our documentation](migration_style_guide.md#examples) for use cases and solutions.
#### Preparation when adding or modifying queries
diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md
index 46ea91fcdf3..3e993243855 100644
--- a/doc/development/migration_style_guide.md
+++ b/doc/development/migration_style_guide.md
@@ -171,7 +171,7 @@ lock allow the database to process other statements.
### Examples
-Removing a column:
+**Removing a column:**
```ruby
include Gitlab::Database::MigrationHelpers
@@ -189,7 +189,7 @@ def down
end
```
-Removing a foreign key:
+**Removing a foreign key:**
```ruby
include Gitlab::Database::MigrationHelpers
@@ -207,7 +207,7 @@ def down
end
```
-Changing default value for a column:
+**Changing default value for a column:**
```ruby
include Gitlab::Database::MigrationHelpers
@@ -225,6 +225,88 @@ def down
end
```
+**Creating a new table with a foreign key:**
+
+We can simply wrap the `create_table` method with `with_lock_retries`:
+
+```ruby
+def up
+ with_lock_retries do
+ create_table :issues do |t|
+ t.references :project, index: true, null: false, foreign_key: { on_delete: :cascade }
+ t.string :title, limit: 255
+ end
+ end
+end
+
+def down
+ drop_table :issues
+end
+```
+
+**Creating a new table when we have two foreign keys:**
+
+For this, we'll need three migrations:
+
+1. Creating the table without foreign keys (with the indices).
+1. Add foreign key to the first table.
+1. Add foreign key to the second table.
+
+Creating the table:
+
+```ruby
+def up
+ create_table :imports do |t|
+ t.bigint :project_id, null: false
+ t.bigint :user_id, null: false
+ t.string :jid, limit: 255
+ end
+
+ add_index :imports, :project_id
+ add_index :imports, :user_id
+end
+
+def down
+ drop_table :imports
+end
+```
+
+Adding foreign key to `projects`:
+
+```ruby
+include Gitlab::Database::MigrationHelpers
+
+def up
+ with_lock_retries do
+ add_foreign_key :imports, :projects, column: :project_id, on_delete: :cascade
+ end
+end
+
+def down
+ with_lock_retries do
+ remove_foreign_key :imports, column: :project_id
+ end
+end
+```
+
+Adding foreign key to `users`:
+
+```ruby
+include Gitlab::Database::MigrationHelpers
+
+def up
+ with_lock_retries do
+ add_foreign_key :imports, :users, column: :user_id, on_delete: :cascade
+ end
+end
+
+def down
+ with_lock_retries do
+ remove_foreign_key :imports, column: :user_id
+ end
+end
+```
+
### When to use the helper method
The `with_lock_retries` helper method can be used when you normally use
diff --git a/doc/install/aws/index.md b/doc/install/aws/index.md
index 6e16433dfee..ee4f759be3a 100644
--- a/doc/install/aws/index.md
+++ b/doc/install/aws/index.md
@@ -247,7 +247,17 @@ create the actual RDS instance.
![RDS Subnet Group](img/rds_subnet_group.png)
-### Creating the database
+### RDS Security Group
+
+We need a security group for our database that will allow inbound traffic from the instances we'll deploy in our `gitlab-loadbalancer-sec-group` later on:
+
+1. From the EC2 dashboard, select **Security Groups** from the left menu bar.
+1. Click **Create security group**.
+1. Give it a name (we'll use `gitlab-rds-sec-group`), a description, and select the `gitlab-vpc` from the **VPC** dropdown.
+1. In the **Inbound rules** section, click **Add rule** and add a **PostgreSQL** rule, and set the "Custom" source as the `gitlab-loadbalancer-sec-group` we created earlier. The default PostgreSQL port is `5432`, which we'll also use when creating our database below.
+1. When done, click **Create security group**.
+
+### Create the database
Now, it's time to create the database:
@@ -266,7 +276,7 @@ Now, it's time to create the database:
1. Select the VPC we created earlier (`gitlab-vpc`) from the **Virtual Private Cloud (VPC)** dropdown menu.
1. Expand the **Additional connectivity configuration** section and select the subnet group (`gitlab-rds-group`) we created earlier.
1. Set public accessibility to **No**.
- 1. Under **VPC security group**, select **Create new** and enter a name. We'll use `gitlab-rds-sec-group`.
+ 1. Under **VPC security group**, select **Choose existing** and select the `gitlab-rds-sec-group` we create above from the dropdown.
1. Leave the database port as the default `5432`.
1. For **Database authentication**, select **Password authentication**.
1. Expand the **Additional configuration** section and complete the following:
@@ -327,17 +337,6 @@ persistence and is used for certain types of the GitLab application.
1. Leave the rest of the settings to their default values or edit to your liking.
1. When done, click **Create**.
-## RDS and Redis Security Group
-
-Let's navigate to our EC2 security groups and add a small change for our EC2
-instances to be able to connect to RDS. First, copy the security group name we
-defined, namely `gitlab-security-group`, select the RDS security group and edit the
-inbound rules. Choose the rule type to be PostgreSQL and paste the name under
-source.
-
-Similar to the above, jump to the `gitlab-security-group` group
-and add a custom TCP rule for port `6379` accessible within itself.
-
## Setting up Bastion Hosts
Since our GitLab instances will be in private subnets, we need a way to connect to these instances via SSH to make configuration changes, perform upgrades, etc. One way of doing this is via a [bastion host](https://en.wikipedia.org/wiki/Bastion_host), sometimes also referred to as a jump box.
diff --git a/doc/install/installation.md b/doc/install/installation.md
index f3574395a5c..f6eeec11539 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -969,6 +969,15 @@ If you want to switch back to Unicorn, follow these steps:
1. Edit the system `init.d` script to set the `USE_UNICORN=1` flag. If you have `/etc/default/gitlab`, then you should edit it instead.
1. Restart GitLab.
+### Using Sidekiq instead of Sidekiq Cluster
+
+As of GitLab 12.10, Source installations are using `bin/sidekiq-cluster` for managing Sidekiq processes.
+Using Sidekiq directly will still be supported until 14.0. So if you're experiencing issues, please:
+
+1. Edit the system `init.d` script to remove the `SIDEKIQ_WORKERS` flag. If you have `/etc/default/gitlab`, then you should edit it instead.
+1. Restart GitLab.
+1. [Create an issue](https://gitlab.com/gitlab-org/gitlab/issues/-/new) describing the problem.
+
## Troubleshooting
### "You appear to have cloned an empty repository."
diff --git a/doc/user/project/issues/design_management.md b/doc/user/project/issues/design_management.md
index dd65c8f0929..40771c14ea4 100644
--- a/doc/user/project/issues/design_management.md
+++ b/doc/user/project/issues/design_management.md
@@ -75,6 +75,19 @@ you can drag and drop designs onto the dedicated dropzone to upload them.
![Drag and drop design uploads](img/design_drag_and_drop_uploads_v12_9.png)
+[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/202634)
+in GitLab 12.10, you can also copy images from your file system and
+paste them directly on GitLab's Design page as a new design.
+
+On macOS you can also take a screenshot and immediately copy it to
+the clipboard by simultaneously clicking <kbd>Control</kbd> + <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>3</kbd>, and then paste it as a design.
+
+Copy-and-pasting has some limitations:
+
+- You can paste only one image at a time. When copy/pasting multiple files, only the first one will be uploaded.
+- All images will be converted to `png` format under the hood, so when you want to copy/paste `gif` file, it will result in broken animation.
+- Copy/pasting designs is not supported on Internet Explorer.
+
Designs with the same filename as an existing uploaded design will create a new version
of the design, and will replace the previous version. [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/34353) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.9, dropping a design on an existing uploaded design will also create a new version,
provided the filenames are the same.