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:
Diffstat (limited to 'doc')
-rw-r--r--doc/administration/operations/rails_console.md29
-rw-r--r--doc/administration/troubleshooting/debug.md77
-rw-r--r--doc/api/index.md14
-rw-r--r--doc/api/notes.md2
-rw-r--r--doc/development/integrations/secure.md7
-rw-r--r--doc/user/application_security/terminology/index.md5
-rw-r--r--doc/user/profile/personal_access_tokens.md4
-rw-r--r--doc/user/project/merge_requests/img/merge_method_ff_v15_0.pngbin4744 -> 0 bytes
-rw-r--r--doc/user/project/merge_requests/img/merge_method_merge_commit_v15_0.pngbin14531 -> 0 bytes
-rw-r--r--doc/user/project/merge_requests/img/merge_method_merge_commit_with_semi_linear_history_v15_0.pngbin14867 -> 0 bytes
-rw-r--r--doc/user/project/merge_requests/methods/index.md50
11 files changed, 94 insertions, 94 deletions
diff --git a/doc/administration/operations/rails_console.md b/doc/administration/operations/rails_console.md
index d6500bc25ae..660a99faaf8 100644
--- a/doc/administration/operations/rails_console.md
+++ b/doc/administration/operations/rails_console.md
@@ -43,6 +43,35 @@ The console is in the toolbox pod. Refer to our [Kubernetes cheat sheet](https:/
To exit the console, type: `quit`.
+## Enable Active Record logging
+
+You can enable output of Active Record debug logging in the Rails console
+session by running:
+
+```ruby
+ActiveRecord::Base.logger = Logger.new($stdout)
+```
+
+This shows information about database queries triggered by any Ruby code
+you may run in the console. To turn off logging again, run:
+
+```ruby
+ActiveRecord::Base.logger = nil
+```
+
+## Disable database statement timeout
+
+You can disable the PostgreSQL statement timeout for the current Rails console
+session by running:
+
+```ruby
+ActiveRecord::Base.connection.execute('SET statement_timeout TO 0')
+```
+
+This change only affects the current Rails console session and is
+not persisted in the GitLab production environment or in the next Rails
+console session.
+
## Output Rails console session history
Enter the following command on the rails console to display
diff --git a/doc/administration/troubleshooting/debug.md b/doc/administration/troubleshooting/debug.md
index 4b28b578ebc..2ea79a15e6e 100644
--- a/doc/administration/troubleshooting/debug.md
+++ b/doc/administration/troubleshooting/debug.md
@@ -9,83 +9,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w
Sometimes things don't work the way they should. Here are some tips on debugging issues out
in production.
-## Starting a Rails console session
-
-Troubleshooting and debugging your GitLab instance often requires a Rails console.
-
-Your type of GitLab installation determines how
-[to start a rails console](../operations/rails_console.md).
-See also:
-
-- [GitLab Rails Console Cheat Sheet](gitlab_rails_cheat_sheet.md).
-
-### Enabling Active Record logging
-
-You can enable output of Active Record debug logging in the Rails console
-session by running:
-
-```ruby
-ActiveRecord::Base.logger = Logger.new($stdout)
-```
-
-This shows information about database queries triggered by any Ruby code
-you may run in the console. To turn off logging again, run:
-
-```ruby
-ActiveRecord::Base.logger = nil
-```
-
-### Disabling database statement timeout
-
-You can disable the PostgreSQL statement timeout for the current Rails console
-session by running:
-
-```ruby
-ActiveRecord::Base.connection.execute('SET statement_timeout TO 0')
-```
-
-This change only affects the current Rails console session and is
-not persisted in the GitLab production environment or in the next Rails
-console session.
-
-### Output Rails console session history
-
-If you'd like to output your Rails console command history in a format that's
-easy to copy and save for future reference, you can run:
-
-```ruby
-puts Readline::HISTORY.to_a
-```
-
-## Using the Rails runner
-
-If you need to run some Ruby code in the context of your GitLab production
-environment, you can do so using the [Rails runner](https://guides.rubyonrails.org/command_line.html#rails-runner). When executing a script file, the script must be accessible by the `git` user.
-
-**For Omnibus installations**
-
-```shell
-sudo gitlab-rails runner "RAILS_COMMAND"
-
-# Example with a two-line Ruby script
-sudo gitlab-rails runner "user = User.first; puts user.username"
-
-# Example with a ruby script file (make sure to use the full path)
-sudo gitlab-rails runner /path/to/script.rb
-```
-
-**For installations from source**
-
-```shell
-sudo -u git -H bundle exec rails runner -e production "RAILS_COMMAND"
-
-# Example with a two-line Ruby script
-sudo -u git -H bundle exec rails runner -e production "user = User.first; puts user.username"
-
-# Example with a ruby script file (make sure to use the full path)
-sudo -u git -H bundle exec rails runner -e production /path/to/script.rb
-```
-
## More information
- [Debugging Stuck Ruby Processes](https://newrelic.com/blog/best-practices/debugging-stuck-ruby-processes-what-to-do-before-you-kill-9)
diff --git a/doc/api/index.md b/doc/api/index.md
index cf14a9f405b..26447a2223d 100644
--- a/doc/api/index.md
+++ b/doc/api/index.md
@@ -453,12 +453,14 @@ Keyset-pagination allows for more efficient retrieval of pages and - in contrast
to offset-based pagination - runtime is independent of the size of the
collection.
-This method is controlled by the following parameters:
-
-| Parameter | Description |
-|--------------| ------------|
-| `pagination` | `keyset` (to enable keyset pagination). |
-| `per_page` | Number of items to list per page (default: `20`, max: `100`). |
+This method is controlled by the following parameters. `order_by` and `sort` are both mandatory.
+
+| Parameter | Required | Description |
+|--------------| ------------ | --------- |
+| `pagination` | yes | `keyset` (to enable keyset pagination). |
+| `per_page` | no | Number of items to list per page (default: `20`, max: `100`). |
+| `order_by` | yes | Column by which to order by. |
+| `sort` | yes | Sort order (`asc` or `desc`) |
In the following example, we list 50 [projects](projects.md) per page, ordered
by `id` ascending.
diff --git a/doc/api/notes.md b/doc/api/notes.md
index fbcf5e28f79..f7caae59b4d 100644
--- a/doc/api/notes.md
+++ b/doc/api/notes.md
@@ -146,7 +146,7 @@ Parameters:
| `issue_iid` | integer | yes | The IID of an issue. |
| `body` | string | yes | The content of a note. Limited to 1,000,000 characters. |
| `confidential` | boolean | no | The confidential flag of a note. Default is false. |
-| `created_at` | string | no | Date time string, ISO 8601 formatted. Example: `2016-03-11T03:45:40Z` (requires administrator or project/group owner rights) |
+| `created_at` | string | no | Date time string, ISO 8601 formatted. It must be after 1970-01-01. Example: `2016-03-11T03:45:40Z` (requires administrator or project/group owner rights) |
```shell
curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/issues/11/notes?body=note"
diff --git a/doc/development/integrations/secure.md b/doc/development/integrations/secure.md
index 7777afeed39..0a0c5e4d2a6 100644
--- a/doc/development/integrations/secure.md
+++ b/doc/development/integrations/secure.md
@@ -316,11 +316,12 @@ and [Container Scanning](../../user/application_security/container_scanning/inde
You can find the schemas for these scanners here:
-- [SAST](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/sast-report-format.json)
-- [DAST](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/dast-report-format.json)
-- [Dependency Scanning](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/dependency-scanning-report-format.json)
+- [Cluster Image Scanning](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/cluster-image-scanning-report-format.json)
- [Container Scanning](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/container-scanning-report-format.json)
- [Coverage Fuzzing](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/coverage-fuzzing-report-format.json)
+- [DAST](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/dast-report-format.json)
+- [Dependency Scanning](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/dependency-scanning-report-format.json)
+- [SAST](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/sast-report-format.json)
- [Secret Detection](https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/dist/secret-detection-report-format.json)
### Retention period for vulnerabilities
diff --git a/doc/user/application_security/terminology/index.md b/doc/user/application_security/terminology/index.md
index 392bfa1dde2..d50cce3b4e8 100644
--- a/doc/user/application_security/terminology/index.md
+++ b/doc/user/application_security/terminology/index.md
@@ -220,11 +220,12 @@ once it's imported into the database.
The type of scan. This must be one of the following:
+- `cluster_image_scanning`
- `container_scanning`
-- `dependency_scanning`
- `dast`
+- `dependency_scanning`
- `sast`
-- `cluster_image_scanning`
+- `secret_detection`
### Scanner
diff --git a/doc/user/profile/personal_access_tokens.md b/doc/user/profile/personal_access_tokens.md
index af84b746280..427c412219a 100644
--- a/doc/user/profile/personal_access_tokens.md
+++ b/doc/user/profile/personal_access_tokens.md
@@ -145,7 +145,7 @@ To create a personal access token programmatically:
```
This code can be shortened into a single-line shell command by using the
-[Rails runner](../../administration/troubleshooting/debug.md#using-the-rails-runner):
+[Rails runner](../../administration/operations/rails_console.md#using-the-rails-runner):
```shell
sudo gitlab-rails runner "token = User.find_by_username('automation-bot').personal_access_tokens.create(scopes: [:read_user, :read_repository], name: 'Automation token'); token.set_token('token-string-here123'); token.save!"
@@ -177,7 +177,7 @@ To revoke a token programmatically:
```
This code can be shortened into a single-line shell command using the
-[Rails runner](../../administration/troubleshooting/debug.md#using-the-rails-runner):
+[Rails runner](../../administration/operations/rails_console.md#using-the-rails-runner):
```shell
sudo gitlab-rails runner "PersonalAccessToken.find_by_token('token-string-here123').revoke!"
diff --git a/doc/user/project/merge_requests/img/merge_method_ff_v15_0.png b/doc/user/project/merge_requests/img/merge_method_ff_v15_0.png
deleted file mode 100644
index 323fd03ffa2..00000000000
--- a/doc/user/project/merge_requests/img/merge_method_ff_v15_0.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/project/merge_requests/img/merge_method_merge_commit_v15_0.png b/doc/user/project/merge_requests/img/merge_method_merge_commit_v15_0.png
deleted file mode 100644
index b880c2c0e04..00000000000
--- a/doc/user/project/merge_requests/img/merge_method_merge_commit_v15_0.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/project/merge_requests/img/merge_method_merge_commit_with_semi_linear_history_v15_0.png b/doc/user/project/merge_requests/img/merge_method_merge_commit_with_semi_linear_history_v15_0.png
deleted file mode 100644
index 9eab71e9d3c..00000000000
--- a/doc/user/project/merge_requests/img/merge_method_merge_commit_with_semi_linear_history_v15_0.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/project/merge_requests/methods/index.md b/doc/user/project/merge_requests/methods/index.md
index d3221162cfd..63b464e5ff4 100644
--- a/doc/user/project/merge_requests/methods/index.md
+++ b/doc/user/project/merge_requests/methods/index.md
@@ -23,7 +23,26 @@ merge requests are merged into an existing branch.
This setting is the default. It always creates a separate merge commit,
even when using [squash](../squash_and_merge.md). An example commit graph generated using this merge method:
-![Commit graph for merge commits](../img/merge_method_merge_commit_v15_0.png)
+```mermaid
+gitGraph
+ commit id: "Init"
+ branch mr-branch-1
+ commit
+ checkout main
+ commit
+ branch mr-branch-2
+ commit
+ checkout mr-branch-1
+ commit
+ checkout main
+ branch squash-mr
+ commit id: "Squashed commits"
+ checkout main
+ merge squash-mr
+ merge mr-branch-1
+ commit
+ merge mr-branch-2
+```
- For regular merges, it is equivalent to the command `git merge --no-ff <source-branch>`.
- For squash merges, it squashes all commits in the source branch before merging it normally. It performs actions similar to:
@@ -42,7 +61,25 @@ A merge commit is created for every merge, but the branch is only merged if
a fast-forward merge is possible. This ensures that if the merge request build
succeeded, the target branch build also succeeds after the merge. An example commit graph generated using this merge method:
-![Commit graph for merge commit with semi-linear history](../img/merge_method_merge_commit_with_semi_linear_history_v15_0.png)
+```mermaid
+gitGraph
+ commit id: "Init"
+ branch mr-branch-1
+ commit
+ commit
+ checkout main
+ merge mr-branch-1
+ branch mr-branch-2
+ commit
+ commit
+ checkout main
+ merge mr-branch-2
+ commit
+ branch squash-mr
+ commit id: "Squashed commits"
+ checkout main
+ merge squash-mr
+```
When you visit the merge request page with `Merge commit with semi-linear history`
method selected, you can accept it **only if a fast-forward merge is possible**.
@@ -63,7 +100,14 @@ fast-forward merge requests, you can retain a linear Git history and a way
to accept merge requests without creating merge commits. An example commit graph
generated using this merge method:
-![Commit graph for fast-forward merge](../img/merge_method_ff_v15_0.png)
+```mermaid
+gitGraph
+ commit id: "Init"
+ commit id: "Merge mr-branch-1"
+ commit id: "Merge mr-branch-2"
+ commit id: "Commit on main"
+ commit id: "Merge squash-mr"
+```
This method is equivalent to `git merge --ff <source-branch>` for regular merges, and to
`git merge -squash <source-branch>` for squash merges.