diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-01 21:10:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-01 21:10:40 +0300 |
commit | 9cf7b70ac7b17ea3310ebdf83e94d1d5fd248b82 (patch) | |
tree | 696b197abf9a8d3b44c2635b907d20d52c6136fb /doc | |
parent | 4212e9c2d42fb35dda8694ca5b448e10ffc98211 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
22 files changed, 710 insertions, 154 deletions
diff --git a/doc/.vale/gitlab/spelling-exceptions.txt b/doc/.vale/gitlab/spelling-exceptions.txt index ed505094e75..1e66d12adc9 100644 --- a/doc/.vale/gitlab/spelling-exceptions.txt +++ b/doc/.vale/gitlab/spelling-exceptions.txt @@ -995,7 +995,7 @@ tcpdump teardown templated Thanos -Thoughtbot +thoughtbot throughputs Tiller timebox diff --git a/doc/administration/logs/index.md b/doc/administration/logs/index.md index 30eb536f1c3..f18fa05416b 100644 --- a/doc/administration/logs/index.md +++ b/doc/administration/logs/index.md @@ -66,6 +66,7 @@ Some of these services have their own environment variables to override the log | Sidekiq (server) | `INFO` | | | Snowplow Tracker | `FATAL` | | | gRPC Client (Gitaly) | `WARN` | `GRPC_LOG_LEVEL` | +| LLM | `INFO` | `LLM_DEBUG` | ## Log Rotation diff --git a/doc/development/ai_features.md b/doc/development/ai_features.md index 52dc37caec3..3924afcd494 100644 --- a/doc/development/ai_features.md +++ b/doc/development/ai_features.md @@ -133,9 +133,13 @@ To populate the embedding database for GitLab chat: ### Debugging To gather more insights about the full request, use the `Gitlab::Llm::Logger` file to debug logs. +The default logging level on production is `INFO` and **must not** be used to log any data that could contain personal identifying information. + To follow the debugging messages related to the AI requests on the abstraction layer, you can use: ```shell +export LLM_DEBUG=1 +gdk start tail -f log/llm.log ``` diff --git a/doc/development/backend/ruby_style_guide.md b/doc/development/backend/ruby_style_guide.md index 714c8571d20..5e71ed66df6 100644 --- a/doc/development/backend/ruby_style_guide.md +++ b/doc/development/backend/ruby_style_guide.md @@ -161,6 +161,145 @@ def method end ``` +## Avoid ActiveRecord callbacks + +[ActiveRecord callbacks](https://guides.rubyonrails.org/active_record_callbacks.html) allow +you to "trigger logic before or after an alteration of an object's state." + +Use callbacks when no superior alternative exists, but employ them only if you +thoroughly understand the reasons for doing so. + +When adding new lifecycle events for ActiveRecord objects, it is preferable to +add the logic to a service class instead of a callback. + +## Why callbacks shoud be avoided + +In general, callbacks should be avoided because: + +- Callbacks are hard to reason about because invocation order is not obvious and + they break code narrative. +- Callbacks are harder to locate and navigate because they rely on reflection to + trigger rather than being ordinary method calls. +- Callbacks make it difficult to apply changes selectively to an object's state + because changes always trigger the entire callback chain. +- Callbacks trap logic in the ActiveRecord class. This tight coupling encourages + fat models that contain too much business logic, which could instead live in + service objects that are more reusable, composable, and are easier to test. +- Illegal state transitions of an object can be better enforced through + attribute validations. +- Heavy use of callbacks affects factory creation speed. With some classes + having hundreds of callbacks, creating an instance of that object for + an automated test can be a very slow operation, resulting in slow specs. + +Some of these examples are discussed in this [video from thoughtbot](https://www.youtube.com/watch?v=GLBMfB8N1G8). + +The GitLab codebase relies heavily on callbacks and it is hard to refactor them +once added due to invisible dependencies. As a result, this guideline does not +call for removing all existing callbacks. + +### When to use callbacks + +Callbacks can be used in special cases. Some examples of cases where adding a +callback makes sense: + +- A dependency uses callbacks and we would like to override the callback + behavior. +- Incrementing cache counts. +- Data normalization that only relates to data on the current model. + +### Example of moving from a callback to a service + +There is a project with the following basic data model: + +```ruby +class Project + has_one :repository +end + +class Repository + belongs_to :project +end +``` + +Say we want to create a repository after a project is created and use the +project name as the repository name. A developer familiar with Rails might +immediately think: sounds like a job for an ActiveRecord callback! And add this +code: + +```ruby +class Project + has_one :repository + + after_initialize :create_random_name + after_create :create_repository + + def create_random_name + SecureRandom.alphanumeric + end + + def create_repository + Repository.create!(project: self) + end +end + +class Repository + after_initialize :set_name + + def set_name + name = project.name + end +end + +class ProjectsController + def create + Project.create! # also creates a repository and names it + end +end +``` + +While this seems pretty harmless for a baby Rails app, adding this type of logic +via callbacks has many downsides once your Rails app becomes large and complex +(all of which are listed in this documentation). Instead, we can add this +logic to a service class: + +```ruby +class Project + has_one :repository +end + +class Repository + belongs_to :project +end + +class ProjectCreator + def self.execute + ActiveRecord::Base.transaction do + name = SecureRandom.alphanumeric + project = Project.create!(name: name) + Repository.create!(project: project, name: name) + end + end +end + +class ProjectsController + def create + ProjectCreator.execute + end +end +``` + +With an application this simple, it can be hard to see the benefits of the second +approach. But we already some benefits: + +- Can test `Repository` creation logic separate from `Project` creation logic. Code + no longer violates law of demeter (`Repository` class doesn't need to know + `project.name`). +- Clarity of invocation order. +- Open to change: if we decide there are some scenarios where we do not want a + repository created for a project, we can create a new service class rather + than needing to refactor to `Project` and `Repository` classes. +- Each instance of a `Project` factory does not create a second (`Repository`) object. + ## Styles we have no opinion on If a RuboCop rule is proposed and we choose not to add it, we should document that decision in this guide so it is more discoverable and link the relevant discussion as a reference. diff --git a/doc/development/testing_guide/index.md b/doc/development/testing_guide/index.md index 38fda1bb742..68d30ff6656 100644 --- a/doc/development/testing_guide/index.md +++ b/doc/development/testing_guide/index.md @@ -10,8 +10,8 @@ This document describes various guidelines and best practices for automated testing of the GitLab project. It is meant to be an _extension_ of the -[Thoughtbot testing style guide](https://github.com/thoughtbot/guides/tree/master/testing-rspec). If -this guide defines a rule that contradicts the Thoughtbot guide, this guide +[thoughtbot testing style guide](https://github.com/thoughtbot/guides/tree/master/testing-rspec). If +this guide defines a rule that contradicts the thoughtbot guide, this guide takes precedence. Some guidelines may be repeated verbatim to stress their importance. diff --git a/doc/integration/glab/img/glabgettingstarted.gif b/doc/editor_extensions/gitlab_cli/img/glabgettingstarted.gif Binary files differindex cf335294e41..cf335294e41 100644 --- a/doc/integration/glab/img/glabgettingstarted.gif +++ b/doc/editor_extensions/gitlab_cli/img/glabgettingstarted.gif diff --git a/doc/editor_extensions/gitlab_cli/index.md b/doc/editor_extensions/gitlab_cli/index.md new file mode 100644 index 00000000000..aae04c36210 --- /dev/null +++ b/doc/editor_extensions/gitlab_cli/index.md @@ -0,0 +1,108 @@ +--- +stage: Create +group: Code Review +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# GitLab CLI - `glab` + +GLab is an open source GitLab CLI tool. It brings GitLab to your terminal: +next to where you are already working with Git and your code, without +switching between windows and browser tabs. + +- Work with issues. +- Work with merge requests. +- Watch running pipelines directly from your CLI. + +![command example](img/glabgettingstarted.gif) + +The GitLab CLI uses commands structured like `glab <command> <subcommand> [flags]` +to perform many of the actions you usually do from the GitLab user interface: + +```shell +# Sign in +glab auth login --stdin < token.txt + +# View a list of issues +glab issue list + +# Create merge request for issue 123 +glab mr for 123 + +# Check out the branch for merge request 243 +glab mr checkout 243 + +# Watch the pipeline in progress +glab pipeline ci view + +# View, approve, and merge the merge request +glab mr view +glab mr approve +glab mr merge +``` + +## Core commands + +- [`glab alias`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/alias) +- [`glab api`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/api) +- [`glab auth`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/auth) +- [`glab check-update`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/check-update) +- [`glab ci`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/ci) +- [`glab completion`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/completion) +- [`glab config`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/config) +- [`glab incident`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/incident) +- [`glab issue`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/issue) +- [`glab label`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/label) +- [`glab mr`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/mr) +- [`glab release`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/release) +- [`glab repo`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/repo) +- [`glab schedule`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/schedule) +- [`glab snippet`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/snippet) +- [`glab ssh-key`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/ssh-key) +- [`glab user`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/user) +- [`glab variable`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/variable) + +## Install the CLI + +Installation instructions are available in the GLab +[`README`](https://gitlab.com/gitlab-org/cli/#installation). + +## Authenticate with GitLab + +To authenticate with your GitLab account, run `glab auth login`. +`glab` respects tokens set using `GITLAB_TOKEN`. + +## Report issues + +Open an issue in the [`gitlab-org/cli` repository](https://gitlab.com/gitlab-org/cli/-/issues/new) +to send us feedback. + +## Related topics + +- [Install the CLI](https://gitlab.com/gitlab-org/cli/-/blob/main/README.md#installation) +- [Documentation](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source) +- Extension source code in the [`cli`](https://gitlab.com/gitlab-org/cli/) project + +## Troubleshooting + +### `glab completion` commands fail when using the 1Password shell plugin + +The [1Password shell plugin](https://developer.1password.com/docs/cli/shell-plugins/gitlab/) +adds the alias `glab='op plugin run -- glab'`, which can interfere with the `glab completion` +command. If your `glab completion` commands fail, configure your shell to prevent expanding aliases +before performing completions: + +- For Zsh, edit your `~/.zshrc` file and add this line: + + ```plaintext + setopt completealiases + ``` + +- For Bash, edit your `~/.bashrc` file and add this line: + + ```plaintext + complete -F _functionname glab + ``` + +For more information, see [issue 122](https://github.com/1Password/shell-plugins/issues/122) +for the 1Password shell plugin. diff --git a/doc/editor_extensions/index.md b/doc/editor_extensions/index.md new file mode 100644 index 00000000000..11220bc716c --- /dev/null +++ b/doc/editor_extensions/index.md @@ -0,0 +1,27 @@ +--- +stage: Create +group: Code Review +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# Editor and IDE Extensions + +GitLab has plugins and extensions to extend GitLab functionality to the following editors: + +- [Visual Studio Code](visual_studio_code/index.md) +- [JetBrains IDEs](jetbrains_ide/index.md) +- [Visual Studio](visual_studio/index.md) +- [Neovim](neovim/index.md) + +GitLab also supports developers in their command line interface with [`glab`](gitlab_cli/index.md) the GitLab CLI. + +## Features + +A complete list of the features and capabilities of each extension can be found in the documentation home for each extension. + +## Related topics + +- [How we created a GitLab Workflow Extension for VS Code](https://about.gitlab.com/blog/2020/07/31/use-gitlab-with-vscode/) +- [GitLab for Visual Studio](https://about.gitlab.com/blog/2023/06/29/gitlab-visual-studio-extension/) +- [GitLab for JetBrains and Neovim](https://about.gitlab.com/blog/2023/07/25/gitlab-jetbrains-neovim-plugins/) +- [Put `glab` at your fingertips with the GitLab CLI](https://about.gitlab.com/blog/2022/12/07/introducing-the-gitlab-cli/) diff --git a/doc/editor_extensions/jetbrains_ide/index.md b/doc/editor_extensions/jetbrains_ide/index.md new file mode 100644 index 00000000000..dcf13570b11 --- /dev/null +++ b/doc/editor_extensions/jetbrains_ide/index.md @@ -0,0 +1,52 @@ +--- +stage: Create +group: Code Review +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# GitLab plugin for JetBrains IDEs + +The [GitLab plugin](https://plugins.jetbrains.com/plugin/22325-gitlab) +integrates GitLab with JetBrains IDEs. The following JetBrains IDEs are supported: + +- IntelliJ IDEA Ultimate — 2023.2 +- AppCode — build 232.7754.73 — 232.* +- Rider — 2023.2-RC1 (rc) +- DataGrip — 2023.2 +- DataSpell — 2023.2 +- GoLand — 2023.2 +- Aqua — 2023.2 (preview) +- Android Studio — build 232.7754.73 — 232.* +- MPS — build 232.7754.73 — 232.* +- RubyMine — 2023.2 +- PhpStorm — 2023.2 (rc) +- PyCharm Community — 2023.2 +- IntelliJ IDEA Community — 2023.2 +- PyCharm Educational — build 232.7754.73 — 232.* +- WebStorm — 2023.2 +- CLion — 2023.2 +- IntelliJ IDEA Educational — build 232.7754.73 — 232.* +- PyCharm Professional — 2023.2 + +## Supported features + +GitLab for JetBrains supports [GitLab Duo Code Suggestions](../../user/project/repository/code_suggestions.md). + +## Download the extension + +Download the extension from the [JetBrains Plugin Marketplace](https://plugins.jetbrains.com/plugin/22325-gitlab). + +## Configure the extension + +Instructions for getting started can be found in the project README under [setup](https://gitlab.com/gitlab-org/editor-extensions/gitlab-jetbrains-plugin#setup). + +## Report issues with the extension + +Report any issues, bugs, or feature requests in the +[`gitlab-jetbrains-plugin` issue queue](https://gitlab.com/gitlab-org/editor-extensions/gitlab-jetbrains-plugin/-/issues). + +## Related topics + +- [Download the plugin](https://plugins.jetbrains.com/plugin/22325-gitlab) +- [Plugin documentation](https://gitlab.com/gitlab-org/editor-extensions/gitlab-jetbrains-plugin/-/blob/main/README.md) +- [View source code](https://gitlab.com/gitlab-org/editor-extensions/gitlab-jetbrains-plugin) diff --git a/doc/editor_extensions/neovim/index.md b/doc/editor_extensions/neovim/index.md new file mode 100644 index 00000000000..e2e410ae82c --- /dev/null +++ b/doc/editor_extensions/neovim/index.md @@ -0,0 +1,30 @@ +--- +stage: Create +group: Code Review +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# GitLab plugin for Neovim - `gitlab.vim` + +The [GitLab plugin](https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim) +integrates GitLab with Neovim. The following Neovim versions are supported: + +- 0.9+ + +## Supported features + +GitLab for Neovim supports [GitLab Duo Code Suggestions](../../user/project/repository/code_suggestions.md). + +## Install and configure the extension + +Instructions for getting started can be found in the project README under [setup](https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim#setup). + +## Report issues with the extension + +Report any issues, bugs, or feature requests in the +[`gitlab.vim` issue queue](https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim/-/issues). + +## Related topics + +- [Plugin documentation](https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim/-/blob/main/README.md) +- [View source code](https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim) diff --git a/doc/editor_extensions/visual_studio/index.md b/doc/editor_extensions/visual_studio/index.md new file mode 100644 index 00000000000..744f7759bf5 --- /dev/null +++ b/doc/editor_extensions/visual_studio/index.md @@ -0,0 +1,36 @@ +--- +stage: Create +group: Code Review +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# GitLab extension for Visual Studio + +The [GitLab extension](https://marketplace.visualstudio.com/items?itemName=GitLab.GitLabExtensionForVisualStudio) +integrates GitLab with Visual Studio. The following Visual Studio versions are supported: + +- Visual Studio 2022 (AMD64) +- Visual Studio 2022 (Arm64) + +## Supported features + +GitLab for Visual Studio supports [GitLab Duo Code Suggestions](../../user/project/repository/code_suggestions.md). + +## Download the extension + +Download the extension from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=GitLab.GitLabExtensionForVisualStudio). + +## Configure the extension + +Instructions for getting started can be found in the project README under [setup](https://gitlab.com/gitlab-org/editor-extensions/gitlab-visual-studio-extension/#setup). + +## Report issues with the extension + +Report any issues, bugs, or feature requests in the +[`gitlab-visual-studio-extension` issue queue](https://gitlab.com/gitlab-org/editor-extensions/gitlab-visual-studio-extension/-/issues). + +## Related topics + +- [Download the plugin](https://marketplace.visualstudio.com/items?itemName=GitLab.GitLabExtensionForVisualStudio) +- [Plugin documentation](https://gitlab.com/gitlab-org/editor-extensions/gitlab-visual-studio-extension/-/blob/main/README.md) +- [View source code](https://gitlab.com/gitlab-org/editor-extensions/gitlab-visual-studio-extension) diff --git a/doc/editor_extensions/visual_studio_code/index.md b/doc/editor_extensions/visual_studio_code/index.md new file mode 100644 index 00000000000..7c49879be13 --- /dev/null +++ b/doc/editor_extensions/visual_studio_code/index.md @@ -0,0 +1,49 @@ +--- +stage: Create +group: IDE +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# GitLab Workflow extension for VS Code + +The [GitLab Workflow extension](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow) +integrates GitLab with Visual Studio Code. You can decrease context switching and +do more day-to-day tasks in Visual Studio Code, such as: + +- [View issues](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#browse-issues-review-mrs). +- Run [common commands](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#commands) + from the Visual Studio Code [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette). +- Create and [review](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#merge-request-reviews) + merge requests directly from Visual Studio Code. +- [Validate your GitLab CI/CD configuration](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#validate-gitlab-cicd-configuration). +- [View the status of your pipeline](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#information-about-your-branch-pipelines-mr-closing-issue). +- [View the output of CI/CD jobs](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#view-the-job-output). +- [Create](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#create-snippet) + and paste snippets to, and from, your editor. +- [Browse repositories](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#browse-a-repository-without-cloning) + without cloning them. +- [Receive Code Suggestions](../../user/project/repository/code_suggestions.md). + +## Download the extension + +Download the extension from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow). + +## Configure the extension + +After you [download the extension](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow) +you can [configure](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#extension-settings): + +- [Features to display or hide](https://gitlab.com/gitlab-org/gitlab-vscode-extension#extension-settings). +- [Self-signed certificate](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#self-signed-certificates) information. +- [Code Suggestions](../../user/project/repository/code_suggestions.md). + +## Report issues with the extension + +Report any issues, bugs, or feature requests in the +[`gitlab-vscode-extension` issue queue](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues). + +## Related topics + +- [Download the extension](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow) +- [Extension documentation](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/README.md) +- [View source code](https://gitlab.com/gitlab-org/gitlab-vscode-extension/) diff --git a/doc/integration/glab/index.md b/doc/integration/glab/index.md index aae04c36210..29cec231d51 100644 --- a/doc/integration/glab/index.md +++ b/doc/integration/glab/index.md @@ -1,108 +1,11 @@ --- -stage: Create -group: Code Review -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +redirect_to: '../../editor_extensions/gitlab_cli/index.md' +remove_date: '2023-10-31' --- -# GitLab CLI - `glab` +This document was moved to [another location](../../editor_extensions/gitlab_cli/index.md). -GLab is an open source GitLab CLI tool. It brings GitLab to your terminal: -next to where you are already working with Git and your code, without -switching between windows and browser tabs. - -- Work with issues. -- Work with merge requests. -- Watch running pipelines directly from your CLI. - -![command example](img/glabgettingstarted.gif) - -The GitLab CLI uses commands structured like `glab <command> <subcommand> [flags]` -to perform many of the actions you usually do from the GitLab user interface: - -```shell -# Sign in -glab auth login --stdin < token.txt - -# View a list of issues -glab issue list - -# Create merge request for issue 123 -glab mr for 123 - -# Check out the branch for merge request 243 -glab mr checkout 243 - -# Watch the pipeline in progress -glab pipeline ci view - -# View, approve, and merge the merge request -glab mr view -glab mr approve -glab mr merge -``` - -## Core commands - -- [`glab alias`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/alias) -- [`glab api`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/api) -- [`glab auth`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/auth) -- [`glab check-update`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/check-update) -- [`glab ci`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/ci) -- [`glab completion`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/completion) -- [`glab config`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/config) -- [`glab incident`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/incident) -- [`glab issue`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/issue) -- [`glab label`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/label) -- [`glab mr`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/mr) -- [`glab release`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/release) -- [`glab repo`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/repo) -- [`glab schedule`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/schedule) -- [`glab snippet`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/snippet) -- [`glab ssh-key`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/ssh-key) -- [`glab user`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/user) -- [`glab variable`](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source/variable) - -## Install the CLI - -Installation instructions are available in the GLab -[`README`](https://gitlab.com/gitlab-org/cli/#installation). - -## Authenticate with GitLab - -To authenticate with your GitLab account, run `glab auth login`. -`glab` respects tokens set using `GITLAB_TOKEN`. - -## Report issues - -Open an issue in the [`gitlab-org/cli` repository](https://gitlab.com/gitlab-org/cli/-/issues/new) -to send us feedback. - -## Related topics - -- [Install the CLI](https://gitlab.com/gitlab-org/cli/-/blob/main/README.md#installation) -- [Documentation](https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source) -- Extension source code in the [`cli`](https://gitlab.com/gitlab-org/cli/) project - -## Troubleshooting - -### `glab completion` commands fail when using the 1Password shell plugin - -The [1Password shell plugin](https://developer.1password.com/docs/cli/shell-plugins/gitlab/) -adds the alias `glab='op plugin run -- glab'`, which can interfere with the `glab completion` -command. If your `glab completion` commands fail, configure your shell to prevent expanding aliases -before performing completions: - -- For Zsh, edit your `~/.zshrc` file and add this line: - - ```plaintext - setopt completealiases - ``` - -- For Bash, edit your `~/.bashrc` file and add this line: - - ```plaintext - complete -F _functionname glab - ``` - -For more information, see [issue 122](https://github.com/1Password/shell-plugins/issues/122) -for the 1Password shell plugin. +<!-- This redirect file can be deleted after <2023-10-31>. --> +<!-- Redirects that point to other docs in the same project expire in three months. --> +<!-- Redirects that point to docs in a different project or site (link is not relative and starts with `https:`) expire in one year. --> +<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html --> diff --git a/doc/tutorials/boards_for_teams/index.md b/doc/tutorials/boards_for_teams/index.md index 4e0e50971d3..fd8a1fe92a9 100644 --- a/doc/tutorials/boards_for_teams/index.md +++ b/doc/tutorials/boards_for_teams/index.md @@ -82,7 +82,8 @@ Prerequisites: To create a blank project: -1. In your group, on the right of the page, select **New project**. +1. In your group, on the left sidebar, at the top, select **Create new** (**{plus}**) and then select + **In this group > New project/repository**. 1. Select **Create blank project**. 1. Enter the project details: - In the **Project name** field, name your project `Paperclip Assistant`. @@ -170,7 +171,7 @@ To create an issue from your board: 1. In the upper-left corner of the issue board page, select the dropdown list with the current board name. 1. Select **UX workflow**. -1. On the `Workflow::Ready for development` list, select **List actions** (**{ellipsis_v}**) **> Create new issue**. +1. On the `Workflow::Ready for development` list, select **Create new issue** (**{plus}**). 1. Complete the fields: 1. Under **Title**, enter `Redesign user profile page`. 1. Under **Projects**, select **Paperclip Software Factory / Paperclip Assistant**. diff --git a/doc/tutorials/issue_triage/img/priority_labels_v16_3.png b/doc/tutorials/issue_triage/img/priority_labels_v16_3.png Binary files differnew file mode 100644 index 00000000000..afcf1752955 --- /dev/null +++ b/doc/tutorials/issue_triage/img/priority_labels_v16_3.png diff --git a/doc/tutorials/issue_triage/img/triage_board_v16_3.png b/doc/tutorials/issue_triage/img/triage_board_v16_3.png Binary files differnew file mode 100644 index 00000000000..c32352a454e --- /dev/null +++ b/doc/tutorials/issue_triage/img/triage_board_v16_3.png diff --git a/doc/tutorials/issue_triage/img/triage_report_v16_3.png b/doc/tutorials/issue_triage/img/triage_report_v16_3.png Binary files differnew file mode 100644 index 00000000000..91548a1a17d --- /dev/null +++ b/doc/tutorials/issue_triage/img/triage_report_v16_3.png diff --git a/doc/tutorials/issue_triage/index.md b/doc/tutorials/issue_triage/index.md new file mode 100644 index 00000000000..d901e4fc495 --- /dev/null +++ b/doc/tutorials/issue_triage/index.md @@ -0,0 +1,232 @@ +--- +stage: Plan +group: Project Management +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +--- + +# Tutorial: Set up a single project for issue triage **(FREE)** + +<!-- vale gitlab.FutureTense = NO --> + +Issue triage is the process of categorization according to type and severity. +As your project grows and people create more issues, it's worth creating a workflow for how you'll +triage incoming issues. + +In this tutorial, you'll learn how to set up a GitLab project for this. + +To set up GitLab for issue triage in a project: + +1. [Create a project](#create-a-project) +1. [Decide on the criteria for types, severity, and priority](#decide-on-the-criteria-for-types-severity-and-priority) +1. [Document your criteria](#document-your-criteria) +1. [Create scoped labels](#create-scoped-labels) +1. [Prioritize the new labels](#prioritize-the-new-labels) +1. [Create an issue triage board](#create-an-issue-triage-board) +1. [Create issues for features](#create-issues-for-features) + +## Prerequisites + +- If you're using an existing project for this tutorial, make sure you have at least the Reporter role + for the project. +- If you follow the steps below and later decide to create a parent group for your project, to make + best use of labels, you'll have to promote the project labels to group labels. + Consider creating a group first. + +## Create a project + +A project contains the issues that are used for planning your upcoming code changes. + +If you already have a project you're working in, proceed to +[Decide on the criteria for types, severity, and priority](#decide-on-the-criteria-for-types-severity-and-priority). + +To create a blank project: + +1. On the left sidebar, at the top, select **Create new** (**{plus}**) and **New project/repository**. +1. Select **Create blank project**. +1. Enter the project details. + - For **Project name**, enter `Issue triage tutorial`. +1. Select **Create project**. + +## Decide on the criteria for types, severity, and priority + +Next, you'll need to determine: + +- **Types** of issues you want to recognize. If you need a more granular approach, you + can also create subtypes for each type. Types help categorize work to get an understanding of the + kind of work that is requested of your team. +- Levels of **priorities** and **severities** to define the impact that incoming work has on end + users and to assist in prioritization. + +For this tutorial, suppose you've decided on the following: + +- Type: `Bug`, `Feature`, and `Maintenance` +- Priority: `1`, `2`, `3`, and `4` +- Severity: `1`, `2`, `3`, and `4` + +For inspiration, see how we define these at GitLab: + +- [Types and subtypes](https://about.gitlab.com/handbook/engineering/metrics/#work-type-classification) +- [Priority](https://about.gitlab.com/handbook/engineering/quality/issue-triage/#priority) +- [Severity](https://about.gitlab.com/handbook/engineering/quality/issue-triage/#severity) + +## Document your criteria + +After you agree on all the criteria, write it all down somewhere your team mates can always access. + +For example, add it to a [wiki](../../user/project/wiki/index.md) in your project, or your company +handbook published with [GitLab Pages](../../user/project/pages/index.md). + +<!-- Idea for expanding this tutorial: + Add steps for [creating a wiki page](../../user/project/wiki/index.md#create-a-new-wiki-page). --> + +## Create scoped labels **(PREMIUM)** + +Next, you'll create labels to add to issues to categorize them. + +The best tool for this is [scoped labels](../../user/project/labels.md#scoped-labels), which you +can use to set mutually exclusive attributes. + +Checking with the list of types, severities, and priorities you've assembled +[previously](#decide-on-the-criteria-for-types-severity-and-priority), you'll want to create matching +scoped labels. + +The double colon (`::`) in the name of a scoped label prevents two labels of the same scope being +used together. +For example, if you add the `type::feature` label to an issue that already has `type::bug`, the +previous one is removed. + +NOTE: +Scoped labels are available in the Premium and Ultimate tier. +If you're on the Free tier, you can use regular labels instead. +However, they aren't mutually exclusive. + +To create each label: + +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your project. +1. Select **Manage > Labels**. +1. Select **New label**. +1. In the **Title** field, enter the name of the label. Start with `type::bug`. +1. Optional. Select a color by selecting from the available colors, or enter a hex color value for + a specific color in the **Background color** field. +1. Select **Create label**. + +Repeat these steps to create all the labels you'll need: + +- `type::bug` +- `type::feature` +- `type::maintenance` +- `priority::1` +- `priority::2` +- `priority::3` +- `priority::4` +- `severity::1` +- `severity::2` +- `severity::3` +- `severity::4` + +## Prioritize the new labels + +Now, set the new labels as priority labels, which ensures that the most important issues show on top +of the issue list if you sort by priority or label priority. + +To learn what happens when you sort by priority or label priority, see +[Sorting and ordering issue lists](../../user/project/issues/sorting_issue_lists.md). + +To prioritize a label: + +1. On the Labels page, next to a label you want to prioritize, select the star (**{star-o}**). + This label now appears at the top of the label list, under **Prioritized labels**. +1. To change the relative priority of these labels, drag them up and down the list. + The labels higher in the list get higher priority. +1. Prioritize all the labels you created previously. + Make sure that labels of higher priority and severity are higher on the list than the lower values. + +![List of priority labels](img/priority_labels_v16_3.png) + +## Create an issue triage board + +To prepare for the incoming issue backlog, create an [issue board](../../user/project/issue_board.md) that organizes issues by label. +You'll use it to quickly create issues and add labels to them by dragging cards to various lists. + +To set up your issue board: + +1. Decide on the scope of the board. For example, create one that you'll use to assign + severity to issues. +1. On the left sidebar, at the top, select **Search GitLab** (**{search}**) to find your + **Issue triage tutorial** project. +1. Select **Plan > Issue boards**. +1. In the upper-left corner of the issue board page, select the dropdown list with the current board name. +1. Select **Create new board**. +1. In the **Title field**, enter `Issue triage (by severity)`. +1. Keep the **Show the Open list** checkbox selected and clear the **Show the Closed list** one. +1. Select **Create board**. You should see an empty board. +1. Create a list for the `severity::1` label: + 1. In the upper-left corner of the issue board page, select **Create list**. + 1. In the column that appears, from the **Value** dropdown list, select the `severity::1` label. + 1. Select **Add to board**. +1. Repeat the previous step for labels `severity::2`, `severity::3`, and `severity::4`. + +For now, the lists in your board should be empty. Next, you'll populate them with some issues. + +## Create issues for features + +To track upcoming features and bugs, you must create some issues. +Issues belong in projects, but you can also create them directly from your issue board. + +Start by creating some issues for planned features. +You can create issues for bugs as you find them (hopefully not too many!). + +To create an issue from your **Issue triage (by severity)** board: + +1. On the **Open** list, select **Create new issue** (**{plus}**). + The **Open** list shows issues that don't fit any other board list. + + If you already know which severity label your issue should have, you can create it directly from that label list. + Each issue created from a label list will be given that label. +1. Complete the fields: + - Under **Title**, enter `User registration`. +1. Select **Create issue**. +1. Repeat these steps to create a few more issues. + + For example, if you're building an app, create the following issues: + + - `User registration` + - `Profile creation` + - `Search functionality` + - `Add to favorites` + - `Push notifications` + - `Social sharing` + - `In-app messaging` + - `Track progress` + - `Feedback and ratings` + - `Settings and preferences` + +Your first triage issue board is ready! +Try it out by dragging some issues from the **Open** list to one of the label lists to add one of +the severity labels. + +![Triage issue board with example issues](img/triage_board_v16_3.png) + +## Next steps + +Next, you can: + +- Tweak how you use issue boards. Some options include: + - Edit your current issue board to also have lists for priority and type labels. + This way, you'll make the board wider and might require some horizontal scrolling. + - Create separate issue boards named `Issue triage (by priority)` and `Issue triage (by type)`. + This way, you'll keep various types of triage work separate, but will require switching between + boards. + - [Set up issue boards for team hand-off](../boards_for_teams/index.md). +- Browse issues by priority or severity in issue lists, + [filtered by each label](../../user/project/issues/managing_issues.md#filter-the-list-of-issues). + If it's available to you, make use of + [the "is one of" filter operator](../../user/project/issues/managing_issues.md#filter-with-the-or-operator). +- Break the issues down into [tasks](../../user/tasks.md). +- Create policies that help automate issue triage in a project with the [`gitlab-triage` gem](https://gitlab.com/gitlab-org/ruby/gems/gitlab-triage). + Generate summary reports with heatmaps like the following: + + ![Example triage report heatmap](img/triage_report_v16_3.png) + +To learn more about issue triage at GitLab, see [Issue Triage](https://about.gitlab.com/handbook/engineering/quality/issue-triage/) +and [Triage Operations](https://about.gitlab.com/handbook/engineering/quality/triage-operations/). diff --git a/doc/tutorials/plan_and_track.md b/doc/tutorials/plan_and_track.md index b79e9f9d6cf..7dcafbd26ce 100644 --- a/doc/tutorials/plan_and_track.md +++ b/doc/tutorials/plan_and_track.md @@ -16,5 +16,6 @@ issues, epics, and more. | [Migrate to GitLab](../user/project/import/index.md) | If you are coming to GitLab from another platform, you can import or convert your projects. | | | [Build a protected workflow for your project](protected_workflow/index.md) | Set up a workflow for your teams, and enforce protections with approval rules. | | | [Run an agile iteration](agile_sprint/index.md) | Use group, projects, and iterations to run an agile development iteration. | +| [Set up a single project for issue triage](issue_triage/index.md) | Use labels to set up a project for issue triage. | **{star}** | | [Set up issue boards for team hand-off](boards_for_teams/index.md) | Use issue boards and scoped labels to set up collaboration across many teams. | **{star}** | | <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [Epics and Issue Boards](https://www.youtube.com/watch?v=I1bFIAQBHB8) | Find out how to use epics and issue boards for project management. | | diff --git a/doc/update/index.md b/doc/update/index.md index 0b0c7b23a2b..dd2dd980e91 100644 --- a/doc/update/index.md +++ b/doc/update/index.md @@ -340,6 +340,10 @@ and [Helm Chart deployments](https://docs.gitlab.com/charts/). They come with ap - Impacted versions: GitLab versions 15.2 - 15.11 - Version 16.0 and later are not impacted. Note, 15.11 is a mandatory upgrade stop on the way to 16.0. +### 15.11.x + +- A [bug](https://gitlab.com/gitlab-org/gitlab/-/issues/411604) can cause new LDAP users signing in for the first time to be assigned a username based on their email address instead of their LDAP username attribute. A manual workaround is to set `gitlab_rails['omniauth_auto_link_ldap_user'] = true`, or upgrade to GitLab 16.1 or later where the bug has been fixed. + ### 15.10.5 - Many [project importers](../user/project/import/index.md) and [group importers](../user/group/import/index.md) now diff --git a/doc/user/project/labels.md b/doc/user/project/labels.md index 7f98b62cabf..eea3657a129 100644 --- a/doc/user/project/labels.md +++ b/doc/user/project/labels.md @@ -455,6 +455,13 @@ The labels higher in the list get higher priority. To learn what happens when you sort by priority or label priority, see [Sorting and ordering issue lists](issues/sorting_issue_lists.md). +## Related topics + +Practice working with labels in the following tutorials: + +- [Set up a single project for issue triage](../../tutorials/issue_triage/index.md) +- [Set up issue boards for team hand-off](../../tutorials/boards_for_teams/index.md) + ## Troubleshooting ### Some label titles end with `_duplicate<number>` diff --git a/doc/user/project/repository/vscode.md b/doc/user/project/repository/vscode.md index 2a33476b545..476cfc55298 100644 --- a/doc/user/project/repository/vscode.md +++ b/doc/user/project/repository/vscode.md @@ -1,49 +1,11 @@ --- -stage: Create -group: IDE -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +redirect_to: '../../../editor_extensions/visual_studio_code/index.md' +remove_date: '2023-10-31' --- -# GitLab Workflow extension for VS Code **(FREE)** +This document was moved to [another location](../../../editor_extensions/visual_studio_code/index.md). -The [GitLab Workflow extension](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow) -integrates GitLab with Visual Studio Code. You can decrease context switching and -do more day-to-day tasks in Visual Studio Code, such as: - -- [View issues](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#browse-issues-review-mrs). -- Run [common commands](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#commands) - from the Visual Studio Code [command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette). -- Create and [review](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#merge-request-reviews) - merge requests directly from Visual Studio Code. -- [Validate your GitLab CI/CD configuration](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#validate-gitlab-cicd-configuration). -- [View the status of your pipeline](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#information-about-your-branch-pipelines-mr-closing-issue). -- [View the output of CI/CD jobs](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#view-the-job-output). -- [Create](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#create-snippet) - and paste snippets to, and from, your editor. -- [Browse repositories](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#browse-a-repository-without-cloning) - without cloning them. -- [Receive Code Suggestions](code_suggestions.md) - -## Download the extension - -Download the extension from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow). - -## Configure the extension - -After you [download the extension](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow) -you can [configure](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#extension-settings): - -- [Features to display or hide](https://gitlab.com/gitlab-org/gitlab-vscode-extension#extension-settings). -- [Self-signed certificate](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow#self-signed-certificates) information. -- [Code Suggestions](code_suggestions.md) - -## Report issues with the extension - -Report any issues, bugs, or feature requests in the -[`gitlab-vscode-extension` issue queue](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues). - -## Related topics - -- [Download the extension](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow) -- [Extension documentation](https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/README.md) -- [View source code](https://gitlab.com/gitlab-org/gitlab-vscode-extension/) +<!-- This redirect file can be deleted after <2023-10-31>. --> +<!-- Redirects that point to other docs in the same project expire in three months. --> +<!-- Redirects that point to docs in a different project or site (link is not relative and starts with `https:`) expire in one year. --> +<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html --> |