Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2025-06-30 03:13:09 +00:00
parent 24eacc7e6e
commit 331ca0d1be
13 changed files with 178 additions and 8 deletions

View File

@ -1 +1 @@
6acf82daeb93a1c1eb21aad5d40c154675cd050f
9a72666ea3a0a18d2f02d2821b880daee41d9767

View File

@ -65,7 +65,7 @@ module Milestoneish
work_items_finder_params = issues_finder_params
work_items_finder_params[:include_descendants] = true if work_items_finder_params[:include_subgroups]
work_items_finder_params[:issue_types] = %w[issue epic task]
work_items_finder_params[:issue_types] = %w[issue epic task incident]
work_item_ids = ::WorkItems::WorkItemsFinder.new(user, work_items_finder_params)
.execute.preload_associated_models

View File

@ -15,6 +15,9 @@ class Deployment < ApplicationRecord
ARCHIVABLE_OFFSET = 50_000
ignore_column :id_convert_to_bigint, :project_id_convert_to_bigint, :environment_id_convert_to_bigint,
:user_id_convert_to_bigint, remove_with: '18.3', remove_after: '2025-09-01'
belongs_to :project, optional: false
belongs_to :environment, optional: false
belongs_to :user

View File

@ -0,0 +1,17 @@
# frozen_string_literal: true
class InitializeConversionOfDeploymentsIdToBigint < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.2'
TABLE = :deployments
COLUMNS = %i[id environment_id project_id user_id]
def up
initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
end
def down
revert_initialize_conversion_of_integer_to_bigint(TABLE, COLUMNS)
end
end

View File

@ -0,0 +1,17 @@
# frozen_string_literal: true
class BackfillDeploymentsIdForBigintConversion < Gitlab::Database::Migration[2.3]
restrict_gitlab_migration gitlab_schema: :gitlab_main
milestone '18.2'
TABLE = :deployments
COLUMNS = %i[id environment_id project_id user_id]
def up
backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS, sub_batch_size: 200)
end
def down
revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS)
end
end

View File

@ -0,0 +1,69 @@
# frozen_string_literal: true
class PrepareIndexesForMergeRequestDiffsBigintConversion < Gitlab::Database::Migration[2.3]
include Gitlab::Database::MigrationHelpers::ConvertToBigint
disable_ddl_transaction!
milestone '18.2'
TABLE_NAME = 'merge_request_diffs'
BIGINT_COLUMNS = [:id_convert_to_bigint, :merge_request_id_convert_to_bigint].freeze
INDEXES = [
{
name: 'merge_request_diffs_pkey',
columns: [:id_convert_to_bigint],
options: { unique: true }
},
{
name: 'index_merge_request_diffs_by_id_partial',
columns: [:id_convert_to_bigint],
options: { where: 'files_count > 0 AND (NOT stored_externally OR stored_externally IS NULL)' }
},
{
name: 'index_merge_request_diffs_on_merge_request_id_and_id',
columns: [:merge_request_id_convert_to_bigint, :id_convert_to_bigint]
},
{
name: 'index_merge_request_diffs_on_project_id_and_id',
columns: [:project_id, :id_convert_to_bigint]
},
{
name: 'index_merge_request_diffs_on_unique_merge_request_id',
columns: [:merge_request_id_convert_to_bigint],
options: { where: 'diff_type = 2', unique: true }
}
].freeze
def up
return if skip_migration?
INDEXES.each do |index|
options = index[:options] || {}
prepare_async_index(TABLE_NAME, index[:columns], name: bigint_index_name(index[:name]), **options)
end
end
def down
return if skip_migration?
INDEXES.each do |index|
options = index[:options] || {}
unprepare_async_index(TABLE_NAME, index[:columns], name: bigint_index_name(index[:name]), **options)
end
end
private
def skip_migration?
unless conversion_columns_exist?
say "No conversion columns found - migration skipped"
return true
end
false
end
def conversion_columns_exist?
BIGINT_COLUMNS.all? { |column| column_exists?(TABLE_NAME, column) }
end
end

View File

@ -0,0 +1 @@
03d8cc39e85f6d647933e667cf80b7a4d241b26e696defd695f72697882e507b

View File

@ -0,0 +1 @@
d355134b212da7e1d0b838ed2773b7e373e5a2d610eb176e29ffbf7e15fe85eb

View File

@ -0,0 +1 @@
1ef7160e5267b33ad2077582fc68a357603a3437591e147187283f5acc4e3190

View File

@ -151,6 +151,21 @@ four standard [pagination arguments](#pagination-arguments):
| <a id="queryadminmemberrolesorderby"></a>`orderBy` | [`MemberRolesOrderBy`](#memberrolesorderby) | Ordering column. Default is NAME. |
| <a id="queryadminmemberrolessort"></a>`sort` | [`SortDirectionEnum`](#sortdirectionenum) | Ordering column. Default is ASC. |
### `Query.aiCatalogItems`
List of AI Catalog items.
{{< details >}}
**Introduced** in GitLab 18.2.
**Status**: Experiment.
{{< /details >}}
Returns [`AiCatalogItemConnection!`](#aicatalogitemconnection).
This field returns a [connection](#connections). It accepts the
four standard [pagination arguments](#pagination-arguments):
`before: String`, `after: String`, `first: Int`, and `last: Int`.
### `Query.aiChatContextPresets`
Get available GitLab Duo Chat context presets for the current user for a specific URL.
@ -13646,6 +13661,30 @@ The edge type for [`AiAgent`](#aiagent).
| <a id="aiagentedgecursor"></a>`cursor` | [`String!`](#string) | A cursor for use in pagination. |
| <a id="aiagentedgenode"></a>`node` | [`AiAgent`](#aiagent) | The item at the end of the edge. |
#### `AiCatalogItemConnection`
The connection type for [`AiCatalogItem`](#aicatalogitem).
##### Fields
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="aicatalogitemconnectioncount"></a>`count` | [`Int!`](#int) | Total count of collection. |
| <a id="aicatalogitemconnectionedges"></a>`edges` | [`[AiCatalogItemEdge]`](#aicatalogitemedge) | A list of edges. |
| <a id="aicatalogitemconnectionnodes"></a>`nodes` | [`[AiCatalogItem]`](#aicatalogitem) | A list of nodes. |
| <a id="aicatalogitemconnectionpageinfo"></a>`pageInfo` | [`PageInfo!`](#pageinfo) | Information to aid in pagination. |
#### `AiCatalogItemEdge`
The edge type for [`AiCatalogItem`](#aicatalogitem).
##### Fields
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="aicatalogitemedgecursor"></a>`cursor` | [`String!`](#string) | A cursor for use in pagination. |
| <a id="aicatalogitemedgenode"></a>`node` | [`AiCatalogItem`](#aicatalogitem) | The item at the end of the edge. |
#### `AiConversationsThreadConnection`
The connection type for [`AiConversationsThread`](#aiconversationsthread).
@ -21567,6 +21606,20 @@ Version of an AI Agent.
| <a id="aiagentversionmodel"></a>`model` | [`String!`](#string) | Model of the agent. |
| <a id="aiagentversionprompt"></a>`prompt` | [`String!`](#string) | Prompt of the agent. |
### `AiCatalogItem`
An AI catalog item.
#### Fields
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="aicatalogitemcreatedat"></a>`createdAt` | [`Time!`](#time) | Date of creation. |
| <a id="aicatalogitemdescription"></a>`description` | [`String!`](#string) | Description of the item. |
| <a id="aicatalogitemid"></a>`id` | [`ID!`](#id) | ID of the item. |
| <a id="aicatalogitemitemtype"></a>`itemType` | [`AiCatalogItemType!`](#aicatalogitemtype) | Type of the item. |
| <a id="aicatalogitemname"></a>`name` | [`String!`](#string) | Name of the item. |
### `AiConversationsThread`
Conversation thread of the AI feature.
@ -43743,6 +43796,14 @@ The category of the additional context.
| <a id="aiadditionalcontextcategorysnippet"></a>`SNIPPET` | Snippet content category. |
| <a id="aiadditionalcontextcategoryterminal"></a>`TERMINAL` | Terminal content category. |
### `AiCatalogItemType`
Possible item types for AI items.
| Value | Description |
| ----- | ----------- |
| <a id="aicatalogitemtypeagent"></a>`AGENT` | Agent. |
### `AiConversationsThreadsConversationType`
Conversation type of the thread.

View File

@ -2397,6 +2397,9 @@ msgstr ""
msgid "AICatalog|Edit agent"
msgstr ""
msgid "AICatalog|Released %{fullDate}"
msgstr ""
msgid "AISummary|Generates a summary of this issue"
msgstr ""
@ -5763,9 +5766,6 @@ msgstr ""
msgid "AiAnalytics|the ClickHouse data store is not available"
msgstr ""
msgid "AiCatalog|Released %{fullDate}"
msgstr ""
msgid "AiImpactAnalytics|%{codeSuggestionsAcceptedCount} out of %{codeSuggestionsShownCount} code suggestions were accepted in the last 30 days. %{linkStart}Learn more%{linkEnd}."
msgstr ""

View File

@ -35,7 +35,6 @@ ee/spec/frontend/oncall_schedule/schedule/components/preset_days/days_header_sub
ee/spec/frontend/related_items_tree/components/related_items_tree_body_spec.js
ee/spec/frontend/related_items_tree/components/tree_root_spec.js
ee/spec/frontend/roadmap/components/roadmap_shell_spec.js
ee/spec/frontend/roles_and_permissions/components/role_selector_spec.js
ee/spec/frontend/sidebar/components/sidebar_dropdown_widget_spec.js
ee/spec/frontend/status_checks/mount_spec.js
ee/spec/frontend/usage_quotas/transfer/components/usage_by_month_spec.js

View File

@ -18,6 +18,7 @@ RSpec.describe Milestone, 'Milestoneish', factory_default: :keep do
let_it_be(:security_issue_2, reload: true) { create(:work_item, :confidential, assignees: [assignee], milestone: milestone) }
let_it_be(:closed_issue_1, reload: true) { create(:work_item, :task, :closed, milestone: milestone) }
let_it_be(:closed_issue_2, reload: true) { create(:work_item, :closed, milestone: milestone) }
let_it_be(:closed_incident, reload: true) { create(:work_item, :incident, :closed, milestone: milestone) }
let_it_be(:closed_security_issue_1, reload: true) { create(:work_item, :confidential, :closed, author: author, milestone: milestone) }
let_it_be(:closed_security_issue_2, reload: true) { create(:work_item, :confidential, :closed, assignees: [assignee], milestone: milestone) }
let_it_be(:merge_request) { create(:merge_request, source_project: project, target_project: project, milestone: milestone) }
@ -250,13 +251,13 @@ RSpec.describe Milestone, 'Milestoneish', factory_default: :keep do
describe '#closed_issues_count' do
it 'counts all closed issues including confidential' do
expect(milestone.closed_issues_count).to eq 4
expect(milestone.closed_issues_count).to eq 5
end
end
describe '#total_issues_count' do
it 'counts all issues including confidential' do
expect(milestone.total_issues_count).to eq 7
expect(milestone.total_issues_count).to eq 8
end
end