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

Add latest changes from gitlab-org/gitlab@master

parent 7bc0aff0
No related branches found
No related tags found
No related merge requests found
Showing
with 72 additions and 29 deletions
1.72.0
1.73.0
Loading
Loading
@@ -196,7 +196,7 @@ export default {
/>
</th>
<th>{{ s__('ContainerRegistry|Tag') }}</th>
<th>{{ s__('ContainerRegistry|Tag ID') }}</th>
<th ref="imageId">{{ s__('ContainerRegistry|Image ID') }}</th>
<th>{{ s__('ContainerRegistry|Size') }}</th>
<th>{{ s__('ContainerRegistry|Last Updated') }}</th>
<th>
Loading
Loading
Loading
Loading
@@ -53,7 +53,7 @@ module Boards
service = Boards::Lists::GenerateService.new(board_parent, current_user)
 
if service.execute(board)
lists = board.lists.movable.preload_associations
lists = board.lists.movable.preload_associated_models
 
List.preload_preferences_for_user(lists, current_user)
 
Loading
Loading
Loading
Loading
@@ -53,7 +53,7 @@ module Milestoneish
end
 
def sorted_issues(user)
issues_visible_to_user(user).preload_associations.sort_by_attribute('label_priority')
issues_visible_to_user(user).preload_associated_models.sort_by_attribute('label_priority')
end
 
def sorted_merge_requests(user)
Loading
Loading
Loading
Loading
@@ -60,7 +60,7 @@ class Issue < ApplicationRecord
scope :order_closest_future_date, -> { reorder(Arel.sql('CASE WHEN issues.due_date >= CURRENT_DATE THEN 0 ELSE 1 END ASC, ABS(CURRENT_DATE - issues.due_date) ASC')) }
scope :order_relative_position_asc, -> { reorder(::Gitlab::Database.nulls_last_order('relative_position', 'ASC')) }
 
scope :preload_associations, -> { preload(:labels, project: :namespace) }
scope :preload_associated_models, -> { preload(:labels, project: :namespace) }
scope :with_api_entity_associations, -> { preload(:timelogs, :assignees, :author, :notes, :labels, project: [:route, { namespace: :route }] ) }
 
scope :public_only, -> { where(confidential: false) }
Loading
Loading
Loading
Loading
@@ -21,7 +21,7 @@ class List < ApplicationRecord
scope :destroyable, -> { where(list_type: list_types.slice(*destroyable_types).values) }
scope :movable, -> { where(list_type: list_types.slice(*movable_types).values) }
 
scope :preload_associations, -> { preload(:board, label: :priorities) }
scope :preload_associated_models, -> { preload(:board, label: :priorities) }
 
scope :ordered, -> { order(:list_type, :position) }
 
Loading
Loading
Loading
Loading
@@ -1066,7 +1066,7 @@ class MergeRequest < ApplicationRecord
# Returns the oldest multi-line commit message, or the MR title if none found
def default_squash_commit_message
strong_memoize(:default_squash_commit_message) do
commits.without_merge_commits.reverse.find(&:description?)&.safe_message || title
recent_commits.without_merge_commits.reverse_each.find(&:description?)&.safe_message || title
end
end
 
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@ class MergeRequestPollCachedWidgetEntity < IssuableEntity
expose :target_project_id
expose :squash
expose :rebase_in_progress?, as: :rebase_in_progress
expose :default_squash_commit_message
expose :default_squash_commit_message, if: -> (merge_request, _) { merge_request.mergeable? }
expose :commits_count
expose :merge_ongoing?, as: :merge_ongoing
expose :work_in_progress?, as: :work_in_progress
Loading
Loading
@@ -25,8 +25,9 @@ class MergeRequestPollCachedWidgetEntity < IssuableEntity
expose :source_branch_exists?, as: :source_branch_exists
expose :branch_missing?, as: :branch_missing
 
expose :commits_without_merge_commits, using: MergeRequestWidgetCommitEntity do |merge_request|
merge_request.commits.without_merge_commits
expose :commits_without_merge_commits, using: MergeRequestWidgetCommitEntity,
if: -> (merge_request, _) { merge_request.mergeable? } do |merge_request|
merge_request.recent_commits.without_merge_commits
end
expose :diff_head_sha do |merge_request|
merge_request.diff_head_sha.presence
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ module Boards
def execute(board)
board.lists.create(list_type: :backlog) unless board.lists.backlog.exists?
 
board.lists.preload_associations
board.lists.preload_associated_models
end
end
end
Loading
Loading
---
title: Change container registry column name from Tag ID to Image ID
merge_request: 20349
author:
type: fixed
---
title: Replace index on environments table project_id and state with project_id, state, and environment_type
merge_request: 19902
author:
type: performance
---
title: Upgrade to Gitaly v1.73.0
merge_request: 20443
author:
type: changed
---
title: Suggest squash commit messages based on recent commits
merge_request: 20231
author:
type: performance
Loading
Loading
@@ -5,7 +5,6 @@ class Gitlab::Seeder::Users
 
RANDOM_USERS_COUNT = 20
MASS_USERS_COUNT = ENV['CI'] ? 10 : 1_000_000
MASS_INSERT_USERNAME_START = 'mass_insert_user_'
 
attr_reader :opts
 
Loading
Loading
@@ -29,7 +28,7 @@ class Gitlab::Seeder::Users
ActiveRecord::Base.connection.execute <<~SQL
INSERT INTO users (username, name, email, confirmed_at, projects_limit, encrypted_password)
SELECT
'#{MASS_INSERT_USERNAME_START}' || seq,
'#{Gitlab::Seeder::MASS_INSERT_USER_START}' || seq,
'Seed user ' || seq,
'seed_user' || seq || '@example.com',
to_timestamp(seq),
Loading
Loading
Loading
Loading
@@ -52,7 +52,6 @@ class Gitlab::Seeder::Projects
internal: 1, # 1m projects +
public: 1 # 1m projects = 5m total
}
MASS_INSERT_NAME_START = 'mass_insert_project_'
 
def seed!
Sidekiq::Testing.inline! do
Loading
Loading
@@ -167,7 +166,7 @@ class Gitlab::Seeder::Projects
INSERT INTO projects (name, path, creator_id, namespace_id, visibility_level, created_at, updated_at)
SELECT
'Seed project ' || seq || ' ' || ('{#{visibility_per_user}}'::text[])[seq] AS project_name,
'mass_insert_project_' || ('{#{visibility_per_user}}'::text[])[seq] || '_' || seq AS project_path,
'#{Gitlab::Seeder::MASS_INSERT_PROJECT_START}' || ('{#{visibility_per_user}}'::text[])[seq] || '_' || seq AS project_path,
u.id AS user_id,
n.id AS namespace_id,
('{#{visibility_level_per_user}}'::int[])[seq] AS visibility_level,
Loading
Loading
# frozen_string_literal: true
class AddIndexToEnvironmentsOnProjectIdStateEnvironmentType < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
OLD_INDEX_NAME = 'index_environments_on_project_id_and_state'.freeze
NEW_INDEX_NAME = 'index_environments_on_project_id_state_environment_type'.freeze
disable_ddl_transaction!
def up
add_concurrent_index(:environments, [:project_id, :state, :environment_type], name: NEW_INDEX_NAME)
remove_concurrent_index_by_name(:environments, OLD_INDEX_NAME)
end
def down
add_concurrent_index(:environments, [:project_id, :state], name: OLD_INDEX_NAME)
remove_concurrent_index_by_name(:environments, NEW_INDEX_NAME)
end
end
Loading
Loading
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
 
ActiveRecord::Schema.define(version: 2019_11_15_091425) do
ActiveRecord::Schema.define(version: 2019_11_18_182722) do
 
# These are extensions that must be enabled in order to support this database
enable_extension "pg_trgm"
Loading
Loading
@@ -1435,7 +1435,7 @@ ActiveRecord::Schema.define(version: 2019_11_15_091425) do
t.index ["name"], name: "index_environments_on_name_varchar_pattern_ops", opclass: :varchar_pattern_ops
t.index ["project_id", "name"], name: "index_environments_on_project_id_and_name", unique: true
t.index ["project_id", "slug"], name: "index_environments_on_project_id_and_slug", unique: true
t.index ["project_id", "state"], name: "index_environments_on_project_id_and_state"
t.index ["project_id", "state", "environment_type"], name: "index_environments_on_project_id_state_environment_type"
end
 
create_table "epic_issues", id: :serial, force: :cascade do |t|
Loading
Loading
Loading
Loading
@@ -20,11 +20,10 @@ for updates and roadmap.
 
### Architecture
 
For this document, the following network topology is assumed:
The most common architecture for Praefect is simplified in the diagram below:
 
```mermaid
graph TB
GitLab --> Gitaly;
GitLab --> Praefect;
Praefect --> Gitaly-1;
Praefect --> Gitaly-2;
Loading
Loading
@@ -32,9 +31,8 @@ graph TB
```
 
Where `GitLab` is the collection of clients that can request Git operations.
`Gitaly` is a Gitaly server before using Praefect. The Praefect node has three
storage nodes attached. Praefect itself doesn't store data, but connects to
three Gitaly nodes, `Praefect-Gitaly-1`, `Praefect-Gitaly-2`, and `Praefect-Gitaly-3`.
The Praefect node has threestorage nodes attached. Praefect itself doesn't
store data, but connects to three Gitaly nodes, `Gitaly-1`, `Gitaly-2`, and `Gitaly-3`.
 
Praefect may be enabled on its own node or can be run on the GitLab server.
In the example below we will use a separate server, but the optimal configuration
Loading
Loading
Loading
Loading
@@ -71,7 +71,7 @@ Once you're on the dashboard, at the top you should see a series of filters for:
- Report type
- Project
 
To the right of the filters, you should see a **Hide dismissed** toggle button ([available in GitLab Ultimate 12.5](https://gitlab.com/gitlab-org/gitlab/issues/9102)).
To the right of the filters, you should see a **Hide dismissed** toggle button ([available for GitLab.com Gold, planned for GitLab Ultimate 12.6](https://gitlab.com/gitlab-org/gitlab/issues/9102)).
 
NOTE: **Note:**
The dashboard only shows projects with [security reports](#supported-reports) enabled in a group.
Loading
Loading
Loading
Loading
@@ -90,7 +90,7 @@ It makes use of [new markdown features](#new-GFM-markdown-extensions),
not found in standard markdown:
 
- [Color "chips" written in HEX, RGB or HSL](#colors)
- [Diagrams and flowcharts using Mermaid](#diagrams-and-flowcharts-using-mermaid)
- [Diagrams and flowcharts](#diagrams-and-flowcharts)
- [Emoji](#emoji)
- [Front matter](#front-matter)
- [Inline diffs](#inline-diff)
Loading
Loading
@@ -151,13 +151,16 @@ Color written inside backticks will be followed by a color "chip":
`HSL(540,70%,50%)`
`HSLA(540,70%,50%,0.3)`
 
### Diagrams and flowcharts using Mermaid
### Diagrams and flowcharts
It is possible to generate diagrams and flowcharts from text in GitLab using [Mermaid](https://mermaidjs.github.io/) or [PlantUML](http://plantuml.com).
#### Mermaid
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/15107) in
GitLab 10.3.
 
It is possible to generate diagrams and flowcharts from text using [Mermaid](https://mermaidjs.github.io/).
Visit the official page for more details.
Visit the [official page](https://mermaidjs.github.io/) for more details.
 
In order to generate a diagram or flowchart, you should write your text inside the `mermaid` block:
 
Loading
Loading
@@ -179,8 +182,6 @@ graph TD;
C-->D;
```
 
#### Subgraphs
Subgraphs can also be included:
 
~~~
Loading
Loading
@@ -219,6 +220,10 @@ graph TB
end
```
 
#### PlantUML
To make PlantUML available in GitLab, a GitLab administrator needs to enable it first. Read more in [PlantUML & GitLab](../administration/integration/plantuml.md).
### Emoji
 
> If this is not rendered correctly, [view it in GitLab itself](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/user/markdown.md#emoji).
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