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>2023-12-12 00:12:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-12 00:12:34 +0300
commit6d08f67e10d01b6198daaad31b402e54bfe068e8 (patch)
tree25c1ac824c12a13b9cbc34f0cb01b2c6834efbcb /doc
parent7eeb03ce0e64c30df91665524e543fe4e611c410 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/ci/jobs/index.md8
-rw-r--r--doc/development/documentation/styleguide/word_list.md21
-rw-r--r--doc/development/testing_guide/flaky_tests.md11
-rw-r--r--doc/user/project/merge_requests/creating_merge_requests.md113
4 files changed, 111 insertions, 42 deletions
diff --git a/doc/ci/jobs/index.md b/doc/ci/jobs/index.md
index e8ab5cbfdcd..f4836f93234 100644
--- a/doc/ci/jobs/index.md
+++ b/doc/ci/jobs/index.md
@@ -375,6 +375,14 @@ job1:
- echo -e "\e[0Ksection_end:`date +%s`:my_first_section\r\e[0K"
```
+### Full screen mode
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/363617) in GitLab 16.7.
+
+You can view the contents of a job log in full screen mode by clicking **Show full screen**.
+
+To use full screen mode, your web browser must also support it. If your web browser does not support full screen mode, then the option is not available.
+
## Deployment jobs
Deployment jobs are a specific kind of CI job in that they deploy code to
diff --git a/doc/development/documentation/styleguide/word_list.md b/doc/development/documentation/styleguide/word_list.md
index f4fdab99307..913683c936d 100644
--- a/doc/development/documentation/styleguide/word_list.md
+++ b/doc/development/documentation/styleguide/word_list.md
@@ -1436,6 +1436,17 @@ Do not use **Reporter permissions**. A user who is assigned the Reporter role ha
Use title case for **Repository Mirroring**.
+## resolution, resolve
+
+Use **resolution** when the troubleshooting solution fixes the issue permanently.
+A resolution usually involves file and code changes to correct the problem.
+For example:
+
+- To resolve this issue, update the `.gitlab-ci.yml` file.
+- One resolution is to update the `.gitlab-ci.yml` file.
+
+See also [workaround](#workaround).
+
## requirements
When documenting the tasks that must be completed or the conditions that must be met before a user can complete the steps:
@@ -1911,6 +1922,16 @@ Instead of:
([Vale](../testing.md#vale) rule: [`SubstitutionSuggestions.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SubstitutionSuggestions.yml))
+## workaround
+
+Use **workaround** when the troubleshooting solution is a temporary fix.
+A workaround is usually an immediate fix and might have ongoing issues.
+For example:
+
+- The workaround is to temporarily pin your template to the deprecated version.
+
+See also [resolution](#resolution-resolve).
+
## while
Use **while** to refer only to something occurring in time. For example,
diff --git a/doc/development/testing_guide/flaky_tests.md b/doc/development/testing_guide/flaky_tests.md
index 4e27736520f..ca81f7002f4 100644
--- a/doc/development/testing_guide/flaky_tests.md
+++ b/doc/development/testing_guide/flaky_tests.md
@@ -333,6 +333,17 @@ If a spec hangs, it might be caused by a [bug in Rails](https://github.com/rails
It could help to split the large RSpec files in multiple files in order to narrow down the context and identify the problematic tests.
+### Recreate job failure in CI by forcing the job to run the same set of test files
+
+Reproducing a job failure in CI always helps with troubleshooting why and how a test fails. This require us running the same test files with the same spec order. Since we use Knapsack to distribute tests across parallelized jobs, and files can be distributed differently between two pipelines, we can hardcode this job distribution through the following steps:
+
+1. Find a job that you want to reproduce, identify the commit that it ran against, set your local `gitlab-org/gitlab` branch to the same commit to ensure we are running with the same copy of the project.
+1. In the job log, locate the list of spec files that were distributed by Knapsack - you can search for `Running command: bundle exec rspec`, the last argument of this command should contain a list of file names. Copy this list.
+1. Go to `tooling/lib/tooling/parallel_rspec_runner.rb` where the test file distribution happens. Have a look at [this merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137924/diffs) as an example, store the file list you copied from step 2 into a `TEST_FILES` constant and have RSpec run this list by updating the `rspec_command` method as done in the example MR.
+1. Skip the tests in `spec/tooling/lib/tooling/parallel_rspec_runner_spec.rb` so it doesn't cause your pipeline to fail early.
+1. Since we want to force the pipeline to run against a specific version, we do not want to run a merged results pipeline. We can introduce a merge conflict into the MR to achieve this.
+1. To preserve spec ordering, update the `spec/support/rspec_order.rb` file by hard coding `Kernel.srand` with the value shown in the originally failing job, as done [here](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128428/diffs#32f6fa4961481518204e227252552dba7483c3b0_62_62). You can fine the srand value in the job log by searching `Randomized with seed` which is followed by this value.
+
## Resources
- [Flaky Tests: Are You Sure You Want to Rerun Them?](https://semaphoreci.com/blog/2017/04/20/flaky-tests.html)
diff --git a/doc/user/project/merge_requests/creating_merge_requests.md b/doc/user/project/merge_requests/creating_merge_requests.md
index 26cbc4c5d8b..85874692725 100644
--- a/doc/user/project/merge_requests/creating_merge_requests.md
+++ b/doc/user/project/merge_requests/creating_merge_requests.md
@@ -22,63 +22,71 @@ You can create a merge request from the list of merge requests.
1. On the left sidebar, select **Search or go to** and find your project.
1. Select **Code > Merge requests**.
1. In the upper-right corner, select **New merge request**.
-1. Select a source and target branch and then **Compare branches and continue**.
-1. Fill out the fields and select **Create merge request**.
+1. Select a source and target branch, then select **Compare branches and continue**.
+1. Complete the fields on the **New merge request** page, then select **Create merge request**.
-NOTE:
-Merge requests are designed around a one-to-one (1:1) branch relationship. Only one open merge request can
-be associated with a given target branch at a time.
+Each branch can be associated with only one open merge request. If a merge request
+already exists for this branch, a link to the existing merge request is shown.
## From an issue
-> The **Create merge request** button [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/349566) to open the merge request creation form in GitLab 14.8.
+> [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/349566) the behavior of the **Create merge request** button to open the merge request creation form in GitLab 14.8.
If your development workflow requires an issue for every merge
request, you can create a branch directly from the issue to speed the process up.
The new branch, and later its merge request, are marked as related to this issue.
After merging the merge request, the issue is closed automatically, unless
-[automatic issue closing is disabled](../issues/managing_issues.md#disable-automatic-issue-closing).
-You can see a **Create merge request** dropdown list below the issue description.
+[automatic issue closing is disabled](../issues/managing_issues.md#disable-automatic-issue-closing):
-NOTE:
-In GitLab 14.8 and later, selecting **Create merge request**
-[redirects to the merge request creation form](https://gitlab.com/gitlab-org/gitlab/-/issues/349566)
-instead of immediately creating the merge request.
+::Tabs
-**Create merge request** doesn't display if:
+:::TabTitle Merge request and branch
-- A branch with the same name already exists.
-- A merge request already exists for this branch.
-- Your project has an active fork relationship.
-- Your project is private and the issue is confidential.
+To create a branch and a merge request at the same time:
-To make this button appear, one possible workaround is to
-[remove your project's fork relationship](../repository/forking_workflow.md#unlink-a-fork).
-After removal, the fork relationship cannot be restored. This project can no longer
-be able to receive or send merge requests to the source project, or other forks.
+1. On the left sidebar, select **Search or go to** and find your project.
+1. Select **Issues** and find your issue.
+1. Go to the bottom of the issue description.
+1. Select **Create merge request > Create merge request and branch**.
+1. In the dialog, review the suggested branch name. It's based on your project's
+ [branch name template](../repository/branches/index.md) Rename it if the
+ branch name is already taken, or you need a different branch name.
+1. Select a source branch or tag.
+1. Select **Create merge request**.
-The dropdown list contains the options **Create merge request and branch** and **Create branch**.
+:::TabTitle Branch only
-After selecting one of these options, a new branch or branch and merge request
-is created based on your project's [default branch](../repository/branches/default.md).
-The branch name is based on your project's [branch name template](../repository/branches/index.md),
-but this value can be changed.
+To create only a branch directly from an issue:
-When you select **Create branch** in an empty
-repository project, GitLab performs these actions:
+1. On the left sidebar, select **Search or go to** and find your project.
+1. Select **Plan > Issues** and find your issue.
+1. Go to the bottom of the issue description.
+1. Select **Create merge request > Create branch**.
+1. In the dialog, review the suggested branch name. It's based on your project's
+ [branch name template](../repository/branches/index.md) Rename it if the
+ branch name is already taken, or you need a different branch name.
+1. Select a source branch or tag.
+1. Select **Create branch**.
+
+::EndTabs
+
+If your Git repository is empty, GitLab:
- Creates a default branch.
- Commits a blank `README.md` file to it.
- Creates and redirects you to a new branch based on the issue title.
-- _If your project is [configured with a deployment service](../integrations/index.md) like Kubernetes,_
+- If your project is [configured with a deployment service](../integrations/index.md) like Kubernetes,
GitLab prompts you to set up [auto deploy](../../../topics/autodevops/stages.md#auto-deploy)
by helping you create a `.gitlab-ci.yml` file.
-After the branch is created, you can edit files in the repository to fix
-the issue. When a merge request is created based on the newly-created branch,
-the description field displays the [issue closing pattern](../issues/managing_issues.md#closing-issues-automatically)
-`Closes #ID`, where `ID` is the ID of the issue. This closes the issue when the
-merge request is merged.
+If the name of the branch you create is
+[prefixed with the issue number](../repository/branches/index.md#prefix-branch-names-with-issue-numbers),
+GitLab cross-links the issue and merge request, and adds the
+[issue closing pattern](../issues/managing_issues.md#closing-issues-automatically)
+to the description of the merge request. In most cases, this looks like `Closes #ID`,
+where `ID` is the ID of the issue. If your project is configured with a
+[closing pattern](../issues/managing_issues.md#default-closing-pattern), the issue closes
+when the merge request merges.
## When you add, edit, or upload a file
@@ -86,10 +94,11 @@ You can create a merge request when you add, edit, or upload a file to a reposit
1. [Add, edit, or upload](../repository/web_editor.md) a file to the repository.
1. In the **Commit message**, enter a reason for the commit.
-1. Select the **Target branch** or create a new branch by typing the name (without spaces).
+1. Select the **Target branch** or create a new branch by typing the name.
1. Select the **Start a new merge request with these changes** checkbox or toggle. This checkbox or toggle is visible only
if the target is not the same as the source branch, or if the source branch is protected.
-1. Select **Commit changes**.
+1. Select **Upload file**.
+1. Fill out the fields and select **Create merge request**.
## When you create a branch
@@ -112,20 +121,27 @@ You can create a merge request by running Git commands on your local machine.
git checkout -b my-new-branch
```
-1. Create, edit, or delete files. The stage and commit them:
+1. Create, edit, or delete files as needed.
+
+1. Mark the files as ready to commit (staging them) and commit them locally:
```shell
+ # Mark the files as ready to commit
git add .
+ # Commit the changes locally
git commit -m "My commit message"
```
-1. [Push your branch to GitLab](../../../gitlab-basics/start-using-git.md#send-changes-to-gitlab):
+1. [Push your branch and its commits to GitLab](../../../gitlab-basics/start-using-git.md#send-changes-to-gitlab):
```shell
git push origin my-new-branch
```
- GitLab prompts you with a direct link for creating a merge request:
+ To reduce the number of fields to edit later in the merge request, use
+ [push options](../push_options.md) to set the value of fields.
+
+1. In the response to the `git push`, GitLab provides a direct link to create the merge request:
```plaintext
...
@@ -135,9 +151,6 @@ You can create a merge request by running Git commands on your local machine.
1. Copy the link and paste it in your browser.
-You can add other [flags to commands when pushing through the command line](../push_options.md)
-to reduce the need for editing merge requests manually through the UI.
-
## When you work in a fork
You can create a merge request from your fork to contribute back to the main project.
@@ -220,3 +233,19 @@ To have merge requests from a fork by default target your own fork
1. In the **Target project** section, select the option you want to use for
your default target project.
1. Select **Save changes**.
+
+## Troubleshooting
+
+### No option to create a merge request on an issue
+
+The option to **Create merge request** doesn't display on an issue if:
+
+- A branch with the same name already exists.
+- A merge request already exists for this branch.
+- Your project has an active fork relationship.
+- Your project is private and the issue is confidential.
+
+To make this button appear, one possible workaround is to
+[remove your project's fork relationship](../repository/forking_workflow.md#unlink-a-fork).
+After removal, the fork relationship cannot be restored. This project can no longer
+be able to receive or send merge requests to the source project, or other forks.