Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-10-31 09:17:20 +00:00
parent 1c75d4d6a9
commit c137ff466a
69 changed files with 442 additions and 237 deletions

View File

@ -7,7 +7,6 @@ Gitlab/DocumentationLinks/Link:
- 'app/controllers/jira_connect/app_descriptor_controller.rb'
- 'app/controllers/jwt_controller.rb'
- 'app/helpers/ide_helper.rb'
- 'app/helpers/projects_helper.rb'
- 'app/helpers/releases_helper.rb'
- 'app/models/integration.rb'
- 'app/presenters/clusters/cluster_presenter.rb'
@ -20,7 +19,6 @@ Gitlab/DocumentationLinks/Link:
- 'ee/app/helpers/projects/learn_gitlab_helper.rb'
- 'ee/app/helpers/projects/security/api_fuzzing_configuration_helper.rb'
- 'ee/app/helpers/vulnerabilities_helper.rb'
- 'ee/app/models/integrations/github.rb'
- 'ee/lib/ee/gitlab/namespace_storage_size_error_message.rb'
- 'ee/lib/gitlab/checks/secrets_check.rb'
- 'ee/lib/gitlab/llm/chain/tools/tool.rb'

View File

@ -101,6 +101,11 @@ export default {
required: false,
default: false,
},
sectionSelector: {
type: String,
required: false,
default: '',
},
},
data() {
return {
@ -202,7 +207,12 @@ export default {
},
},
created() {
this.getData({ initial: true });
const sectionEl = this.sectionSelector && document.querySelector(this.sectionSelector);
if (!sectionEl || sectionEl.classList.contains('expanded')) {
this.getData({ initial: true });
return;
}
this.observeSectionExpansion(sectionEl);
},
methods: {
setDataForSave(items) {
@ -450,6 +460,16 @@ export default {
this.$emit('shown');
this.focusInput();
},
observeSectionExpansion(sectionEl) {
const observer = new MutationObserver(() => {
if (sectionEl.classList.contains('expanded')) {
this.getData({ initial: true });
observer.disconnect();
}
});
observer.observe(sectionEl, { attributes: true, attributeFilter: ['class'] });
},
},
};
</script>

View File

@ -21,6 +21,7 @@ export default class ProtectedBranchCreate {
this.$form = $('.js-new-protected-branch');
this.isLocalStorageAvailable = AccessorUtilities.canUseLocalStorage();
this.forcePushToggle = initToggle(document.querySelector('.js-force-push-toggle'));
this.sectionSelector = options.sectionSelector;
if (this.hasLicense) {
this.codeOwnerToggle = initToggle(document.querySelector('.js-code-owner-toggle'));
}
@ -85,6 +86,7 @@ export default class ProtectedBranchCreate {
accessLevelsData,
groupsWithProjectAccess: true,
testId,
sectionSelector: this.sectionSelector,
});
dropdown.$on('select', (selected) => {

View File

@ -21,7 +21,7 @@ const isDropdownDisabled = (dropdown) => {
export default class ProtectedBranchEdit {
constructor(options) {
this.hasLicense = options.hasLicense;
this.sectionSelector = options.sectionSelector;
this.hasChanges = false;
this.$wrap = options.$wrap;
@ -116,6 +116,7 @@ export default class ProtectedBranchEdit {
accessLevelsData,
groupsWithProjectAccess: true,
testId,
sectionSelector: this.sectionSelector,
});
dropdown.$on('select', (selected) => this.onSelectItems(accessLevel, selected));

View File

@ -4,16 +4,17 @@ import $ from 'jquery';
import ProtectedBranchEdit from './protected_branch_edit';
export default class ProtectedBranchEditList {
constructor() {
constructor(sectionSelector) {
this.$wrap = $('.protected-branches-list');
this.initEditForm();
this.initEditForm(sectionSelector);
}
initEditForm() {
initEditForm(sectionSelector) {
this.$wrap.find('.js-protected-branch-edit-form').each((i, el) => {
new ProtectedBranchEdit({
$wrap: $(el),
hasLicense: false,
sectionSelector,
});
});
}

View File

@ -7,8 +7,9 @@ import { initAccessDropdown } from '~/projects/settings/init_access_dropdown';
import { ACCESS_LEVELS } from './constants';
export default class ProtectedTagCreate {
constructor({ hasLicense }) {
constructor({ hasLicense, sectionSelector }) {
this.hasLicense = hasLicense;
this.sectionSelector = sectionSelector;
this.$form = $('.js-new-protected-tag');
if (this.$form.length > 0) {
@ -48,6 +49,7 @@ export default class ProtectedTagCreate {
groupsWithProjectAccess: true,
searchEnabled: dropdownEl.dataset.filter !== undefined,
testId: 'allowed-to-create-dropdown',
sectionSelector: this.sectionSelector,
});
this.protectedTagAccessDropdown.$on('select', (selected) => {

View File

@ -40,6 +40,11 @@ export default {
required: false,
default: true,
},
sectionSelector: {
type: String,
required: false,
default: '',
},
},
data() {
return {
@ -109,6 +114,7 @@ export default {
:search-enabled="searchEnabled"
groups-with-project-access
:block="true"
:section-selector="sectionSelector"
@hidden="updatePermissions"
/>
</template>

View File

@ -5,6 +5,7 @@ import ProtectedTagEdit from './protected_tag_edit.vue';
export default class ProtectedTagEditList {
constructor(options) {
this.hasLicense = options.hasLicense;
this.sectionSelector = options.sectionSelector;
this.initEditForm();
}
@ -15,6 +16,7 @@ export default class ProtectedTagEditList {
url: el.dataset.url,
hasLicense: this.hasLicense,
accessLevelsData: gon.create_access_levels.roles,
sectionSelector: this.sectionSelector,
});
});
}

View File

@ -65,7 +65,8 @@ module Ci
end
def sort(pipelines)
sql = 'CASE ci_pipelines.source WHEN (?) THEN 0 ELSE 1 END, ci_pipelines.id DESC'
pipelines_table = Ci::Pipeline.quoted_table_name
sql = "CASE #{pipelines_table}.source WHEN (?) THEN 0 ELSE 1 END, #{pipelines_table}.id DESC"
query = ApplicationRecord.send(:sanitize_sql_array, [sql, Ci::Pipeline.sources[:merge_request_event]]) # rubocop:disable GitlabSecurity/PublicSend
pipelines.order(Arel.sql(query)) # rubocop: disable CodeReuse/ActiveRecord

View File

@ -114,7 +114,7 @@ module ProjectsHelper
end
def link_to_data_loss_doc
link_to _('data loss'), help_page_path('user/project/repository/index.md', anchor: 'what-happens-when-a-repository-path-changes'), target: '_blank', rel: 'noopener'
link_to _('data loss'), help_page_path('user/project/repository/index.md', anchor: 'repository-path-changes'), target: '_blank', rel: 'noopener'
end
def transfer_project_message(project)
@ -425,11 +425,11 @@ module ProjectsHelper
lfsAvailable: Gitlab.config.lfs.enabled,
lfsHelpPath: help_page_path('topics/git/lfs/index.md'),
lfsObjectsExist: project.lfs_objects.exists?,
lfsObjectsRemovalHelpPath: help_page_path('topics/git/lfs/index.md', anchor: 'removing-objects-from-lfs'),
lfsObjectsRemovalHelpPath: help_page_path('topics/git/lfs/index.md', anchor: 'delete-a-git-lfs-file-from-repository-history'),
pagesAvailable: Gitlab.config.pages.enabled,
pagesAccessControlEnabled: Gitlab.config.pages.access_control,
pagesAccessControlForced: ::Gitlab::Pages.access_control_is_forced?,
pagesHelpPath: help_page_path('user/project/pages/introduction.md', anchor: 'gitlab-pages-access-control'),
pagesHelpPath: help_page_path('user/project/pages/pages_access_control.md'),
issuesHelpPath: help_page_path('user/project/issues/index.md'),
membersPagePath: project_project_members_path(project),
environmentsHelpPath: help_page_path('ci/environments/index.md'),

View File

@ -49,7 +49,7 @@ module Ci
validate :validate_file_format!, unless: :trace?, on: :create
scope :not_expired, -> { where('expire_at IS NULL OR expire_at > ?', Time.current) }
scope :for_sha, ->(sha, project_id) { joins(job: :pipeline).where(ci_pipelines: { sha: sha, project_id: project_id }) }
scope :for_sha, ->(sha, project_id) { joins(job: :pipeline).merge(Ci::Pipeline.for_sha(sha).for_project(project_id)) }
scope :for_job_ids, ->(job_ids) { where(job_id: job_ids) }
scope :for_job_name, ->(name) { joins(:job).merge(Ci::Build.by_name(name)) }
scope :created_at_before, ->(time) { where(arel_table[:created_at].lteq(time)) }

View File

@ -35,12 +35,16 @@ module Ci
INITIAL_PARTITION_VALUE = 100
SECOND_PARTITION_VALUE = 101
NEXT_PARTITION_VALUE = 102
ROUTING_FEATURE_FLAG = :pipelines_routing_table
paginates_per 15
sha_attribute :source_sha
sha_attribute :target_sha
partitionable scope: ->(pipeline) { Ci::Pipeline.current_partition_value(pipeline.project) }
query_constraints :id, :partition_id
partitionable scope: ->(pipeline) { Ci::Pipeline.current_partition_value(pipeline.project) },
through: { table: :p_ci_pipelines, flag: ROUTING_FEATURE_FLAG }
# Ci::CreatePipelineService returns Ci::Pipeline so this is the only place
# where we can pass additional information from the service. This accessor
# is used for storing the processed metadata for linting purposes.
@ -511,11 +515,12 @@ module Ci
return Ci::Pipeline.none if refs.empty?
refs_values = refs.map { |ref| "(#{connection.quote(ref)})" }.join(",")
join_query = success.where("refs_values.ref = ci_pipelines.ref").order(id: :desc).limit(1)
query = Arel.sql(sanitize_sql_array(["refs_values.ref = #{quoted_table_name}.ref"]))
join_query = success.where(query).order(id: :desc).limit(1)
Ci::Pipeline
.from("(VALUES #{refs_values}) refs_values (ref)")
.joins("INNER JOIN LATERAL (#{join_query.to_sql}) #{Ci::Pipeline.table_name} ON TRUE")
.joins("INNER JOIN LATERAL (#{join_query.to_sql}) #{quoted_table_name} ON TRUE")
.index_by(&:ref)
end
@ -600,6 +605,10 @@ module Ci
::Gitlab::Ci::PipelineObjectHierarchy.new(relation, options: options)
end
def self.internal_id_scope_usage
:ci_pipelines
end
def uses_needs?
processables.where(scheduling_type: :dag).any?
end

View File

@ -11,19 +11,19 @@ module Integrations
exposes_secrets: true,
required: true,
placeholder: 'http://jenkins.example.com',
help: -> { s_('The URL of the Jenkins server.') }
help: -> { s_('URL of the Jenkins server.') }
field :project_name,
required: true,
placeholder: 'my_project_name',
help: -> { s_('The name of the Jenkins project. Copy the name from the end of the URL to the project.') }
help: -> { s_('Name of the Jenkins project.') }
field :username,
help: -> { s_('The username for the Jenkins server.') }
help: -> { s_('Username of the Jenkins server.') }
field :password,
type: :password,
help: -> { s_('The password for the Jenkins server.') },
help: -> { s_('Password of the Jenkins server.') },
non_empty_password_title: -> { s_('ProjectService|Enter new password.') },
non_empty_password_help: -> { s_('ProjectService|Leave blank to use your current password.') }

View File

@ -113,6 +113,9 @@ class Namespace < ApplicationRecord
has_one :namespace_import_user, class_name: 'Import::NamespaceImportUser', foreign_key: :namespace_id, inverse_of: :namespace
has_one :import_user, class_name: 'User', through: :namespace_import_user, foreign_key: :user_id
has_many :bot_user_details, class_name: 'UserDetail', foreign_key: 'bot_namespace_id', inverse_of: :bot_namespace
has_many :bot_users, through: :bot_user_details, source: :user
validates :owner, presence: true, if: ->(n) { n.owner_required? }
validates :organization, presence: true, if: :require_organization?
validates :name,

View File

@ -8,12 +8,15 @@ class UserDetail < ApplicationRecord
REGISTRATION_OBJECTIVE_PAIRS = { basics: 0, move_repository: 1, code_storage: 2, exploring: 3, ci: 4, other: 5, joining_team: 6 }.freeze
belongs_to :user
belongs_to :bot_namespace, class_name: 'Namespace', optional: true, inverse_of: :bot_user_details
validates :pronouns, length: { maximum: 50 }
validates :pronunciation, length: { maximum: 255 }
validates :job_title, length: { maximum: 200 }
validates :bio, length: { maximum: 255 }, allow_blank: true
validate :bot_namespace_user_type, if: :bot_namespace_id_changed?
DEFAULT_FIELD_LENGTH = 500
# specification for bluesky identifier https://web.plc.directory/spec/v0.1/did-plc
@ -82,6 +85,13 @@ class UserDetail < ApplicationRecord
self.twitter = '' if twitter.nil?
self.website_url = '' if website_url.nil?
end
def bot_namespace_user_type
return if user.bot?
return if bot_namespace_id.nil?
errors.add(:bot_namespace, _('must only be set for bot user types'))
end
end
def discord_format

View File

@ -18,11 +18,12 @@ module VirtualRegistries
# Used in destroying stale cached responses in DestroyOrphanCachedResponsesWorker
enum :status, default: 0, processing: 1, pending_destruction: 2, error: 3
ignore_column :downloads_count, remove_with: '17.8', remove_after: '2024-12-23'
validates :group, top_level_group: true, presence: true
validates :relative_path,
:object_storage_key,
:content_type,
:downloads_count,
:size,
:file_sha1,
presence: true
@ -32,7 +33,6 @@ module VirtualRegistries
:content_type,
length: { maximum: 255 }
validates :file_final_path, length: { maximum: 1024 }
validates :downloads_count, numericality: { greater_than: 0, only_integer: true }
validates :relative_path,
uniqueness: { scope: [:upstream_id, :status] },
if: -> { upstream.present? && default? }
@ -63,7 +63,6 @@ module VirtualRegistries
group_id: group_id,
relative_path: relative_path
).tap do |record|
record.increment(:downloads_count) if record.persisted?
record.update!(**updates)
end
rescue ActiveRecord::RecordInvalid => invalid
@ -92,7 +91,7 @@ module VirtualRegistries
def bump_statistics(include_upstream_checked_at: false)
now = Time.zone.now
updates = { downloaded_at: now, downloads_count: downloads_count + 1 }
updates = { downloaded_at: now }
updates[:upstream_checked_at] = now if include_upstream_checked_at
update_columns(**updates)
end

View File

@ -0,0 +1,9 @@
---
name: pipelines_routing_table
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/482674
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169438
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/499486
milestone: '17.6'
group: group::ci platform
type: gitlab_com_derisk
default_enabled: false

View File

@ -1281,6 +1281,7 @@ production: &base
# private_key_file: /home/git/gitlab/config/topology-service-key.pem
cell:
# id: 1
# name: cell-1
gitlab_kas:

View File

@ -103,16 +103,6 @@ ci_pipeline_schedules:
- table: projects
column: project_id
on_delete: async_delete
ci_pipelines:
- table: merge_requests
column: merge_request_id
on_delete: async_delete
- table: users
column: user_id
on_delete: async_nullify
- table: projects
column: project_id
on_delete: async_delete
ci_project_mirrors:
- table: projects
column: project_id
@ -197,7 +187,7 @@ country_access_logs:
column: user_id
on_delete: async_delete
dast_pre_scan_verifications:
- table: ci_pipelines
- table: p_ci_pipelines
column: ci_pipeline_id
on_delete: async_delete
- table: projects
@ -215,7 +205,7 @@ dast_profiles:
column: project_id
on_delete: async_delete
dast_profiles_pipelines:
- table: ci_pipelines
- table: p_ci_pipelines
column: ci_pipeline_id
on_delete: async_delete
dast_profiles_tags:
@ -268,7 +258,7 @@ dependency_list_export_parts:
column: organization_id
on_delete: async_delete
dependency_list_exports:
- table: ci_pipelines
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_delete
- table: users
@ -332,7 +322,7 @@ members:
column: user_id
on_delete: async_delete
merge_request_metrics:
- table: ci_pipelines
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
merge_request_requested_changes:
@ -346,11 +336,11 @@ merge_request_requested_changes:
column: user_id
on_delete: async_delete
merge_requests:
- table: ci_pipelines
- table: p_ci_pipelines
column: head_pipeline_id
on_delete: async_nullify
merge_trains:
- table: ci_pipelines
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
ml_candidates:
@ -443,7 +433,7 @@ p_ci_stages:
column: project_id
on_delete: async_delete
packages_build_infos:
- table: ci_pipelines
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
packages_npm_metadata_caches:
@ -453,7 +443,7 @@ packages_npm_metadata_caches:
target_column: status
target_value: 2
packages_package_file_build_infos:
- table: ci_pipelines
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
pages_deployments:
@ -520,7 +510,7 @@ sbom_components:
column: organization_id
on_delete: async_delete
sbom_occurrences:
- table: ci_pipelines
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
- table: projects
@ -622,7 +612,7 @@ vulnerability_external_issue_links:
column: author_id
on_delete: async_delete
vulnerability_feedback:
- table: ci_pipelines
- table: p_ci_pipelines
column: pipeline_id
on_delete: async_nullify
- table: merge_requests
@ -683,10 +673,10 @@ vulnerability_namespace_historical_statistics:
column: namespace_id
on_delete: async_delete
vulnerability_occurrences:
- table: ci_pipelines
- table: p_ci_pipelines
column: initial_pipeline_id
on_delete: async_nullify
- table: ci_pipelines
- table: p_ci_pipelines
column: latest_pipeline_id
on_delete: async_nullify
- table: projects
@ -715,7 +705,7 @@ vulnerability_state_transitions:
column: author_id
on_delete: async_nullify
vulnerability_statistics:
- table: ci_pipelines
- table: p_ci_pipelines
column: latest_pipeline_id
on_delete: async_nullify
- table: projects

View File

@ -1013,6 +1013,7 @@ Settings.topology_service['private_key_file'] ||= '/home/git/gitlab/config/topol
# Cells
#
Settings['cell'] ||= {}
Settings.cell['id'] ||= 1
Settings.cell['name'] ||= 'cell-1'
#

View File

@ -2,6 +2,7 @@
table_name: p_ci_pipelines
classes:
- Ci::Pipeline
- Ci::Pipeline::Partitioned
feature_categories:
- continuous_integration
description: Routing table for ci_pipelines

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class AddBotNamespaceIdToUserDetail < Gitlab::Database::Migration[2.2]
disable_ddl_transaction!
milestone '17.6'
def up
add_column :user_details, :bot_namespace_id, :bigint, null: true, if_not_exists: true
add_concurrent_index :user_details, :bot_namespace_id
end
def down
remove_column :user_details, :bot_namespace_id
end
end

View File

@ -0,0 +1,17 @@
# frozen_string_literal: true
class AddForeignKeyToUserDetailOnBotNamespaceId < Gitlab::Database::Migration[2.2]
milestone '17.6'
disable_ddl_transaction!
def up
add_concurrent_foreign_key(:user_details, :namespaces, column: :bot_namespace_id, on_delete: :nullify)
end
def down
with_lock_retries do
remove_foreign_key(:user_details, column: :bot_namespace_id)
end
end
end

View File

@ -0,0 +1,20 @@
# frozen_string_literal: true
class PrepareSearchIndexForBuildNames < Gitlab::Database::Migration[2.2]
include Gitlab::Database::PartitioningMigrationHelpers
milestone '17.6'
disable_ddl_transaction!
TABLE_NAME = :p_ci_build_names
INDEX_NAME = :index_p_ci_build_names_on_search_columns
COLUMNS = %i[project_id name build_id partition_id]
def up
prepare_partitioned_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME)
end
def down
unprepare_partitioned_async_index_by_name(TABLE_NAME, INDEX_NAME)
end
end

View File

@ -0,0 +1 @@
1d9e7fe038cfced29818571f95fee94c03869869b45c9f67c9d000f0c2c261c6

View File

@ -0,0 +1 @@
54c25486c7727efaeb4c0908b734a613d95817617d1e75f50a374af990b3fd0f

View File

@ -0,0 +1 @@
1ba056ea569e577ec0ea14f7966625db8764efdf0cc5daa83bb6f18ec5d43990

View File

@ -20361,6 +20361,7 @@ CREATE TABLE user_details (
project_authorizations_recalculated_at timestamp with time zone DEFAULT '2010-01-01 00:00:00+00'::timestamp with time zone NOT NULL,
onboarding_status jsonb DEFAULT '{}'::jsonb NOT NULL,
bluesky text DEFAULT ''::text NOT NULL,
bot_namespace_id bigint,
CONSTRAINT check_18a53381cd CHECK ((char_length(bluesky) <= 256)),
CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)),
CONSTRAINT check_444573ee52 CHECK ((char_length(skype) <= 500)),
@ -31973,6 +31974,8 @@ CREATE INDEX index_user_custom_attributes_on_key_and_value ON user_custom_attrib
CREATE UNIQUE INDEX index_user_custom_attributes_on_user_id_and_key ON user_custom_attributes USING btree (user_id, key);
CREATE INDEX index_user_details_on_bot_namespace_id ON user_details USING btree (bot_namespace_id);
CREATE INDEX index_user_details_on_enterprise_group_id_and_user_id ON user_details USING btree (enterprise_group_id, user_id);
CREATE INDEX index_user_details_on_password_last_changed_at ON user_details USING btree (password_last_changed_at);
@ -35099,6 +35102,9 @@ ALTER TABLE p_ci_pipelines
ALTER TABLE ONLY user_namespace_callouts
ADD CONSTRAINT fk_27a69fd1bd FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY user_details
ADD CONSTRAINT fk_27ac767d6a FOREIGN KEY (bot_namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL;
ALTER TABLE ONLY work_item_dates_sources
ADD CONSTRAINT fk_283fb4ad36 FOREIGN KEY (start_date_sourcing_milestone_id) REFERENCES milestones(id) ON DELETE SET NULL;

View File

@ -62,6 +62,7 @@ sequenceDiagram
User ->> SelfHostedGitLab: Send request
SelfHostedGitLab ->> SelfHostedGitLab: Check if self-hosted model is configured
SelfHostedGitLab ->> SelfHostedAIGateway: Forward request for AI processing
SelfHostedAIGateway ->> SelfHostedModel: Create prompt and perform request to AI model server
SelfHostedModel -->> SelfHostedAIGateway: Respond to the prompt
SelfHostedAIGateway -->> SelfHostedGitLab: Forward AI response

View File

@ -34,22 +34,22 @@ Install one of the following GitLab-approved LLM models:
| Mistral | [Mixtral 8x22B](https://huggingface.co/mistralai/Mixtral-8x22B-v0.1) | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No |
| Mistral | [Mixtral 8x22B-it](https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1) | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| Claude 3 | [Claude 3.5 Sonnet](https://www.anthropic.com/news/claude-3-5-sonnet) | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| GPT | [GPT-3.5-Turbo](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-35) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
| GPT | [GPT-4 Turbo](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
| GPT | [GPT-4o](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4o-and-gpt-4-turbo) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
| GPT | [GPT-4o-mini](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4o-and-gpt-4-turbo) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
The following models are under evaluation, and support is limited:
| Model family | Model | Code completion | Code generation | GitLab Duo Chat |
|---------------|---------------------------------------------------------------------|-----------------|-----------------|---------|
| CodeGemma | [CodeGemma 2b](https://huggingface.co/google/codegemma-2b) | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No |
| CodeGemma | [CodeGemma 7b-it](https://huggingface.co/google/codegemma-7b-it) (Instruction) | **{dotted-circle}** No | **{check-circle}** Yes | **{dotted-circle}** No |
| CodeGemma | [CodeGemma 7b-code](https://huggingface.co/google/codegemma-7b) (Code) | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No |
| CodeGemma | [CodeGemma 7b-it](https://huggingface.co/google/codegemma-7b-it) | **{dotted-circle}** No | **{check-circle}** Yes | **{dotted-circle}** No |
| CodeGemma | [CodeGemma 7b-code](https://huggingface.co/google/codegemma-7b) | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No |
| CodeLlama | [Code-Llama 13b-code](https://huggingface.co/meta-llama/CodeLlama-13b-hf) | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No |
| CodeLlama | [Code-Llama 13b](https://huggingface.co/meta-llama/CodeLlama-13b-Instruct-hf) | **{dotted-circle}** No | **{check-circle}** Yes | **{dotted-circle}** No |
| DeepSeekCoder | [DeepSeek Coder 33b Instruct](https://huggingface.co/deepseek-ai/deepseek-coder-33b-instruct) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
| DeepSeekCoder | [DeepSeek Coder 33b Base](https://huggingface.co/deepseek-ai/deepseek-coder-33b-base) | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No |
| GPT | [GPT-3.5-Turbo](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-35) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
| GPT | [GPT-4 Turbo](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
| GPT | [GPT-4o](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4o-and-gpt-4-turbo) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
| GPT | [GPT-4o-mini](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4o-and-gpt-4-turbo) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
<!-- vale gitlab_base.Spelling = YES -->

View File

@ -103,7 +103,7 @@ Parameters:
| `app_store_private_key_file_name` | string | yes | Apple App Store Connect private key filename. |
| `app_store_private_key` | string | yes | Apple App Store Connect private key. |
| `app_store_protected_refs` | boolean | no | Set variables on protected branches and tags only. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Apple App Store Connect
@ -140,7 +140,7 @@ Parameters:
| --------- | ---- | -------- | ----------- |
| `api_key` | string | yes | User API token. The user must have access to the task. All comments are attributed to this user. |
| `restrict_to_branch` | string | no | Comma-separated list of branches to be automatically inspected. Leave blank to include all branches. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Asana
@ -177,7 +177,7 @@ Parameters:
| --------- | ---- | -------- | ----------- |
| `token` | string | yes | The authentication token. |
| `subdomain` | string | no | The subdomain setting. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Assembla
@ -219,7 +219,7 @@ Parameters:
| `build_key` | string | yes | Bamboo build plan key (for example, `KEY`). |
| `username` | string | yes | User with API access to the Bamboo server. |
| `password` | string | yes | Password of the user. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Atlassian Bamboo
@ -257,7 +257,7 @@ Parameters:
| `new_issue_url` | string | yes | URL of the new issue. |
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Bugzilla
@ -298,7 +298,7 @@ Parameters:
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Buildkite
@ -339,7 +339,7 @@ Parameters:
| `token` | string | yes | API authentication token from Campfire Classic. To get the token, sign in to Campfire Classic and select **My info**. |
| `subdomain` | string | no | `.campfirenow.com` subdomain when you're signed in. |
| `room` | string | no | ID portion of the Campfire Classic room URL. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Campfire Classic
@ -377,7 +377,7 @@ Parameters:
| ------------- | ------ | -------- | -------------- |
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable ClickUp
@ -413,7 +413,7 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `confluence_url` | string | yes | URL of the Confluence Workspace hosted on `atlassian.net`. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Confluence Workspace
@ -451,7 +451,7 @@ Parameters:
| `new_issue_url` | string | yes | URL of the new issue. |
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable a custom issue tracker
@ -493,7 +493,7 @@ Parameters:
| `datadog_site` | string | no | The Datadog site to send data to. To send data to the EU site, use `datadoghq.eu`. |
| `datadog_tags` | string | no | Custom tags in Datadog. Specify one tag per line in the format `key:value\nkey2:value2` |
| `archive_trace_events` | boolean | no | When enabled, job logs are collected by Datadog and displayed along with pipeline execution traces ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/346339) in GitLab 15.3). |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Datadog
@ -531,7 +531,7 @@ Parameters:
| `diffblue_license_key` | string | yes | Diffblue Cover license key. |
| `diffblue_access_token_name` | string | yes | Access token name used by Diffblue Cover in pipelines. |
| `diffblue_access_token_secret` | string | yes | Access token secret used by Diffblue Cover in pipelines. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Diffblue Cover
@ -594,7 +594,7 @@ Parameters:
| `tag_push_channel` | string | no | The webhook override to receive notifications for tag push events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `wiki_page_channel` | string | no | The webhook override to receive notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Discord Notifications
@ -635,7 +635,7 @@ Parameters:
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Drone
@ -676,7 +676,7 @@ Parameters:
| `push_events` | boolean | no | Enable notifications for push events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. Notifications are always fired for tag pushes. The default value is `all`. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable emails on push
@ -714,7 +714,7 @@ Parameters:
| `new_issue_url` | string | yes | URL of the new issue. |
| `project_url` | string | yes | URL of the project. |
| `issues_url` | string | yes | URL of the issue. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable EWM
@ -750,7 +750,7 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `external_wiki_url` | string | yes | URL of the external wiki. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable an external wiki
@ -812,7 +812,7 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- |-----------------------------------------------|
| `token` | string | yes | GitGuardian API token with `scan` scope. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable GitGuardian
@ -854,7 +854,7 @@ Parameters:
| `token` | string | yes | GitHub API token with `repo:status` OAuth scope. |
| `repository_url` | string | yes | GitHub repository URL. |
| `static_context` | boolean | no | Append the hostname of your GitLab instance to the [status check name](../user/project/integrations/github.md#static-or-dynamic-status-check-names). |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable GitHub
@ -956,7 +956,7 @@ Parameters:
| `incident_channel` | string | no | Name of the channel to receive notifications for incident events. |
| `vulnerability_channel` | string | no | Name of the channel to receive notifications for vulnerability events. |
| `alert_channel` | string | no | Name of the channel to receive notifications for alert events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable GitLab for Slack app
@ -1004,7 +1004,7 @@ Parameters:
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Google Chat
@ -1051,7 +1051,7 @@ Parameters:
| `artifact_registry_project_id` | string | yes | ID of the Google Cloud project. |
| `artifact_registry_location` | string | yes | Location of the Artifact Registry repository. |
| `artifact_registry_repositories` | string | yes | Repository of Artifact Registry. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Google Artifact Management
@ -1099,7 +1099,7 @@ Parameters:
| `workload_identity_federation_project_number` | integer | yes | Google Cloud project number for the Workload Identity Federation. |
| `workload_identity_pool_id` | string | yes | ID of the Workload Identity Pool. |
| `workload_identity_pool_provider_id` | string | yes | ID of the Workload Identity Pool provider. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Google Cloud Identity and Access Management
@ -1138,7 +1138,7 @@ Parameters:
| `service_account_key` | string | yes | Google Play service account key. |
| `service_account_key_file_name` | string | yes | File name of the Google Play service account key. |
| `google_play_protected_refs` | boolean | no | Set variables on protected branches and tags only. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Google Play
@ -1177,7 +1177,7 @@ Parameters:
| `project_name` | string | yes | The name of the project in the Harbor instance. For example, `testproject`. |
| `username` | string | yes | The username created in the Harbor interface. |
| `password` | string | yes | The password of the user. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Harbor
@ -1217,7 +1217,7 @@ Parameters:
| `server_host` | string | no | localhost. |
| `server_port` | integer | no | 6659. |
| `colorize_messages` | boolean | no | Colorize messages. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable irker
@ -1252,15 +1252,15 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `jenkins_url` | string | yes | Jenkins URL like `http://jenkins.example.com`. |
| `jenkins_url` | string | yes | URL of the Jenkins server. |
| `enable_ssl_verification` | boolean | no | Enable SSL verification. Defaults to `true` (enabled). |
| `project_name` | string | yes | The URL-friendly project name. Example: `my_project_name`. |
| `username` | string | no | Username for authentication with the Jenkins server, if authentication is required by the server. |
| `password` | string | no | Password for authentication with the Jenkins server, if authentication is required by the server. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `project_name` | string | yes | Name of the Jenkins project. |
| `username` | string | no | Username of the Jenkins server. |
| `password` | string | no | Password of the Jenkins server. |
| `push_events` | boolean | no | Enables notifications for push events. |
| `merge_requests_events` | boolean | no | Enables notifications for merge request events. |
| `tag_push_events` | boolean | no | Enables notifications for tag push events. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Jenkins
@ -1305,7 +1305,7 @@ Parameters:
| `password` | string | yes | The password of the user. |
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable JetBrains TeamCity
@ -1355,7 +1355,7 @@ Parameters:
| `comment_on_event_enabled` | boolean | no | Enable comments in Jira issues on each GitLab event (commit or merge request). |
| `issues_enabled` | boolean | no | Enable viewing Jira issues in GitLab. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267015) in GitLab 17.0. |
| `project_keys` | array of strings | no | Keys of Jira projects. When `issues_enabled` is `true`, this setting specifies which Jira projects to view issues from in GitLab. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/267015) in GitLab 17.0. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Jira
@ -1404,7 +1404,7 @@ Parameters:
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Matrix notifications
@ -1465,7 +1465,7 @@ Parameters:
| `tag_push_channel` | string | no | The name of the channel to receive notifications for tag push events. |
| `pipeline_channel` | string | no | The name of the channel to receive notifications for pipeline events. |
| `wiki_page_channel` | string | no | The name of the channel to receive notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Mattermost notifications
@ -1501,7 +1501,7 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ------ | -------- | --------------------- |
| `token` | string | yes | The Mattermost token. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Mattermost slash commands
@ -1549,7 +1549,7 @@ Parameters:
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Microsoft Teams notifications
@ -1589,7 +1589,7 @@ Parameters:
| --------- | ---- | -------- | ----------- |
| `mock_service_url` | string | yes | URL of the Mock CI integration. |
| `enable_ssl_verification` | boolean | no | Enable SSL verification. Defaults to `true` (enabled). |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Mock CI
@ -1630,7 +1630,7 @@ Parameters:
| `push_events` | boolean | no | Enable notifications for push events. |
| `merge_requests_events` | boolean | no | Enable notifications for merge request events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Packagist
@ -1668,7 +1668,7 @@ Parameters:
|-----------------|--------|----------|-----------------------|
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Phorge
@ -1708,7 +1708,7 @@ Parameters:
| `branches_to_be_notified` | string | no | Branches to send notifications for. Valid options are `all`, `default`, `protected`, and `default_and_protected`. The default value is `default`. |
| `notify_only_default_branch` | boolean | no | Send notifications for the default branch. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable pipeline status emails
@ -1745,7 +1745,7 @@ Parameters:
| --------- | ---- | -------- | ----------- |
| `token` | string | yes | The Pivotal Tracker token. |
| `restrict_to_branch` | boolean | no | Comma-separated list of branches to automatically inspect. Leave blank to include all branches. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Pivotal Tracker
@ -1792,7 +1792,7 @@ Parameters:
| `push_events` | boolean | no | Enable notifications for push events. |
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Pumble
@ -1832,7 +1832,7 @@ Parameters:
| `priority` | string | yes | The priority. |
| `device` | string | no | Leave blank for all active devices. |
| `sound` | string | no | The sound of the notification. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Pushover
@ -1870,7 +1870,7 @@ Parameters:
| `new_issue_url` | string | yes | URL of the new issue. |
| `project_url` | string | yes | URL of the project. |
| `issues_url` | string | yes | URL of the issue. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Redmine
@ -1939,7 +1939,7 @@ Parameters:
| `tag_push_events` | boolean | no | Enable notifications for tag push events. |
| `wiki_page_channel` | string | no | The name of the channel to receive notifications for wiki page events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Slack notifications
@ -1975,7 +1975,7 @@ Parameters:
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `token` | string | yes | The Slack token. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Slack slash commands
@ -2039,7 +2039,7 @@ Parameters:
|-------------------------|--------|----------|-------------------------------|
| `url` | string | yes | URL of the Squash TM webhook. |
| `token` | string | no | Secret token. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Squash TM
@ -2089,7 +2089,7 @@ Parameters:
| `confidential_note_events` | boolean | yes | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | yes | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | yes | Enable notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Telegram
@ -2136,7 +2136,7 @@ Parameters:
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Unify Circuit
@ -2183,7 +2183,7 @@ Parameters:
| `confidential_note_events` | boolean | no | Enable notifications for confidential note events. |
| `pipeline_events` | boolean | no | Enable notifications for pipeline events. |
| `wiki_page_events` | boolean | no | Enable notifications for wiki page events. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable Webex Teams
@ -2220,7 +2220,7 @@ Parameters:
| --------- | ---- | -------- | ----------- |
| `issues_url` | string | yes | URL of the issue. |
| `project_url` | string | yes | URL of the project. |
| `use_inherited_settings` | boolean | no | Indicates whether or not to inherit default settings. Defaults to `false`. |
| `use_inherited_settings` | boolean | no | Indicates whether to inherit the default settings. Defaults to `false`. |
### Disable YouTrack

View File

@ -639,18 +639,18 @@ A configuration with different pipeline names depending on the pipeline conditio
```yaml
variables:
PROJECT1_PIPELINE_NAME: 'Default pipeline name' # A default is not required.
PROJECT1_PIPELINE_NAME: 'Default pipeline name' # A default is not required
workflow:
name: '$PROJECT1_PIPELINE_NAME'
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
variables:
PROJECT1_PIPELINE_NAME: 'MR pipeline: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME'
- if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-in-ruby3/'
variables:
PROJECT1_PIPELINE_NAME: 'Ruby 3 pipeline'
- when: always # Other pipelines can run, but use the default name
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
variables:
PROJECT1_PIPELINE_NAME: 'MR pipeline: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # For default branch pipelines, use the default name
```
**Additional details**:

View File

@ -388,7 +388,7 @@ it's no longer accessible in your repository's history. This process replaces a
Alternatively, to completely delete specific files from a repository, see
[Remove files](../../user/project/repository/repository_size.md#remove-files).
To redact text from your repository, see [Redact text for repository](../../user/project/merge_requests/revert_changes.md#redact-text-from-repository).
To redact text from your repository, see [Redact text from repository](../../user/project/merge_requests/revert_changes.md#redact-text-from-repository).
### Remove information from commits

View File

@ -55,7 +55,7 @@ To view the dependencies of a project or all projects in a group:
1. On the left sidebar, select **Search or go to** and find your project or group.
1. Select **Secure > Dependency list**.
Details of each dependency are listed, sorted by decreasing severity of vulnerabilities (if any). You can sort the list instead by component name or packager.
Details of each dependency are listed, sorted by decreasing severity of vulnerabilities (if any). You can sort the list instead by component name, packager, or license.
| Field | Description |
|:----------|:-----------|

View File

@ -87,9 +87,6 @@ To use Code Suggestions:
- To reject a suggestion, press <kbd>Esc</kbd>.
- To ignore a suggestion, keep typing as you usually would.
AI is non-deterministic, so you may not get the same suggestion every time with the same input.
To generate quality code, write clear, descriptive, specific tasks.
All editor extensions from GitLab, except Neovim, add an icon to your IDE's status bar. For example, in
Visual Studio:

View File

@ -72,10 +72,13 @@ The Repository X-Ray searches a maximum of two directory levels from the reposit
1. For Python Pip, all configuration files matching the `*requirements*.txt` glob pattern are processed.
<!--- start_remove The following content will be removed on remove_date: '2025-08-15' -->
## Enable Repository X-Ray in your CI pipeline (deprecated)
WARNING:
This feature was [deprecated](https://gitlab.com/groups/gitlab-org/-/epics/14100) in GitLab 17.4.
This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/500146) in GitLab 17.6
and is planned for removal in 18.0. Use [Enable Repository X-Ray](#enable-repository-x-ray) instead.
Prerequisites:
@ -143,3 +146,5 @@ This link can be either of the following:
- Direct, that is, the project is in a group that has the Duo Pro add-on.
- Indirect, for example, the parent group of the current project's group has the Duo Pro add-on.
<!--- end_remove -->

View File

@ -250,3 +250,5 @@ module API
end
end
end
API::APIGuard::HelperMethods.prepend_mod

View File

@ -18,7 +18,6 @@ module API
:file_sha1,
:size,
:downloaded_at,
:downloads_count,
:relative_path,
:upstream_etag,
:content_type,

View File

@ -274,38 +274,7 @@ module API
desc: 'Colorize messages'
}
],
'jenkins' => [
{
required: true,
name: :jenkins_url,
type: String,
desc: 'Jenkins root URL like https://jenkins.example.com'
},
{
required: false,
name: :enable_ssl_verification,
type: ::Grape::API::Boolean,
desc: 'Enable SSL verification'
},
{
required: true,
name: :project_name,
type: String,
desc: 'The URL-friendly project name. Example: my_project_name'
},
{
required: false,
name: :username,
type: String,
desc: 'A user with access to the Jenkins server, if applicable'
},
{
required: false,
name: :password,
type: String,
desc: 'The password of the user'
}
],
'jenkins' => ::Integrations::Jenkins.api_arguments,
'jira' => [
{
required: true,
@ -680,7 +649,7 @@ module API
required: false,
name: :use_inherited_settings,
type: ::Grape::API::Boolean,
desc: 'Indicates whether or not to inherit default settings. Defaults to `false`.'
desc: 'Indicates whether to inherit the default settings. Defaults to `false`.'
}
end
end

View File

@ -13,6 +13,7 @@ module Gitlab
ci_builds_metadata
ci_job_artifacts
ci_pipeline_variables
ci_pipelines
ci_stages
].freeze

View File

@ -35419,6 +35419,9 @@ msgstr ""
msgid "Name must start with a letter, digit, emoji, or underscore."
msgstr ""
msgid "Name of the Jenkins project."
msgstr ""
msgid "Name to be used as the sender for emails from Service Desk."
msgstr ""
@ -39593,6 +39596,9 @@ msgstr ""
msgid "Password confirmation"
msgstr ""
msgid "Password of the Jenkins server."
msgstr ""
msgid "Password of the user."
msgstr ""
@ -54926,9 +54932,6 @@ msgstr ""
msgid "The Telegram bot token (for example, `123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11`)."
msgstr ""
msgid "The URL of the Jenkins server."
msgstr ""
msgid "The URL should start with http:// or https://"
msgstr ""
@ -55287,9 +55290,6 @@ msgstr ""
msgid "The name of the CI/CD configuration file. A path relative to the root directory is optional (for example %{code_open}my/path/.myfile.yml%{code_close})."
msgstr ""
msgid "The name of the Jenkins project. Copy the name from the end of the URL to the project."
msgstr ""
msgid "The namespace storage size (%{current_size}) exceeds the limit of %{size_limit} by %{exceeded_size}. You won't be able to push new code to this project. Please contact your GitLab administrator for more information."
msgstr ""
@ -55314,9 +55314,6 @@ msgstr ""
msgid "The parent group of this %{context} is pending deletion, so this %{context} will also be deleted on %{date}."
msgstr ""
msgid "The password for the Jenkins server."
msgstr ""
msgid "The password for your GitLab account on %{gitlab_url} has successfully been changed."
msgstr ""
@ -55485,9 +55482,6 @@ msgstr ""
msgid "The user you are trying to deactivate has been active in the past %{minimum_inactive_days} days and cannot be deactivated"
msgstr ""
msgid "The username for the Jenkins server."
msgstr ""
msgid "The value of the provided variable exceeds the %{count} character limit"
msgstr ""
@ -58466,6 +58460,9 @@ msgstr ""
msgid "URL of the Grafana instance to link to from the Metrics Dashboard menu item."
msgstr ""
msgid "URL of the Jenkins server."
msgstr ""
msgid "URL of the Mock CI integration."
msgstr ""
@ -60216,6 +60213,9 @@ msgstr ""
msgid "Username is available."
msgstr ""
msgid "Username of the Jenkins server."
msgstr ""
msgid "Username or email"
msgstr ""
@ -66151,6 +66151,9 @@ msgstr ""
msgid "must not contain commonly used combinations of words and letters"
msgstr ""
msgid "must only be set for bot user types"
msgstr ""
msgid "must only contain letters, digits, forward-slash, underscore, hyphen or period"
msgstr ""

View File

@ -75,7 +75,7 @@
"@gitlab/fonts": "^1.3.0",
"@gitlab/query-language": "^0.0.5-a-20241017",
"@gitlab/svgs": "3.119.0",
"@gitlab/ui": "100.0.0",
"@gitlab/ui": "101.2.1",
"@gitlab/web-ide": "^0.0.1-dev-20240909013227",
"@mattiasbuelens/web-streams-adapter": "^0.1.0",
"@rails/actioncable": "7.0.8-4",

View File

@ -101,7 +101,7 @@ RSpec.describe 'Database schema',
ci_pipeline_schedule_variables: %w[project_id],
ci_pipeline_variables: %w[partition_id pipeline_id project_id],
ci_pipelines_config: %w[partition_id project_id],
ci_pipelines: %w[partition_id auto_canceled_by_partition_id],
ci_pipelines: %w[partition_id auto_canceled_by_partition_id project_id user_id merge_request_id], # LFKs are defined on the routing table
ci_secure_file_states: %w[project_id],
ci_unit_test_failures: %w[project_id],
ci_resources: %w[project_id],

View File

@ -9,7 +9,6 @@ FactoryBot.define do
size { 1.kilobyte }
upstream_etag { OpenSSL::Digest.hexdigest('SHA256', 'test') }
content_type { 'text/plain' }
downloads_count { 5 }
file_final_path { '5f/9c/5f9c/@final/c7/4c/240c' }
file_md5 { '54ce07f4124259b2ea58548e9d620004' }
file_sha1 { 'bbde7c9fb6d74f9a2393bb36b0d4ac7e72c227ee' }

View File

@ -7,6 +7,7 @@ import {
} from '@gitlab/ui';
import { last } from 'lodash';
import { nextTick } from 'vue';
import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { stubComponent } from 'helpers/stub_component';
import waitForPromises from 'helpers/wait_for_promises';
@ -451,4 +452,45 @@ describe('Access Level Dropdown', () => {
expect(wrapper.emitted('select')[1]).toHaveLength(1);
});
});
describe('section expansion observation', () => {
const setupTest = (isExpanded = false) => {
setHTMLFixture(`<div id="test-section" class="${isExpanded ? 'expanded' : ''}"></div>`);
createComponent({ sectionSelector: '#test-section' });
return nextTick();
};
afterEach(() => resetHTMLFixture());
it('calls getData when section is already expanded', async () => {
await setupTest(true);
expect(getUsers).toHaveBeenCalled();
expect(getGroups).toHaveBeenCalled();
expect(getDeployKeys).toHaveBeenCalled();
});
it('observes section expansion and calls getData when expanded', async () => {
await setupTest();
expect(getUsers).not.toHaveBeenCalled();
expect(getGroups).not.toHaveBeenCalled();
expect(getDeployKeys).not.toHaveBeenCalled();
document.getElementById('test-section').classList.add('expanded');
await nextTick();
expect(getUsers).toHaveBeenCalled();
expect(getGroups).toHaveBeenCalled();
expect(getDeployKeys).toHaveBeenCalled();
});
it('does not observe section expansion when sectionSelector is not provided', () => {
createComponent({ sectionSelector: null });
expect(getUsers).toHaveBeenCalled();
expect(getGroups).toHaveBeenCalled();
expect(getDeployKeys).toHaveBeenCalled();
});
});
});

View File

@ -9,7 +9,6 @@ RSpec.describe API::Entities::VirtualRegistries::Packages::Maven::CachedResponse
it do
is_expected.to include(:cached_response_id, :group_id, :upstream_id, :upstream_checked_at, :created_at, :updated_at,
:file, :file_md5, :file_sha1, :size, :downloaded_at, :downloads_count, :relative_path, :upstream_etag,
:content_type)
:file, :file_md5, :file_sha1, :size, :downloaded_at, :relative_path, :upstream_etag, :content_type)
end
end

View File

@ -49,7 +49,7 @@ RSpec.describe API::Helpers::IntegrationsHelpers, feature_category: :integration
required: false,
name: :use_inherited_settings,
type: ::Grape::API::Boolean,
desc: 'Indicates whether or not to inherit default settings. Defaults to `false`.'
desc: 'Indicates whether to inherit the default settings. Defaults to `false`.'
}
)
end

View File

@ -56,7 +56,7 @@ RSpec.describe Gitlab::BackgroundMigration::BackfillDesiredShardingKeyJob, migra
end
describe '#perform' do
let(:ci_pipelines_table) { table(:ci_pipelines, primary_key: :id) }
let(:ci_pipelines_table) { table(:p_ci_pipelines, primary_key: :id) }
let(:ci_builds_table) { table(:p_ci_builds, primary_key: :id) }
let(:pipeline) { ci_pipelines_table.create!(partition_id: 100, project_id: 1) }

View File

@ -59,7 +59,7 @@ RSpec.describe Gitlab::BackgroundMigration::BackfillDesiredShardingKeyPartitionJ
end
describe '#perform' do
let(:ci_pipelines_table) { table(:ci_pipelines, primary_key: :id) }
let(:ci_pipelines_table) { table(:p_ci_pipelines, primary_key: :id) }
let(:ci_builds_table) { table(:p_ci_builds, primary_key: :id) }
let(:pipeline) { ci_pipelines_table.create!(partition_id: 100, project_id: 1) }

View File

@ -3,6 +3,7 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillOrDropCiPipelineOnProjectId,
:suppress_partitioning_routing_analyzer,
feature_category: :continuous_integration,
migration: :gitlab_ci do
let(:project_id_with_build) { 137 }

View File

@ -2,7 +2,9 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillPartitionIdCiDailyBuildGroupReportResult, feature_category: :ci_scaling do
RSpec.describe Gitlab::BackgroundMigration::BackfillPartitionIdCiDailyBuildGroupReportResult,
:suppress_partitioning_routing_analyzer,
feature_category: :continuous_integration do
let(:ci_pipelines_table) { table(:ci_pipelines, primary_key: :id, database: :ci) }
let(:ci_daily_build_group_report_results_table) { table(:ci_daily_build_group_report_results, database: :ci) }
let!(:pipeline_1) { ci_pipelines_table.create!(id: 1, partition_id: 100, project_id: 1) }

View File

@ -3,6 +3,7 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillPartitionIdCiPipelineArtifact,
:suppress_partitioning_routing_analyzer,
feature_category: :continuous_integration do
let(:ci_pipelines_table) { table(:ci_pipelines, primary_key: :id, database: :ci) }
let(:ci_pipeline_artifacts_table) { table(:ci_pipeline_artifacts, database: :ci) }

View File

@ -2,7 +2,9 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillPartitionIdCiPipelineMessage, feature_category: :ci_scaling do
RSpec.describe Gitlab::BackgroundMigration::BackfillPartitionIdCiPipelineMessage,
:suppress_partitioning_routing_analyzer,
feature_category: :continuous_integration do
let(:ci_pipelines_table) { table(:ci_pipelines, primary_key: :id, database: :ci) }
let(:ci_pipeline_messages_table) { table(:ci_pipeline_messages, database: :ci) }
let!(:pipeline_1) { ci_pipelines_table.create!(id: 1, partition_id: 100, project_id: 1) }

View File

@ -2,7 +2,9 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillPartitionIdCiPipelineMetadata, feature_category: :continuous_integration do
RSpec.describe Gitlab::BackgroundMigration::BackfillPartitionIdCiPipelineMetadata,
:suppress_partitioning_routing_analyzer,
feature_category: :continuous_integration do
let(:ci_pipelines_table) { table(:ci_pipelines, primary_key: :id, database: :ci) }
let(:ci_pipeline_metadata_table) { table(:ci_pipeline_metadata, database: :ci) }
let!(:pipeline_100) { ci_pipelines_table.create!(id: 1, partition_id: 100, project_id: 1) }

View File

@ -2,7 +2,9 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::BackfillUpstreamPipelinePartitionIdOnPCiBuilds, feature_category: :continuous_integration do
RSpec.describe Gitlab::BackgroundMigration::BackfillUpstreamPipelinePartitionIdOnPCiBuilds,
:suppress_partitioning_routing_analyzer,
feature_category: :continuous_integration do
let(:pipelines_table) { table(:ci_pipelines, primary_key: :id, database: :ci) }
let(:jobs_table) { partitioned_table(:p_ci_builds, database: :ci) }

View File

@ -2,7 +2,8 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::CopyTaggingsToPCiBuildTags, feature_category: :continuous_integration do
RSpec.describe Gitlab::BackgroundMigration::CopyTaggingsToPCiBuildTags, :suppress_partitioning_routing_analyzer,
feature_category: :continuous_integration do
let(:ci_pipelines_table) { table(:ci_pipelines, database: :ci, primary_key: :id) }
let(:ci_builds_table) { table(:p_ci_builds, database: :ci, primary_key: :id) }
let(:ci_build_tags_table) { table(:p_ci_build_tags, database: :ci, primary_key: :id) }

View File

@ -3,7 +3,8 @@
require 'spec_helper'
RSpec.describe Gitlab::BackgroundMigration::QueueBackfillAutocancelPartitionIdOnCiPipelines,
feature_category: :ci_scaling,
:suppress_partitioning_routing_analyzer,
feature_category: :continuous_integration,
migration: :gitlab_ci,
schema: 20240704155541 do
let(:ci_pipelines_table) { table(:ci_pipelines, primary_key: :id, database: :ci) }

View File

@ -94,7 +94,7 @@ RSpec.describe Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModificatio
include_examples 'successful examples', model: Ci::Pipeline
include_examples 'cross-database modification errors', model: Project,
sql_log_contains: [/UPDATE "ci_pipelines"/]
sql_log_contains: [/UPDATE "p_ci_pipelines"/]
end
context 'when other data is modified' do
@ -121,13 +121,13 @@ RSpec.describe Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModificatio
context 'when data modification happens in a transaction' do
include_examples 'cross-database modification errors', model: Project,
sql_log_contains: [/UPDATE "projects"/, /UPDATE "ci_pipelines"/]
sql_log_contains: [/UPDATE "projects"/, /UPDATE "p_ci_pipelines"/]
context 'when ci_pipelines are ignored for cross modification' do
context 'when p_ci_pipelines are ignored for cross modification' do
it 'does not raise error' do
Project.transaction do
expect do
described_class.temporary_ignore_tables_in_transaction(%w[ci_pipelines], url: 'TODO') do
described_class.temporary_ignore_tables_in_transaction(%w[p_ci_pipelines], url: 'TODO') do
run_queries
end
end.not_to raise_error
@ -144,7 +144,7 @@ RSpec.describe Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModificatio
expect(error.message).to include('Cross-database data modification')
expect(error.message).to match(/UPDATE "projects"/)
expect(error.message).to match(/UPDATE "ci_pipelines"/)
expect(error.message).to match(/UPDATE "p_ci_pipelines"/)
end
end
end
@ -162,7 +162,7 @@ RSpec.describe Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModificatio
end
include_examples 'cross-database modification errors', model: Project,
sql_log_contains: [/UPDATE "projects"/, /UPDATE "ci_pipelines"/]
sql_log_contains: [/UPDATE "projects"/, /UPDATE "p_ci_pipelines"/]
end
end
@ -178,7 +178,7 @@ RSpec.describe Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModificatio
context 'when data modification happens in a transaction' do
include_examples 'cross-database modification errors', model: Project,
sql_log_contains: [/UPDATE "projects"/, /SELECT "ci_pipelines"\.\* FROM "ci_pipelines" .*FOR UPDATE/]
sql_log_contains: [/UPDATE "projects"/, /SELECT "p_ci_pipelines"\.\* FROM "p_ci_pipelines" .*FOR UPDATE/]
context 'when the modification is inside a factory save! call' do
let(:runner) { create(:ci_runner, :project, projects: [create(:project)]) }
@ -231,7 +231,7 @@ RSpec.describe Gitlab::Database::QueryAnalyzers::PreventCrossDatabaseModificatio
expect do
Project.transaction do
project.touch
project.connection.execute('UPDATE ci_pipelines SET id=1 WHERE id = -1')
project.connection.execute('UPDATE p_ci_pipelines SET id=1 WHERE id = -1')
end
rescue StandardError
# Ensures that standard rescue does not silence errors

View File

@ -6052,4 +6052,26 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep, feature_category:
end
end
end
describe 'routing table switch' do
context 'with ff disabled' do
before do
stub_feature_flags(described_class::ROUTING_FEATURE_FLAG => false)
end
it 'uses the legacy table' do
expect(described_class.table_name).to eq('ci_pipelines')
end
end
context 'with ff enabled' do
before do
stub_feature_flags(described_class::ROUTING_FEATURE_FLAG => true)
end
it 'uses the routing table' do
expect(described_class.table_name).to eq('p_ci_pipelines')
end
end
end
end

View File

@ -2,7 +2,7 @@
require 'spec_helper'
RSpec.describe Integrations::Jenkins do
RSpec.describe Integrations::Jenkins, feature_category: :integrations do
let_it_be(:project) { create(:project) }
let(:jenkins_integration) { described_class.new(jenkins_params) }
let(:jenkins_url) { 'http://jenkins.example.com/' }

View File

@ -41,6 +41,14 @@ RSpec.describe Namespace, feature_category: :groups_and_projects do
it { is_expected.to have_many(:cycle_analytics_stages) }
it { is_expected.to have_many(:value_streams) }
it { is_expected.to have_many(:non_archived_projects).class_name('Project') }
it { is_expected.to have_many(:bot_users).through(:bot_user_details).source(:user) }
it do
is_expected.to have_many(:bot_user_details)
.class_name('UserDetail')
.with_foreign_key(:bot_namespace_id)
.inverse_of(:bot_namespace)
end
it do
is_expected.to have_one(:ci_cd_settings).class_name('NamespaceCiCdSetting').inverse_of(:namespace).autosave(true)

View File

@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe UserDetail, feature_category: :system_access do
it { is_expected.to belong_to(:user) }
it { is_expected.to belong_to(:bot_namespace).inverse_of(:bot_user_details) }
specify do
values = [:basics, :move_repository, :code_storage, :exploring, :ci, :other, :joining_team]
@ -105,6 +106,50 @@ RSpec.describe UserDetail, feature_category: :system_access do
it { is_expected.not_to allow_value(onboarding_status).for(:onboarding_status) }
end
context 'when validating bot namespace user type' do
let(:namespace) { create(:namespace) }
context 'for a human user' do
let(:user) { build(:user) }
let(:user_detail) { build(:user_detail, user: user) }
it 'does not allow bot namespace to be set' do
user_detail.bot_namespace = namespace
expect(user_detail).not_to be_valid
expect(user_detail.errors).to contain_exactly _('Bot namespace must only be set for bot user types')
end
context 'when invalid bot_namespace is already set' do
before do
user_detail.save!
user_detail.update_column(:bot_namespace_id, namespace.id)
end
it 'is valid' do
expect(user_detail).to be_valid
end
it 'can be set back to nil' do
user_detail.bot_namespace = nil
expect(user_detail).to be_valid
end
end
end
context 'for a bot user' do
let(:user) { build(:user, :project_bot) }
let(:user_detail) { build(:user_detail, user: user) }
it 'allows bot namespace to be set' do
user_detail.bot_namespace = namespace
expect(user_detail).to be_valid
end
end
end
end
describe '#job_title' do

View File

@ -14,14 +14,13 @@ RSpec.describe VirtualRegistries::Packages::Maven::CachedResponse, type: :model,
end
describe 'validations' do
%i[group file file_sha1 relative_path content_type downloads_count size].each do |attr|
%i[group file file_sha1 relative_path content_type size].each do |attr|
it { is_expected.to validate_presence_of(attr) }
end
%i[relative_path upstream_etag content_type].each do |attr|
it { is_expected.to validate_length_of(attr).is_at_most(255) }
end
it { is_expected.to validate_numericality_of(:downloads_count).only_integer.is_greater_than(0) }
it { is_expected.to validate_length_of(:file_final_path).is_at_most(1024) }
context 'with persisted cached response' do
@ -196,11 +195,6 @@ RSpec.describe VirtualRegistries::Packages::Maven::CachedResponse, type: :model,
it 'creates or update the existing record' do
expect { create_or_update }.to change { described_class.count }.by(1)
# downloads count don't behave accurately in a race condition situation.
# That's an accepted tradeoff for now.
# https://gitlab.com/gitlab-org/gitlab/-/issues/473152 should fix this problem.
expect(described_class.last.downloads_count).to be_between(2, 5).inclusive
end
context 'with invalid updates' do
@ -287,9 +281,7 @@ RSpec.describe VirtualRegistries::Packages::Maven::CachedResponse, type: :model,
subject(:bump) { cached_response.bump_statistics }
it 'updates the correct statistics' do
expect { bump }
.to change { cached_response.downloaded_at }.to(Time.zone.now)
.and change { cached_response.downloads_count }.by(1)
expect { bump }.to change { cached_response.downloaded_at }.to(Time.zone.now)
end
context 'with include_upstream_checked_at' do
@ -299,7 +291,6 @@ RSpec.describe VirtualRegistries::Packages::Maven::CachedResponse, type: :model,
expect { bump }
.to change { cached_response.reload.downloaded_at }.to(Time.zone.now)
.and change { cached_response.upstream_checked_at }.to(Time.zone.now)
.and change { cached_response.downloads_count }.by(1)
end
end
end

View File

@ -1441,7 +1441,6 @@ RSpec.describe API::VirtualRegistries::Packages::Maven, :aggregate_failures, fea
expect(response).to have_gitlab_http_status(:ok)
expect(upstream.cached_responses.last).to have_attributes(
relative_path: "/#{path}",
downloads_count: 1,
upstream_etag: nil,
upstream_checked_at: Time.zone.now,
downloaded_at: Time.zone.now,

View File

@ -122,38 +122,38 @@ RSpec.describe Ci::UnlockArtifactsService, feature_category: :continuous_integra
it 'produces the expected SQL string' do
expect(subject.squish).to eq <<~SQL.squish
UPDATE
"ci_pipelines"
"p_ci_pipelines"
SET
"locked" = 0
WHERE
"ci_pipelines"."id" IN
"p_ci_pipelines"."id" IN
(SELECT
"ci_pipelines"."id"
"p_ci_pipelines"."id"
FROM
"ci_pipelines"
"p_ci_pipelines"
WHERE
"ci_pipelines"."ci_ref_id" = #{ci_ref.id}
AND "ci_pipelines"."locked" = 1
AND "ci_pipelines"."id" < #{before_pipeline.id}
AND "ci_pipelines"."id" NOT IN
"p_ci_pipelines"."ci_ref_id" = #{ci_ref.id}
AND "p_ci_pipelines"."locked" = 1
AND "p_ci_pipelines"."id" < #{before_pipeline.id}
AND "p_ci_pipelines"."id" NOT IN
(WITH RECURSIVE
"base_and_descendants"
AS
((SELECT
"ci_pipelines".*
"p_ci_pipelines".*
FROM
"ci_pipelines"
"p_ci_pipelines"
WHERE
"ci_pipelines"."id" = #{before_pipeline.id})
"p_ci_pipelines"."id" = #{before_pipeline.id})
UNION
(SELECT
"ci_pipelines".*
"p_ci_pipelines".*
FROM
"ci_pipelines",
"p_ci_pipelines",
"base_and_descendants",
"ci_sources_pipelines"
WHERE
"ci_sources_pipelines"."pipeline_id" = "ci_pipelines"."id"
"ci_sources_pipelines"."pipeline_id" = "p_ci_pipelines"."id"
AND "ci_sources_pipelines"."source_pipeline_id" = "base_and_descendants"."id"
AND "ci_sources_pipelines"."source_project_id" = "ci_sources_pipelines"."project_id"))
SELECT
@ -161,11 +161,11 @@ RSpec.describe Ci::UnlockArtifactsService, feature_category: :continuous_integra
FROM
"base_and_descendants"
AS
"ci_pipelines")
"p_ci_pipelines")
LIMIT 1
FOR UPDATE
SKIP LOCKED)
RETURNING ("ci_pipelines"."id")
RETURNING ("p_ci_pipelines"."id")
SQL
end
end
@ -176,23 +176,23 @@ RSpec.describe Ci::UnlockArtifactsService, feature_category: :continuous_integra
it 'produces the expected SQL string' do
expect(subject.squish).to eq <<~SQL.squish
UPDATE
"ci_pipelines"
"p_ci_pipelines"
SET
"locked" = 0
WHERE
"ci_pipelines"."id" IN
"p_ci_pipelines"."id" IN
(SELECT
"ci_pipelines"."id"
"p_ci_pipelines"."id"
FROM
"ci_pipelines"
"p_ci_pipelines"
WHERE
"ci_pipelines"."ci_ref_id" = #{ci_ref.id}
AND "ci_pipelines"."locked" = 1
"p_ci_pipelines"."ci_ref_id" = #{ci_ref.id}
AND "p_ci_pipelines"."locked" = 1
LIMIT 1
FOR UPDATE
SKIP LOCKED)
RETURNING
("ci_pipelines"."id")
("p_ci_pipelines"."id")
SQL
end
end

View File

@ -34,7 +34,6 @@ RSpec.describe VirtualRegistries::Packages::Maven::CachedResponses::CreateOrUpda
group_id: registry.group.id,
upstream_checked_at: Time.zone.now,
downloaded_at: Time.zone.now,
downloads_count: 1,
relative_path: "/#{path}",
upstream_etag: etag,
content_type: content_type,
@ -65,9 +64,7 @@ RSpec.describe VirtualRegistries::Packages::Maven::CachedResponses::CreateOrUpda
end
it 'updates it', :freeze_time do
expect { execute }
.to change { cached_response.reload.downloads_count }.by(1)
.and not_change { upstream.cached_responses.count }
expect { execute }.to not_change { upstream.cached_responses.count }
expect(execute).to be_success

View File

@ -85,9 +85,7 @@ RSpec.describe VirtualRegistries::Packages::Maven::HandleFileRequestService, :ag
it 'bumps the statistics', :freeze_time do
stub_external_registry_request(etag: etag_returned_by_upstream)
expect { execute }
.to change { cached_response.reload.downloads_count }.by(1)
.and change { cached_response.downloaded_at }.to(Time.zone.now)
expect { execute }.to change { cached_response.reload.downloaded_at }.to(Time.zone.now)
end
context 'and is too old' do
@ -104,8 +102,7 @@ RSpec.describe VirtualRegistries::Packages::Maven::HandleFileRequestService, :ag
stub_external_registry_request(etag: etag_returned_by_upstream)
expect { execute }
.to change { cached_response.reload.downloads_count }.by(1)
.and change { cached_response.downloaded_at }.to(Time.zone.now)
.to change { cached_response.reload.downloaded_at }.to(Time.zone.now)
.and change { cached_response.upstream_checked_at }.to(Time.zone.now)
end
end

View File

@ -38,7 +38,7 @@ RSpec.describe Ci::CancelRedundantPipelinesWorker, feature_category: :continuous
recorder = ActiveRecord::QueryRecorder.new { perform }
expect(recorder.count).to eq(1)
expect(recorder.log.first).to match(/^SELECT "ci_pipelines".*"partition_id" = #{pipeline.partition_id}/)
expect(recorder.log.first).to match(/^SELECT "p_ci_pipelines".*"partition_id" = #{pipeline.partition_id}/)
end
end

View File

@ -1401,10 +1401,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-3.119.0.tgz#becbeea7e7ee241baecdad02b9ad04de7a8aed04"
integrity sha512-Os/PF37pCY75uLA0dmGaZe13BmirzlWH+pFLinCAPRChEC7KhHCJtIy0efRAxzkA4uatmHpJHxftuTc7NeiSNQ==
"@gitlab/ui@100.0.0":
version "100.0.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-100.0.0.tgz#9894da3d20676492cbb98972bd637abea2ac8ca3"
integrity sha512-ekrMwtpGv4xlsg35NtwKHNT4WcdFLgRj+26GkEynrPPuMHWmZZ4SlyHK52evAn9fLFdptAEoNzbwf8uClx+cgA==
"@gitlab/ui@101.2.1":
version "101.2.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-101.2.1.tgz#47400018c36735dbab50bb5f84a6128944d9b4d2"
integrity sha512-OdRtUfzpAqycUCM5YYSYvut6wXF2ty1yhjDyVbQf5lFE42+3wEOGaxgZUI6joUQW5uO+jrdiZxkfYf/JeNYkaA==
dependencies:
"@floating-ui/dom" "1.4.3"
echarts "^5.3.2"