Skip to content
Snippets Groups Projects
Commit ae4ef817 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 194b499a
No related branches found
No related tags found
No related merge requests found
Showing
with 218 additions and 49 deletions
Loading
Loading
@@ -34,6 +34,7 @@ eslint-report.html
/config/database*.yml
/config/gitlab.yml
/config/gitlab_ci.yml
/config/Gitlab.gitlab-license
/config/initializers/rack_attack.rb
/config/initializers/smtp_settings.rb
/config/initializers/relative_url.rb
Loading
Loading
Loading
Loading
@@ -138,7 +138,7 @@ export default {
variables: { id: this.snippet.id },
})
.then(({ data }) => {
if (data?.destroySnippet?.errors) {
if (data?.destroySnippet?.errors.length) {
throw new Error(data?.destroySnippet?.errors[0]);
}
this.isDeleting = false;
Loading
Loading
Loading
Loading
@@ -90,8 +90,6 @@ module Types
# proc because we set complexity depending on arguments and number of
# items which can be loaded.
proc do |ctx, args, child_complexity|
next base_complexity unless resolver_complexity_enabled?(ctx)
# Resolvers may add extra complexity depending on used arguments
complexity = child_complexity + self.resolver&.try(:resolver_complexity, args, child_complexity: child_complexity).to_i
complexity += 1 if calls_gitaly?
Loading
Loading
@@ -101,10 +99,6 @@ module Types
end
end
 
def resolver_complexity_enabled?(ctx)
ctx.fetch(:graphql_resolver_complexity_flag) { |key| ctx[key] = Feature.enabled?(:graphql_resolver_complexity) }
end
def connection_complexity_multiplier(ctx, args)
# Resolvers may add extra complexity depending on number of items being loaded.
field_defn = to_graphql
Loading
Loading
Loading
Loading
@@ -245,7 +245,7 @@
= link_to repository_admin_application_settings_path, title: _('Repository'), class: 'qa-admin-settings-repository-item' do
%span
= _('Repository')
- if template_exists?('admin/application_settings/templates')
- if Gitlab.ee? && License.feature_available?(:custom_file_templates)
= nav_link(path: 'application_settings#templates') do
= link_to templates_admin_application_settings_path, title: _('Templates'), class: 'qa-admin-settings-template-item' do
%span
Loading
Loading
Loading
Loading
@@ -92,10 +92,10 @@
.form-check
= f.check_box :forward_deployment_enabled, { class: 'form-check-input' }
= f.label :forward_deployment_enabled, class: 'form-check-label' do
%strong= _("Skip older, pending deployment jobs")
%strong= _("Skip outdated deployment jobs")
.form-text.text-muted
= _("When a deployment job is successful, skip older deployment jobs that are still pending")
= link_to icon('question-circle'), help_page_path('ci/pipelines/settings', anchor: 'skip-older-pending-deployment-jobs'), target: '_blank'
= link_to icon('question-circle'), help_page_path('ci/pipelines/settings', anchor: 'skip-outdated-deployment-jobs'), target: '_blank'
 
%hr
.form-group
Loading
Loading
Loading
Loading
@@ -84,7 +84,7 @@
= link_to @user.public_email, "mailto:#{@user.public_email}", class: 'text-link'
- if @user.bio.present?
.cover-desc.cgray
%p.profile-user-bio.font-italic
%p.profile-user-bio
= @user.bio
 
- unless profile_tabs.empty?
Loading
Loading
Loading
Loading
@@ -9,6 +9,15 @@ module WaitableWorker
# Short-circuit: it's more efficient to do small numbers of jobs inline
return bulk_perform_inline(args_list) if args_list.size <= 3
 
# Don't wait if there's too many jobs to be waited for. Not including the
# waiter allows them to be deduplicated and it skips waiting for jobs that
# are not likely to finish within the timeout. This assumes we can process
# 10 jobs per second:
# https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/205
if ::Feature.enabled?(:skip_job_waiter_for_large_batches)
return bulk_perform_async(args_list) if args_list.length >= 10 * timeout
end
waiter = Gitlab::JobWaiter.new(args_list.size, worker_label: self.to_s)
 
# Point all the bulk jobs at the same JobWaiter. Converts, [[1], [2], [3]]
Loading
Loading
---
title: Revert user bio back to non-italicized font to fix rendering of emojis
merge_request: 27693
author:
type: fixed
---
title: Rename feature on the FE and locale
merge_request:
author:
type: changed
---
title: Fix processing of GrapqhQL query complexity based on used resolvers.
merge_request: 27652
author:
type: fixed
Loading
Loading
@@ -252,6 +252,10 @@
- 1
- - upload_checksum
- 1
- - vulnerability_exports_export
- 1
- - vulnerability_exports_export_deletion
- 1
- - web_hook
- 1
- - x509_certificate_revoke
Loading
Loading
# frozen_string_literal: true
class CreateVulnerabilityExports < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def change
create_table :vulnerability_exports do |t|
t.timestamps_with_timezone null: false
t.datetime_with_timezone :started_at
t.datetime_with_timezone :finished_at
t.string :status, limit: 255, null: false
t.string :file, limit: 255
t.bigint :project_id, null: false
t.bigint :author_id, null: false
t.integer :file_store
t.integer :format, limit: 2, null: false, default: 0
t.index %i[project_id id], unique: true
t.index %i[author_id]
end
end
end
# frozen_string_literal: true
class AddVulnerabilityExportProjectForeignKey < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
add_foreign_key :vulnerability_exports, :projects, column: :project_id, on_delete: :cascade, index: false # rubocop:disable Migration/AddConcurrentForeignKey
end
end
def down
with_lock_retries do
remove_foreign_key :vulnerability_exports, column: :project_id
end
end
end
# frozen_string_literal: true
class AddVulnerabilityExportUserForeignKey < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
add_foreign_key :vulnerability_exports, :users, column: :author_id, on_delete: :cascade, index: false # rubocop:disable Migration/AddConcurrentForeignKey
end
end
def down
with_lock_retries do
remove_foreign_key :vulnerability_exports, column: :author_id
end
end
end
Loading
Loading
@@ -4535,6 +4535,21 @@ ActiveRecord::Schema.define(version: 2020_03_19_203901) do
t.index ["updated_by_id"], name: "index_vulnerabilities_on_updated_by_id"
end
 
create_table "vulnerability_exports", force: :cascade do |t|
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
t.datetime_with_timezone "started_at"
t.datetime_with_timezone "finished_at"
t.string "status", limit: 255, null: false
t.string "file", limit: 255
t.bigint "project_id", null: false
t.bigint "author_id", null: false
t.integer "file_store"
t.integer "format", limit: 2, default: 0, null: false
t.index ["author_id"], name: "index_vulnerability_exports_on_author_id"
t.index ["project_id", "id"], name: "index_vulnerability_exports_on_project_id_and_id", unique: true
end
create_table "vulnerability_feedback", id: :serial, force: :cascade do |t|
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
Loading
Loading
@@ -5220,6 +5235,8 @@ ActiveRecord::Schema.define(version: 2020_03_19_203901) do
add_foreign_key "vulnerabilities", "users", column: "last_edited_by_id", name: "fk_1302949740", on_delete: :nullify
add_foreign_key "vulnerabilities", "users", column: "resolved_by_id", name: "fk_76bc5f5455", on_delete: :nullify
add_foreign_key "vulnerabilities", "users", column: "updated_by_id", name: "fk_7ac31eacb9", on_delete: :nullify
add_foreign_key "vulnerability_exports", "projects", on_delete: :cascade
add_foreign_key "vulnerability_exports", "users", column: "author_id", on_delete: :cascade
add_foreign_key "vulnerability_feedback", "ci_pipelines", column: "pipeline_id", on_delete: :nullify
add_foreign_key "vulnerability_feedback", "issues", on_delete: :nullify
add_foreign_key "vulnerability_feedback", "merge_requests", name: "fk_563ff1912e", on_delete: :nullify
Loading
Loading
Loading
Loading
@@ -44,6 +44,7 @@ package (highly recommended), follow the steps below:
1. [Configuring the Praefect proxy/router](#praefect)
1. [Configuring each Gitaly node](#gitaly) (once for each Gitaly node)
1. [Updating the GitLab server configuration](#gitlab)
1. [Configure Grafana](#grafana)
 
### Preparation
 
Loading
Loading
@@ -532,8 +533,6 @@ Particular attention should be shown to:
]
}
]
grafana['disable_login_form'] = false
```
 
1. Save the changes to `/etc/gitlab/gitlab.rb` and [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure):
Loading
Loading
@@ -548,12 +547,6 @@ Particular attention should be shown to:
gitlab-rake gitlab:gitaly:check
```
 
1. Set the Grafana admin password. This command will prompt you to enter a new password:
```shell
gitlab-ctl set-grafana-password
```
1. Update the **Repository storage** settings from **Admin Area > Settings >
Repository > Repository storage** to make the newly configured Praefect
cluster the storage location for new Git repositories.
Loading
Loading
@@ -566,11 +559,6 @@ Particular attention should be shown to:
repository that viewed. If the project is created, and you can see the
README file, it works!
 
1. Inspect metrics by browsing to `/-/grafana` on your GitLab server.
Log in with `admin` / `GRAFANA_PASSWORD`. Go to 'Explore' and query
`gitlab_build_info` to verify that you are getting metrics from all your
machines.
Congratulations! You have configured a highly available Praefect cluster.
 
### Failover
Loading
Loading
@@ -694,6 +682,49 @@ for example behind a load balancer, `failover_enabled` should be disabled. The r
is no coordination that currently happens across different Praefect instances, so there could be a situation where
two Praefect instances think two different Gitaly nodes are the primary.
 
## Grafana
Grafana is included with GitLab, and can be used to monitor your Praefect
cluster. See [Grafana Dashboard
Service](https://docs.gitlab.com/omnibus/settings/grafana.html)
for detailed documentation.
To get started quickly:
1. SSH into the **GitLab** node and login as root:
```shell
sudo -i
```
1. Enable the Grafana login form by editing `/etc/gitlab/gitlab.rb`.
```ruby
grafana['disable_login_form'] = false
```
1. Save the changes to `/etc/gitlab/gitlab.rb` and [reconfigure
GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure):
```shell
gitlab-ctl reconfigure
```
1. Set the Grafana admin password. This command will prompt you to enter a new
password:
```shell
gitlab-ctl set-grafana-password
```
1. In your web browser, open `/-/grafana` (e.g.
`https://gitlab.example.com/-/grafana`) on your GitLab server.
Login using the password you set, and the username `admin`.
1. Go to **Explore** and query `gitlab_build_info` to verify that you are
getting metrics from all your machines.
## Migrating existing repositories to Praefect
 
If your GitLab instance already has repositories, these won't be migrated
Loading
Loading
Loading
Loading
@@ -192,7 +192,7 @@ you can enable this in the project settings:
1. Check the **Auto-cancel redundant, pending pipelines** checkbox.
1. Click **Save changes**.
 
## Skip older, pending deployment jobs
## Skip outdated deployment jobs
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/25276) in GitLab 12.9.
 
Loading
Loading
@@ -206,7 +206,7 @@ To avoid this scenario:
 
1. Go to **{settings}** **Settings > CI / CD**.
1. Expand **General pipelines**.
1. Check the **Skip older, pending deployment jobs** checkbox.
1. Check the **Skip outdated deployment jobs** checkbox.
1. Click **Save changes**.
 
The pending deployment jobs will be skipped.
Loading
Loading
Loading
Loading
@@ -153,36 +153,67 @@ A few notes:
 
## Customizable Value Stream Analytics
 
The default stages are designed to work straight out of the box, but they might not be suitable for all teams. Different teams use different approaches to building software, so some teams might want to customize their Value Stream Analytics. From GitLab 12.9, users can hide default stages and create custom stages that align better to their development workflow.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/12196) in GitLab 12.9.
The default stages are designed to work straight out of the box, but they might not be suitable for
all teams. Different teams use different approaches to building software, so some teams might want
to customize their Value Stream Analytics.
GitLab allows users to hide default stages and create custom stages that align better to their
development workflow.
 
### Adding a stage
 
In the following example we're creating a new stage that measures and tracks issues from creation time until they are closed.
In the following example we're creating a new stage that measures and tracks issues from creation
time until they are closed.
 
1. Navigate to your group page.
1. Open Value Stream Analytics from the sidebar: **Analytics > Value Stream**
1. Click the "Add a stage" button.
1. Navigate to your group's **Analytics > Value Stream**.
1. Click the **Add a stage** button.
1. Fill in the new stage form:
- Name: Issue start to finish
- Start event: Issue created
- End event: Issue closed
1. Click the "Add stage" button.
- Name: Issue start to finish.
- Start event: Issue created.
- End event: Issue closed.
1. Click the **Add stage** button.
 
![New Value Stream Analytics Stage](img/new_vsm_stage_v12_9.png "Form for creating a new stage")
 
The new stage is persisted and it will always show up on the value stream analytics page for your group. In case you want to alter or delete the stage you can easily do that for customized stages by hovering over the stage and clicking the three-dot icon that appears.
The new stage is persisted and it will always show up on the Value Stream Analytics page for your
group.
If you want to alter or delete the stage, you can easily do that for customized stages by:
1. Hovering over the stage.
1. Clicking the vertical ellipsis (**{ellipsis_v}**) button that appears.
 
![Value Stream Analytics Stages](img/vsm_stage_list_v12_9.png)
 
Creating a custom stage requires specifying two events, a start and an end. Be careful to choose a start event that occurs *before* your end event. For example, consider if a stage started when an issue is added to a board, and ended when the issue is created. This stage would not work because the end event has already happened when the start event occurs. To prevent such invalid stages, the form prohibits incompatible start and end events. After you select the start event, the stop event dropdown will only list the compatible events.
Creating a custom stage requires specifying two events:
- A start.
- An end.
Be careful to choose a start event that occurs *before* your end event. For example, consider a
stage that:
 
Note: The ability to re-order the stages is a [planned enhancement](https://gitlab.com/gitlab-org/gitlab/issues/196698).
- Started when an issue is added to a board.
- Ended when the issue is created.
This stage would not work because the end event has already happened when the start event occurs.
To prevent such invalid stages, the UI prohibits incompatible start and end events. After you select
the start event, the stop event dropdown will only list the compatible events.
NOTE: **Note:**
The ability to re-order the stages is [planned](https://gitlab.com/gitlab-org/gitlab/issues/196698).
 
### Label based stages
 
The pre-defined start and end events can cover many use cases involving both issues and merge requests. For supporting more complex workflows, we can use stages based on group labels. These events are based on labels being added/removed. In particular, [scoped labels](../project/labels.md#scoped-labels-premium) are useful for complex workflows.
The pre-defined start and end events can cover many use cases involving both issues and merge requests.
 
In this example we'd like to measure more accurate code review times. The workflow is the following:
For supporting more complex workflows, use stages based on group labels. These events are based on
labels being added or removed. In particular, [scoped labels](../project/labels.md#scoped-labels-premium)
are useful for complex workflows.
In this example, we'd like to measure more accurate code review times. The workflow is the following:
 
- When the code review starts, the reviewer adds `workflow::code_review_start` label to the merge request.
- When the code review is finished, the reviewer adds `workflow::code_review_complete` label to the merge request.
Loading
Loading
@@ -193,12 +224,17 @@ Creating a new stage called "Code Review":
 
### Hiding unused stages
 
Sometimes certain default stages are not relevant to a team. In this case you can easily hide stages so they no longer appear in the list. First, add a custom stage to activate customizability. Then hover over the default stage you want to hide, click the three-dot icon that appears and select "Hide stage".
Sometimes certain default stages are not relevant to a team. In this case, you can easily hide stages
so they no longer appear in the list. To hide stages:
1. Add a custom stage to activate customizability.
1. Hover over the default stage you want to hide.
1. Click the vertical ellipsis (**{ellipsis_v}**) button that appears and select **Hide stage**.
 
To recover a default stage that was previously hidden:
 
1. Click "Add a stage" button.
1. In the top right corner open the "Recover hidden stage" dropdown.
1. Click **Add a stage** button.
1. In the top right corner open the **Recover hidden stage** dropdown.
1. Select a stage.
 
## Days to completion chart
Loading
Loading
Loading
Loading
@@ -6,15 +6,15 @@ type: reference
 
> - Introduced in [GitLab Ultimate](https://about.gitlab.com/pricing/) 10.5.
> - In [GitLab 12.9](https://gitlab.com/gitlab-org/gitlab/issues/198062), Roadmaps were moved to the Premium tier.
> - In [GitLab 12.9](https://gitlab.com/gitlab-org/gitlab/issues/5164) and later, the epic bars show their title, progress, and completed weight percentage.
 
An Epic within a group containing **Start date** and/or **Due date**
can be visualized in a form of a timeline (e.g. a Gantt chart). The Epics Roadmap page
shows such a visualization for all the epics which are under a group and/or its subgroups.
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/5164) in GitLab 12.9.
On the epic bars, you can see their title, progress, and completed weight percentage.
When you hover over an epic bar, a popover appears with its title, start and due dates, and weight completed.
When you hover over an epic bar, a popover appears with its title, start and due dates, and weight
completed.
 
![roadmap view](img/roadmap_view_v12_9.png)
 
Loading
Loading
Loading
Loading
@@ -104,9 +104,9 @@ This feature is similar to the [Credentials inventory for self-managed instances
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/34648) in GitLab 12.9.
 
Groups with enabled group-managed accounts can allow or disallow forking of projects outside of root group
by using separate toggle. If forking is disallowed any project of given root group or its subgroups can be forked to
a subgroup of the same root group only.
Groups with group-managed accounts can disallow forking of projects to destinations outside the group.
To do so, enable the "Prohibit outer forks" option in **Settings > SAML SSO**.
When enabled, projects within the group can only be forked to other destinations within the group (including its subgroups).
 
##### Other restrictions for Group-managed accounts
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment