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-08-07 18:09:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-08-07 18:09:47 +0300
commit33c86930e0a657e1519082a9a00faae260a44882 (patch)
tree4d65ae193c2c92826a8fc659345e2bb83e101999 /doc
parent28f0cd8e0725320c294f9dbf74c698ee727de594 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r--doc/ci/troubleshooting.md30
-rw-r--r--doc/development/documentation/styleguide/index.md10
-rw-r--r--doc/user/ai_features.md70
-rw-r--r--doc/user/project/merge_requests/ai_in_merge_requests.md120
4 files changed, 167 insertions, 63 deletions
diff --git a/doc/ci/troubleshooting.md b/doc/ci/troubleshooting.md
index ac5976de20a..82e080da2c7 100644
--- a/doc/ci/troubleshooting.md
+++ b/doc/ci/troubleshooting.md
@@ -283,6 +283,36 @@ If the merge train pipeline was canceled before the merge request was merged, wi
- Add it to the train again.
+### Merge request rules widget shows a scan result policy is invalid or duplicated **(ULTIMATE SELF)**
+
+On GitLab self-managed 15.0 and later, the most likely cause is that the project was exported from a
+group and imported into another, and had scan result policy rules. These rules are stored in a
+separate project to the one that was exported. As a result, the project contains policy rules that
+reference entities that don't exist in the imported project's group. The result is policy rules that
+are invalid, duplicated, or both.
+
+To remove all invalid scan result policy rules from a GitLab instance, an administrator can run
+the following script in the [Rails console](../administration/operations/rails_console.md).
+
+```ruby
+Project.joins(:approval_rules).where(approval_rules: { report_type: %i[scan_finding license_scanning] }).where.not(approval_rules: { security_orchestration_policy_configuration_id: nil }).find_in_batches.flat_map do |batch|
+ batch.map do |project|
+ # Get projects and their configuration_ids for applicable project rules
+ [project, project.approval_rules.where(report_type: %i[scan_finding license_scanning]).pluck(:security_orchestration_policy_configuration_id).uniq]
+ end.uniq.map do |project, configuration_ids| # We take only unique combinations of project + configuration_ids
+ # If we find more configurations than what is available for the project, we take records with the extra configurations
+ [project, configuration_ids - project.all_security_orchestration_policy_configurations.pluck(:id)]
+ end.select { |_project, configuration_ids| configuration_ids.any? }
+end.each do |project, configuration_ids|
+ # For each found pair project + ghost configuration, we remove these rules for a given project
+ Security::OrchestrationPolicyConfiguration.where(id: configuration_ids).each do |configuration|
+ configuration.delete_scan_finding_rules_for_project(project.id)
+ end
+ # Ensure we sync any potential rules from new group's policy
+ Security::ScanResultPolicies::SyncProjectWorker.perform_async(project.id)
+end
+```
+
### Project `group/project` not found or access denied
This message is shown if configuration is added with [`include`](yaml/index.md#include) and one of the following:
diff --git a/doc/development/documentation/styleguide/index.md b/doc/development/documentation/styleguide/index.md
index 9d16a840211..a7b63cdacdd 100644
--- a/doc/development/documentation/styleguide/index.md
+++ b/doc/development/documentation/styleguide/index.md
@@ -847,11 +847,12 @@ Sometimes they are more precise and will be maintained more actively.
For each external link you add, weigh the customer benefit with the maintenance difficulties.
-### Links that require permissions
+### Confidential or restricted access links
Don't link directly to:
- [Confidential issues](../../../user/project/issues/confidential_issues.md).
+- Internal handbook pages.
- Project features that require [special permissions](../../../user/permissions.md)
to view.
@@ -862,8 +863,8 @@ These links fail for:
If you must use one of these links:
-- If the link is to a confidential issue, mention that the issue is visible only to GitLab team members, as in the first example.
-- If the link requires a specific role or permissions, mention that information, as in the second example.
+- If the link is to a confidential issue or internal handbook page, mention that the issue or page is visible only to GitLab team members.
+- If the link requires a specific role or permissions, mention that information.
- Put the link in backticks so that it does not cause link checkers to fail.
Examples:
@@ -873,6 +874,9 @@ GitLab team members can view more information in this confidential issue:
`https://gitlab.com/gitlab-org/gitlab/-/issues/<issue_number>`
```
+GitLab team members can view more information in this internal handbook page:
+`https://internal.gitlab.com/handbook/<link>`
+
```markdown
Users with the Maintainer role for the project can use the pipeline editor:
`https://gitlab.com/gitlab-org/gitlab/-/ci/editor`
diff --git a/doc/user/ai_features.md b/doc/user/ai_features.md
index f3732034540..1b9c3d966ea 100644
--- a/doc/user/ai_features.md
+++ b/doc/user/ai_features.md
@@ -49,6 +49,16 @@ The following feature is in Beta:
[Experiment](../policy/experiment-beta-support.md#experiment) AI features require
[Experiment features to be enabled](group/manage.md#enable-experiment-features) as well as [third-party AI services to be enabled](group/manage.md#enable-third-party-ai-features).
+The following features are in Experiment:
+
+- [Fill in merge request templates](project/merge_requests/ai_in_merge_requests.md#fill-in-merge-request-templates)
+- [Summarize merge request changes](project/merge_requests/ai_in_merge_requests.md#summarize-merge-request-changes)
+- [Summarize my merge request review](project/merge_requests/ai_in_merge_requests.md#summarize-my-merge-request-review)
+- [Suggested merge or squash commit message](project/merge_requests/ai_in_merge_requests.md#suggested-merge-or-squash-commit-message)
+- [Generate suggested tests in merge requests](project/merge_requests/ai_in_merge_requests.md#generate-suggested-tests-in-merge-requests)
+
+The rest of the features described on this page are also in the Experiment phase.
+
### Explain Selected Code in the Web UI **(ULTIMATE SAAS)**
> Introduced in GitLab 15.11 as an [Experiment](../policy/experiment-beta-support.md#experiment) on GitLab.com.
@@ -177,66 +187,6 @@ Or, you can add a comment in the [feedback issue](https://gitlab.com/gitlab-org/
NOTE:
Only the last 50 messages are retained in the chat history. The chat history expires 3 days after last use.
-### Summarize merge request changes **(ULTIMATE SAAS)**
-
-> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10401) in GitLab 16.2 as an [Experiment](../policy/experiment-beta-support.md#experiment).
-
-This feature is an [Experiment](../policy/experiment-beta-support.md) on GitLab.com that is powered by OpenAI's GPT-3. It requires the [group-level third-party AI features setting](group/manage.md#enable-third-party-ai-features) to be enabled.
-
-These summaries are automatically generated. They are available on the merge request page in the **Merge request summaries** dialog, the To-Do list, and in email notifications.
-
-Provide feedback on this experimental feature in [issue 408726](https://gitlab.com/gitlab-org/gitlab/-/issues/408726).
-
-**Data usage**: When using this quick action, the diff of changes between the source branch's head and the target branch is sent to the large language model.
-
-### Summarize my merge request review **(ULTIMATE SAAS)**
-
-> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10466) in GitLab 16.0 as an [Experiment](../policy/experiment-beta-support.md#experiment).
-
-This feature is an [Experiment](../policy/experiment-beta-support.md) on GitLab.com that is powered by OpenAI's GPT-3. It requires the [group-level third-party AI features setting](group/manage.md#enable-third-party-ai-features) to be enabled.
-
-When you've completed your review of a merge request and are ready to [submit your review](project/merge_requests/reviews/index.md#submit-a-review), you can have a summary generated for you.
-
-To generate the summary:
-
-1. When you are ready to submit your review, select **Finish review**.
-1. Select **AI Actions** (**{tanuki}**).
-1. Select **Summarize my code review**.
-
-The summary is displayed in the comment box. You can edit and refine the summary prior to submitting your review.
-
-Provide feedback on this experimental feature in [issue 408991](https://gitlab.com/gitlab-org/gitlab/-/issues/408991).
-
-**Data usage**: When you use this feature, the following data is sent to the large language model referenced above:
-
-- Draft comment's text
-- File path of the commented files
-
-### Generate suggested tests in merge requests **(ULTIMATE SAAS)**
-
-> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10366) in GitLab 16.0 as an [Experiment](../policy/experiment-beta-support.md#experiment).
-
-This feature is an [Experiment](../policy/experiment-beta-support.md) on GitLab.com that is powered by OpenAI's GPT-3. It requires the [group-level third-party AI features setting](group/manage.md#enable-third-party-ai-features) to be enabled.
-
-In a merge request, you can get a list of suggested tests for the file you are reviewing. This functionality can help determine if appropriate test coverage has been provided, or if you need more coverage for your project.
-
-View a [click-through demo](https://go.gitlab.com/Xfp0l4).
-
-To generate a test suggestion:
-
-1. In a merge request, select the **Changes** tab.
-1. On the header for the file, in the upper-right corner, select **Options** (**{ellipsis_v}**).
-1. Select **Suggest test cases**.
-
-The test suggestion is generated in a sidebar. You can copy the suggestion to your editor and use it as the start of your tests.
-
-Feedback on this experimental feature can be provided in [issue 408995](https://gitlab.com/gitlab-org/gitlab/-/issues/408995).
-
-**Data usage**: When you use this feature, the following data is sent to the large language model referenced above:
-
-- Contents of the file
-- The filename
-
### Summarize issue discussions **(ULTIMATE SAAS)**
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10344) in GitLab 16.0 as an [Experiment](../policy/experiment-beta-support.md#experiment).
diff --git a/doc/user/project/merge_requests/ai_in_merge_requests.md b/doc/user/project/merge_requests/ai_in_merge_requests.md
new file mode 100644
index 00000000000..c1aa729d8c5
--- /dev/null
+++ b/doc/user/project/merge_requests/ai_in_merge_requests.md
@@ -0,0 +1,120 @@
+---
+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
+---
+
+# AI/ML powered features in merge requests
+
+AI-assisted features in merge requests are designed to provide contextually relevant information during the lifecycle of a merge request.
+
+Additional information on enabling these features and maturity can be found in our [AI/ML Overview](../../ai_features.md).
+
+## Fill in merge request templates **(ULTIMATE SAAS)**
+
+> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10591) in GitLab 16.3 as an [Experiment](../../../policy/experiment-beta-support.md#experiment).
+
+This feature is an [Experiment](../../../policy/experiment-beta-support.md) on GitLab.com that is using Google's Vertex service and the `text-bison` model. It requires the [group-level third-party AI features setting](../../group/manage.md#enable-third-party-ai-features) to be enabled.
+
+Merge requests in projects often have [templates](../description_templates.md#create-a-merge-request-template) defined that need to be filled out. This helps reviewers and other users understand the purpose and changes a merge request might propose.
+
+When creating a merge request you can now choose to generate a description for the merge request based on the contents of the template. This fills in the template and replaces the current contents of the description.
+
+To generate the description:
+
+1. Create a new merge request, go to the **Description** field.
+1. Select **AI Actions** (**{tanuki}**).
+1. Select **Fill in merge request template**.
+
+The updated description is applied to the box. You can edit or revise this description before you finish creating your merge request.
+
+Provide feedback on this experimental feature in [issue 416537](https://gitlab.com/gitlab-org/gitlab/-/issues/416537).
+
+**Data usage**: When you use this feature, the following data is sent to the large language model referenced above:
+
+- Title of the merge request
+- Contents of the description
+- Source branch name
+- Target branch name
+
+## Summarize merge request changes **(ULTIMATE SAAS)**
+
+> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10401) in GitLab 16.2 as an [Experiment](../../../policy/experiment-beta-support.md#experiment).
+
+This feature is an [Experiment](../../../policy/experiment-beta-support.md) on GitLab.com that is using Google's Vertex service and the `text-bison` model. It requires the [group-level third-party AI features setting](../../group/manage.md#enable-third-party-ai-features) to be enabled.
+
+These summaries are automatically generated. They are available on the merge request page in the **Merge request summaries** dialog, the To-Do list, and in email notifications.
+
+Provide feedback on this experimental feature in [issue 408726](https://gitlab.com/gitlab-org/gitlab/-/issues/408726).
+
+**Data usage**: The diff of changes between the source branch's head and the target branch is sent to the large language model.
+
+## Summarize my merge request review **(ULTIMATE SAAS)**
+
+> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10466) in GitLab 16.0 as an [Experiment](../../../policy/experiment-beta-support.md#experiment).
+
+This feature is an [Experiment](../../../policy/experiment-beta-support.md) on GitLab.com that is using Google's Vertex service and the `text-bison` model. It requires the [group-level third-party AI features setting](../../group/manage.md#enable-third-party-ai-features) to be enabled.
+
+When you've completed your review of a merge request and are ready to [submit your review](reviews/index.md#submit-a-review), you can have a summary generated for you.
+
+To generate the summary:
+
+1. When you are ready to submit your review, select **Finish review**.
+1. Select **AI Actions** (**{tanuki}**).
+1. Select **Summarize my code review**.
+
+The summary is displayed in the comment box. You can edit and refine the summary prior to submitting your review.
+
+Merge request review summaries are also automatically generated when you submit your review. These automatically generated summaries are available on the merge request page in the **Merge request summaries** dialog, the To-Do list, and in email notifications.
+
+Provide feedback on this experimental feature in [issue 408991](https://gitlab.com/gitlab-org/gitlab/-/issues/408991).
+
+**Data usage**: When you use this feature, the following data is sent to the large language model referenced above:
+
+- Draft comment's text
+
+## Suggested merge or squash commit message **(ULTIMATE SAAS)**
+
+> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10453) in GitLab 16.2 as an [Experiment](../../../policy/experiment-beta-support.md#experiment).
+
+This feature is an [Experiment](../../../policy/experiment-beta-support.md) on GitLab.com that is using Google's Vertex service and the `text-bison` model. It requires the [group-level third-party AI features setting](../../group/manage.md#enable-third-party-ai-features) to be enabled.
+
+When preparing to merge your merge request you may wish to edit the squash or merge commit message that will be used.
+
+To generate a commit message:
+
+1. Select the **Edit commit message** checkbox on the merge widget.
+1. Select **Create AI-generated commit message**.
+1. Review the commit message provide and choose **Insert** to add it to the commit.
+
+Provide feedback on this experimental feature in [issue 408994](https://gitlab.com/gitlab-org/gitlab/-/issues/408994).
+
+**Data usage**: When you use this feature, the following data is sent to the large language model referenced above:
+
+- Contents of the file
+- The filename
+
+## Generate suggested tests in merge requests **(ULTIMATE SAAS)**
+
+> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10366) in GitLab 16.0 as an [Experiment](../../../policy/experiment-beta-support.md#experiment).
+
+This feature is an [Experiment](../../../policy/experiment-beta-support.md) on GitLab.com that is using Google's Vertex service and the `text-bison` model. It requires the [group-level third-party AI features setting](../../group/manage.md#enable-third-party-ai-features) to be enabled.
+
+In a merge request, you can get a list of suggested tests for the file you are reviewing. This functionality can help determine if appropriate test coverage has been provided, or if you need more coverage for your project.
+
+View a [click-through demo](https://go.gitlab.com/Xfp0l4).
+
+To generate a test suggestion:
+
+1. In a merge request, select the **Changes** tab.
+1. On the header for the file, in the upper-right corner, select **Options** (**{ellipsis_v}**).
+1. Select **Suggest test cases**.
+
+The test suggestion is generated in a sidebar. You can copy the suggestion to your editor and use it as the start of your tests.
+
+Feedback on this experimental feature can be provided in [issue 408995](https://gitlab.com/gitlab-org/gitlab/-/issues/408995).
+
+**Data usage**: When you use this feature, the following data is sent to the large language model referenced above:
+
+- Contents of the file
+- The filename