Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
e1a9119a19
commit
9822cd77bd
|
|
@ -1 +1 @@
|
|||
a8c201bf5a8ace50960c935f1b6553e95aed1fc8
|
||||
c2ed9e9709823463e3e03337a7a0f06bdd1563f0
|
||||
|
|
|
|||
|
|
@ -619,6 +619,28 @@ export function fetchUpdatedNotes() {
|
|||
}
|
||||
|
||||
if (data.notes?.length) {
|
||||
const botNote = data.notes?.find(
|
||||
(note) => note.author.user_type === 'duo_code_review_bot' && !note.system,
|
||||
);
|
||||
|
||||
if (botNote) {
|
||||
let discussions = this.discussions.filter((d) => d.id === botNote.discussion_id);
|
||||
|
||||
if (!discussions.length) {
|
||||
discussions = this.discussions;
|
||||
}
|
||||
|
||||
for (const discussion of discussions) {
|
||||
const systemNote = discussion.notes.find(
|
||||
(note) => note.author.user_type === 'duo_code_review_bot' && note.system,
|
||||
);
|
||||
if (systemNote) {
|
||||
this.removeNote(systemNote);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await this.updateOrCreateNotes(data.notes);
|
||||
this.startTaskList();
|
||||
this.updateResolvableDiscussionsCounts();
|
||||
|
|
|
|||
|
|
@ -608,6 +608,28 @@ export const fetchUpdatedNotes = ({ commit, state, getters, dispatch }) => {
|
|||
return axios
|
||||
.get(endpoint, options)
|
||||
.then(({ data }) => {
|
||||
const botNote = data.notes?.find(
|
||||
(note) => note.author.user_type === 'duo_code_review_bot' && !note.system,
|
||||
);
|
||||
|
||||
if (botNote) {
|
||||
let discussions = state.discussions.filter((d) => d.id === botNote.discussion_id);
|
||||
|
||||
if (!discussions.length) {
|
||||
discussions = state.discussions;
|
||||
}
|
||||
|
||||
for (const discussion of discussions) {
|
||||
const systemNote = discussion.notes.find(
|
||||
(note) => note.author.user_type === 'duo_code_review_bot' && note.system,
|
||||
);
|
||||
if (systemNote) {
|
||||
commit(types.DELETE_NOTE, systemNote);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pollSuccessCallBack(data, commit, state, getters, dispatch);
|
||||
})
|
||||
.catch(() => {});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import Vue from 'vue';
|
||||
import { GlDisclosureDropdown } from '@gitlab/ui';
|
||||
import { s__ } from '~/locale';
|
||||
|
||||
function getMenuItems(container) {
|
||||
return JSON.parse(container.querySelector('script').textContent);
|
||||
|
|
@ -32,6 +33,8 @@ export const OptionsMenuAdapter = {
|
|||
category: 'tertiary',
|
||||
size: 'small',
|
||||
items,
|
||||
toggleText: s__('RapidDiffs|Show options'),
|
||||
textSrOnly: true,
|
||||
},
|
||||
attrs: {
|
||||
'data-options-toggle': true,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,15 @@
|
|||
* }"
|
||||
* />
|
||||
*/
|
||||
import { GlButton, GlSkeletonLoader, GlTooltipDirective, GlIcon } from '@gitlab/ui';
|
||||
import {
|
||||
GlButton,
|
||||
GlSkeletonLoader,
|
||||
GlTooltipDirective,
|
||||
GlIcon,
|
||||
GlAnimatedLoaderIcon,
|
||||
GlAvatar,
|
||||
GlAvatarLink,
|
||||
} from '@gitlab/ui';
|
||||
import $ from 'jquery';
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { mapGetters, mapActions, mapState } from 'vuex';
|
||||
|
|
@ -51,6 +59,9 @@ export default {
|
|||
TimelineEntryItem,
|
||||
GlButton,
|
||||
GlSkeletonLoader,
|
||||
GlAnimatedLoaderIcon,
|
||||
GlAvatar,
|
||||
GlAvatarLink,
|
||||
},
|
||||
directives: {
|
||||
GlTooltip: GlTooltipDirective,
|
||||
|
|
@ -117,6 +128,9 @@ export default {
|
|||
}
|
||||
return icon;
|
||||
},
|
||||
isDuoCodeReviewSystemNote() {
|
||||
return this.note.author.user_type === 'duo_code_review_bot';
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
renderGFM(this.$refs['gfm-content']);
|
||||
|
|
@ -158,25 +172,54 @@ export default {
|
|||
{
|
||||
'system-note-icon -gl-mt-1 gl-ml-2 gl-h-6 gl-w-6': isAllowedIcon,
|
||||
'system-note-dot -gl-top-1 gl-ml-4 gl-mt-3 gl-h-3 gl-w-3 gl-border-2 gl-border-solid gl-border-subtle':
|
||||
!isAllowedIcon,
|
||||
!isAllowedIcon && !isDuoCodeReviewSystemNote,
|
||||
'gl-bg-white': isDuoCodeReviewSystemNote,
|
||||
'gl-mb-4 gl-ml-5': isDuoCodeReviewSystemNote && note.type,
|
||||
},
|
||||
]"
|
||||
class="gl-relative gl-float-left gl-flex gl-items-center gl-justify-center gl-rounded-full"
|
||||
>
|
||||
<gl-avatar-link
|
||||
v-if="isDuoCodeReviewSystemNote"
|
||||
:href="note.author.path"
|
||||
:data-user-id="note.author.id"
|
||||
:data-username="note.author.username"
|
||||
class="js-user-link"
|
||||
>
|
||||
<gl-avatar
|
||||
:src="note.author.avatar_url"
|
||||
:entity-name="note.author.username"
|
||||
:alt="note.author.name"
|
||||
:size="32"
|
||||
data-testid="system-note-avatar"
|
||||
/>
|
||||
</gl-avatar-link>
|
||||
<gl-icon
|
||||
v-if="isAllowedIcon"
|
||||
v-else-if="isAllowedIcon"
|
||||
:name="systemNoteIconName"
|
||||
:size="14"
|
||||
data-testid="timeline-icon"
|
||||
/>
|
||||
</div>
|
||||
<div class="gl-ml-7">
|
||||
<div class="gl-flex gl-items-start gl-justify-between">
|
||||
<div class="gl-ml-7" :class="{ 'gl-h-7': isDuoCodeReviewSystemNote }">
|
||||
<div
|
||||
class="gl-flex"
|
||||
:class="{
|
||||
'gl-items-start gl-justify-between': !isDuoCodeReviewSystemNote,
|
||||
'gl-h-full gl-items-center': isDuoCodeReviewSystemNote,
|
||||
}"
|
||||
>
|
||||
<gl-animated-loader-icon
|
||||
v-if="isDuoCodeReviewSystemNote"
|
||||
is-on
|
||||
class="gl-ml-3 gl-self-center"
|
||||
data-testid="duo-loading-icon"
|
||||
/>
|
||||
<note-header
|
||||
:author="note.author"
|
||||
:created-at="note.created_at"
|
||||
:created-at="isDuoCodeReviewSystemNote ? null : note.created_at"
|
||||
:note-id="note.id"
|
||||
:is-system-note="true"
|
||||
is-system-note
|
||||
:is-imported="note.imported"
|
||||
>
|
||||
<span ref="gfm-content" v-safe-html="actionTextHtml"></span>
|
||||
|
|
@ -206,7 +249,7 @@ export default {
|
|||
</template>
|
||||
</note-header>
|
||||
</div>
|
||||
<div class="note-body gl-pb-3 gl-pl-3">
|
||||
<div class="note-body gl-pb-0 gl-pl-3">
|
||||
<div
|
||||
v-safe-html="note.note_html"
|
||||
:class="{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<li class="js-timeline-entry timeline-entry note-container-query-wrapper">
|
||||
<div class="timeline-entry-inner"><slot></slot></div>
|
||||
<div class="timeline-entry-inner gl-clearfix"><slot></slot></div>
|
||||
</li>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
border-radius: var(--rd-diff-file-border-radius);
|
||||
}
|
||||
|
||||
.rd-diff-file-title {
|
||||
.rd-diff-file-header-main {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
|
@ -56,6 +56,17 @@
|
|||
z-index: 1;
|
||||
}
|
||||
|
||||
.rd-diff-file-title {
|
||||
@apply gl-text-default;
|
||||
font: inherit;
|
||||
font-weight: $gl-font-weight-heading;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.rd-diff-file-moved {
|
||||
font-weight: $gl-font-weight-normal;
|
||||
}
|
||||
|
||||
.rd-diff-file-toggle {
|
||||
margin-right: $gl-spacing-scale-3;
|
||||
}
|
||||
|
|
@ -87,17 +98,18 @@
|
|||
.rd-diff-file-stats {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
margin: 0 0 0 auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.rd-lines-added {
|
||||
@apply gl-text-success;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.rd-lines-removed {
|
||||
@apply gl-text-danger;
|
||||
margin-left: $gl-padding-8;
|
||||
margin: 0 0 0 $gl-padding-8;
|
||||
}
|
||||
|
||||
.rd-diff-file-body {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,20 @@
|
|||
font-size: constants.$code-font-size;
|
||||
}
|
||||
|
||||
// we can only use gl-dark for now because prefers-color-scheme can be overridden by user setting
|
||||
// light-dark() also doesn't work because it always returns a color and can never be 'initial'
|
||||
// stylelint-disable-next-line gitlab/no-gl-class
|
||||
:root.gl-dark .rd-text-view-root {
|
||||
// disable side borders when light theme is used in dark mode
|
||||
--rd-disable-border-colors: var(--code-light-theme);
|
||||
}
|
||||
|
||||
// stylelint-disable-next-line gitlab/no-gl-class
|
||||
:root:not(.gl-dark) .rd-text-view-root {
|
||||
// disable side borders when light theme is used in dark mode
|
||||
--rd-disable-border-colors: var(--code-dark-theme);
|
||||
}
|
||||
|
||||
.rd-text-view-root,
|
||||
.rd-text-view-content {
|
||||
display: block;
|
||||
|
|
@ -179,12 +193,12 @@
|
|||
}
|
||||
|
||||
.rd-line-number:first-child {
|
||||
box-shadow: -1px 0 var(--rd-line-border-color);
|
||||
box-shadow: var(--rd-disable-border-colors, -1px 0 var(--rd-line-border-color));
|
||||
border-bottom-left-radius: var(--rd-row-bottom-left-radius);
|
||||
}
|
||||
|
||||
.rd-line-content:last-child {
|
||||
box-shadow: 1px 0 var(--rd-line-border-color);
|
||||
box-shadow: var(--rd-disable-border-colors, 1px 0 var(--rd-line-border-color));
|
||||
border-bottom-right-radius: var(--rd-row-bottom-right-radius);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ $white-gc-bg: #eaf2f5;
|
|||
}
|
||||
|
||||
@mixin white-base {
|
||||
--code-light-theme: 1;
|
||||
--diff-expansion-background-color: #{$gl-color-neutral-100};
|
||||
|
||||
--code-background: #{$gl-color-neutral-0};
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ $dark-il: #de935f;
|
|||
}
|
||||
|
||||
.code.dark {
|
||||
--code-dark-theme: 1;
|
||||
--code-border-lightness-adjust: 0.1;
|
||||
--diff-expansion-background-color: #{$gl-color-neutral-600};
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ $monokai-gh: #75715e;
|
|||
}
|
||||
|
||||
.code.monokai {
|
||||
--code-dark-theme: 1;
|
||||
--code-border-lightness-adjust: 0.1;
|
||||
--diff-expansion-background-color: #{$gl-color-neutral-600};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ $none-code-mark: #d3e3f4;
|
|||
}
|
||||
|
||||
.code.none {
|
||||
--code-light-theme: 1;
|
||||
--diff-expansion-background-color: #{$gl-color-neutral-100};
|
||||
|
||||
--code-background: #{$gl-color-neutral-0};
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ $solarized-dark-il: #2aa198;
|
|||
}
|
||||
|
||||
.code.solarized-dark {
|
||||
--code-dark-theme: 1;
|
||||
--code-border-lightness-adjust: 0.1;
|
||||
--diff-expansion-background-color: #{lighten($solarized-dark-pre-bg, 10%)};
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ $solarized-light-il: #2aa198;
|
|||
}
|
||||
|
||||
.code.solarized-light {
|
||||
--code-light-theme: 1;
|
||||
--diff-expansion-background-color: #{$gl-color-neutral-100};
|
||||
|
||||
--code-background: #{$solarized-light-pre-bg};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@
|
|||
}
|
||||
|
||||
.system-note {
|
||||
.note-body:has(.note-text p:first-child:last-child) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.note-text {
|
||||
// System notes render the text twice; this hides the second one. Do not remove!
|
||||
p:first-child {
|
||||
|
|
|
|||
|
|
@ -13,26 +13,25 @@
|
|||
|
||||
.rd-diff-file-header{ data: { testid: 'rd-diff-file-header' } }
|
||||
.rd-diff-file-toggle<
|
||||
= render Pajamas::ButtonComponent.new(category: :tertiary, size: :small, icon: 'chevron-down', button_options: { class: 'rd-diff-file-toggle-button', data: { opened: '', click: 'toggleFile' }, aria: { label: _('Hide file contents') } })
|
||||
= render Pajamas::ButtonComponent.new(category: :tertiary, size: :small, icon: 'chevron-right', button_options: { class: 'rd-diff-file-toggle-button', data: { closed: '', click: 'toggleFile' }, aria: { label: _('Show file contents') } })
|
||||
.rd-diff-file-title
|
||||
= render Pajamas::ButtonComponent.new(category: :tertiary, size: :small, icon: 'chevron-down', button_options: { class: 'rd-diff-file-toggle-button', data: { opened: '', click: 'toggleFile' }, aria: { label: _('Hide file contents'), expanded: 'true' } })
|
||||
= render Pajamas::ButtonComponent.new(category: :tertiary, size: :small, icon: 'chevron-right', button_options: { class: 'rd-diff-file-toggle-button', data: { closed: '', click: 'toggleFile' }, aria: { label: _('Show file contents'), expanded: 'false' } })
|
||||
.rd-diff-file-header-main
|
||||
- if @diff_file.submodule?
|
||||
%span{ data: { testid: 'rd-diff-file-header-submodule' } }
|
||||
= helpers.sprite_icon('folder-git', file_icon: true)
|
||||
%strong
|
||||
%h2.rd-diff-file-title
|
||||
= helpers.submodule_link(@diff_file.blob, @diff_file.content_sha, @diff_file.repository)
|
||||
= copy_path_button
|
||||
- else
|
||||
-# TODO: add icons for file types
|
||||
- if @diff_file.renamed_file?
|
||||
- old_path, new_path = helpers.mark_inline_diffs(@diff_file.old_path, @diff_file.new_path)
|
||||
%strong
|
||||
%h2.rd-diff-file-title{ aria: { label: moved_title_label } }
|
||||
= old_path
|
||||
→
|
||||
%strong
|
||||
%span.rd-diff-file-moved →
|
||||
= new_path
|
||||
- else
|
||||
%strong
|
||||
%h2.rd-diff-file-title
|
||||
= @diff_file.file_path
|
||||
- if @diff_file.deleted_file?
|
||||
= _("deleted")
|
||||
|
|
@ -56,5 +55,5 @@
|
|||
-# haml-lint:disable InlineJavaScript
|
||||
%script{ type: "application/json" }
|
||||
= menu_items.map { |item| item.except(:position) }.to_json.html_safe
|
||||
- button_params = { icon: 'ellipsis_v', button_options: { data: { click: 'toggleOptionsMenu' }, aria: { label: _('Options') } } }
|
||||
- button_params = { icon: 'ellipsis_v', button_options: { data: { click: 'toggleOptionsMenu' }, aria: { label: s_('RapidDiffs|Show options') } } }
|
||||
= render Pajamas::ButtonComponent.new(category: :tertiary, size: :small, **button_params)
|
||||
|
|
|
|||
|
|
@ -37,5 +37,13 @@ module RapidDiffs
|
|||
|
||||
[*base_items, *@additional_menu_items].sort_by { |item| item[:position] || Float::INFINITY }
|
||||
end
|
||||
|
||||
def moved_title_label
|
||||
helpers.safe_format(
|
||||
s_('RapidDiffs|File moved from %{old} to %{new}'),
|
||||
old: @diff_file.old_path,
|
||||
new: @diff_file.new_path
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Import
|
||||
class PlaceholderUserDetail < ApplicationRecord
|
||||
self.table_name = 'import_placeholder_user_details'
|
||||
|
||||
DELETION_RETRY_PERIOD = 2.days
|
||||
|
||||
belongs_to :placeholder_user, class_name: 'User', inverse_of: :placeholder_user_detail
|
||||
belongs_to :namespace
|
||||
belongs_to :organization, class_name: 'Organizations::Organization'
|
||||
|
||||
validates :deletion_attempts, numericality: { greater_than_or_equal_to: 0 }
|
||||
validates :placeholder_user, presence: true
|
||||
|
||||
def self.eligible_for_deletion(max_attempts = PlaceholderUserCleanupWorker::MAX_ATTEMPTS)
|
||||
base_query = where(deletion_attempts: ...max_attempts, namespace_id: nil)
|
||||
|
||||
never_attempted_records = base_query.where(last_deletion_attempt_at: nil)
|
||||
retry_eligible_records = base_query.where(last_deletion_attempt_at: ...DELETION_RETRY_PERIOD.ago)
|
||||
|
||||
from(
|
||||
"(#{never_attempted_records.to_sql} UNION " \
|
||||
"#{retry_eligible_records.to_sql}) AS import_placeholder_user_details"
|
||||
).select('import_placeholder_user_details.*')
|
||||
end
|
||||
|
||||
def increment_deletion_attempt
|
||||
::Import::PlaceholderUserDetail.increment_counter(:deletion_attempts, id, touch: :last_deletion_attempt_at)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -118,6 +118,7 @@ class Namespace < ApplicationRecord
|
|||
|
||||
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
|
||||
has_one :placeholder_user_detail, class_name: 'Import::PlaceholderUserDetail'
|
||||
|
||||
validates :owner, presence: true, if: ->(n) { n.owner_required? }
|
||||
validates :organization, presence: true
|
||||
|
|
|
|||
|
|
@ -279,6 +279,7 @@ class User < ApplicationRecord
|
|||
|
||||
has_many :bulk_imports
|
||||
has_one :namespace_import_user, class_name: 'Import::NamespaceImportUser', inverse_of: :import_user
|
||||
has_one :placeholder_user_detail, class_name: 'Import::PlaceholderUserDetail', foreign_key: :placeholder_user_id, inverse_of: :placeholder_user
|
||||
|
||||
has_many :custom_attributes, class_name: 'UserCustomAttribute'
|
||||
has_one :trusted_with_spam_attribute, -> { UserCustomAttribute.trusted_with_spam }, class_name: 'UserCustomAttribute'
|
||||
|
|
|
|||
|
|
@ -676,6 +676,16 @@
|
|||
:idempotent: true
|
||||
:tags: []
|
||||
:queue_namespace: :cronjob
|
||||
- :name: cronjob:import_placeholder_user_cleanup
|
||||
:worker_name: Import::PlaceholderUserCleanupWorker
|
||||
:feature_category: :importers
|
||||
:has_external_dependencies: false
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
:weight: 1
|
||||
:idempotent: true
|
||||
:tags: []
|
||||
:queue_namespace: :cronjob
|
||||
- :name: cronjob:import_stuck_project_import_jobs
|
||||
:worker_name: Gitlab::Import::StuckProjectImportJobsWorker
|
||||
:feature_category: :importers
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ module Import
|
|||
data_consistency :delayed
|
||||
idempotent!
|
||||
feature_category :importers
|
||||
concurrency_limit -> { 20 }
|
||||
|
||||
def perform(source_user_or_placeholder_user_id, params = {})
|
||||
placeholder_user = find_placeholder_user(source_user_or_placeholder_user_id, params.symbolize_keys)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Import
|
||||
class PlaceholderUserCleanupWorker
|
||||
include ApplicationWorker
|
||||
include CronjobQueue # rubocop: disable Scalability/CronWorkerContext -- no relevant metadata
|
||||
|
||||
idempotent!
|
||||
data_consistency :sticky
|
||||
feature_category :importers
|
||||
deduplicate :until_executed
|
||||
MAX_ATTEMPTS = 15
|
||||
|
||||
def perform
|
||||
Import::PlaceholderUserDetail.eligible_for_deletion.find_each.with_index do |detail, index|
|
||||
detail.increment_deletion_attempt
|
||||
log_max_attempts_warning(detail) if max_attempts_reached?(detail)
|
||||
|
||||
delay = index * 1.second
|
||||
|
||||
Import::DeletePlaceholderUserWorker
|
||||
.perform_in(delay, detail.placeholder_user_id, { type: 'placeholder_user' })
|
||||
end
|
||||
end
|
||||
|
||||
def max_attempts_reached?(detail)
|
||||
detail.deletion_attempts + 1 >= MAX_ATTEMPTS
|
||||
end
|
||||
|
||||
def log_max_attempts_warning(detail)
|
||||
::Import::Framework::Logger.warn(
|
||||
message: "Maximum deletion attempts (#{MAX_ATTEMPTS}) reached for deletion of placeholder user." \
|
||||
"Making final deletion attempt.",
|
||||
placeholder_user_id: detail.placeholder_user_id
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -756,6 +756,9 @@ Settings.cron_jobs['version_version_check_cron']['args'] = {
|
|||
'within_minutes' => 59,
|
||||
'within_hours' => 23
|
||||
}
|
||||
Settings.cron_jobs['import_placeholder_user_cleanup_worker'] ||= {}
|
||||
Settings.cron_jobs['import_placeholder_user_cleanup_worker']['cron'] ||= "0 0 * * *"
|
||||
Settings.cron_jobs['import_placeholder_user_cleanup_worker']['job_class'] = 'Import::PlaceholderUserCleanupWorker'
|
||||
|
||||
Gitlab.ee do
|
||||
Settings.cron_jobs['analytics_devops_adoption_create_all_snapshots_worker'] ||= {}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
table_name: import_placeholder_user_details
|
||||
classes:
|
||||
- Import::PlaceholderUserDetail
|
||||
feature_categories:
|
||||
- importers
|
||||
description: Used to store additional information related to placeholder users.
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/188764
|
||||
milestone: '18.0'
|
||||
gitlab_schema: gitlab_main_cell
|
||||
sharding_key:
|
||||
organization_id: organizations
|
||||
table_size: small
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateImportPlaceholderUserDetails < Gitlab::Database::Migration[2.3]
|
||||
milestone '18.0'
|
||||
|
||||
def change
|
||||
create_table :import_placeholder_user_details do |t|
|
||||
t.bigint :placeholder_user_id, null: false
|
||||
t.bigint :namespace_id
|
||||
t.integer :deletion_attempts, null: false, default: 0
|
||||
t.bigint :organization_id, null: false
|
||||
t.datetime_with_timezone :last_deletion_attempt_at
|
||||
t.timestamps_with_timezone null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddOrganizationForeignKeyToImportPlaceholderUserDetails < Gitlab::Database::Migration[2.3]
|
||||
milestone '18.0'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_concurrent_foreign_key :import_placeholder_user_details, :organizations, column: :organization_id,
|
||||
on_delete: :cascade
|
||||
end
|
||||
|
||||
def down
|
||||
with_lock_retries do
|
||||
remove_foreign_key :import_placeholder_user_details, column: :organization_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddIndexToOrganizationIdOnImportPlaceholderUserDetails < Gitlab::Database::Migration[2.3]
|
||||
milestone '18.0'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_import_placeholder_user_details_on_organization_id'
|
||||
|
||||
def up
|
||||
add_concurrent_index :import_placeholder_user_details, :organization_id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :import_placeholder_user_details, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddIndexImportPlaceholderUserDetailsPrimary < Gitlab::Database::Migration[2.3]
|
||||
milestone '18.0'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_import_placeholder_user_details_on_eligible_for_deletion'
|
||||
|
||||
def up
|
||||
add_concurrent_index :import_placeholder_user_details,
|
||||
[:deletion_attempts, :last_deletion_attempt_at, :id],
|
||||
name: INDEX_NAME,
|
||||
where: "(namespace_id IS NULL)"
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :import_placeholder_user_details, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddNamespaceForeignKeyToImportPlaceholderUserDetails < Gitlab::Database::Migration[2.3]
|
||||
milestone '18.0'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_concurrent_foreign_key :import_placeholder_user_details, :namespaces, column: :namespace_id,
|
||||
on_delete: :nullify
|
||||
end
|
||||
|
||||
def down
|
||||
with_lock_retries do
|
||||
remove_foreign_key :import_placeholder_user_details, column: :namespace_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddIndexToNamespaceIdOnImportPlaceholderUserDetails < Gitlab::Database::Migration[2.3]
|
||||
milestone '18.0'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_import_placeholder_user_details_on_namespace_id'
|
||||
|
||||
def up
|
||||
add_concurrent_index :import_placeholder_user_details, :namespace_id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :import_placeholder_user_details, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddPlaceholderUserForeignKeyToImportPlaceholderUserDetails < Gitlab::Database::Migration[2.3]
|
||||
milestone '18.0'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_concurrent_foreign_key :import_placeholder_user_details, :users, column: :placeholder_user_id,
|
||||
on_delete: :cascade
|
||||
end
|
||||
|
||||
def down
|
||||
with_lock_retries do
|
||||
remove_foreign_key :import_placeholder_user_details, column: :placeholder_user_id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddIndexToPlaceholderUserIdOnImportPlaceholderUserDetails < Gitlab::Database::Migration[2.3]
|
||||
milestone '18.0'
|
||||
disable_ddl_transaction!
|
||||
|
||||
INDEX_NAME = 'index_import_placeholder_user_details_on_placeholder_user_id'
|
||||
|
||||
def up
|
||||
add_concurrent_index :import_placeholder_user_details, :placeholder_user_id, name: INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
remove_concurrent_index_by_name :import_placeholder_user_details, INDEX_NAME
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
1df7200afa97649730a83a900708037085367841491b3428ce944c93767d33c2
|
||||
|
|
@ -0,0 +1 @@
|
|||
6b4f1b2655c195d24a94d6b98ed0bdca0e9d394be2e59125a1d876923d1d9d50
|
||||
|
|
@ -0,0 +1 @@
|
|||
e9d4029e5bbf23a5c09f5b2068bb070c6f70d010a1a3f9b43d719c68878bbd70
|
||||
|
|
@ -0,0 +1 @@
|
|||
8c59f02aba27282bb37892281ed8831046379bf2dae4f6afc1b447db561b5584
|
||||
|
|
@ -0,0 +1 @@
|
|||
3483610e10c64d292265c405b27b536592ee57447675054034cfec46ae1d835a
|
||||
|
|
@ -0,0 +1 @@
|
|||
0ea3b343701a80c44e26f28cfb0aace1c2878d645f4541bb419b3718f90f6c4d
|
||||
|
|
@ -0,0 +1 @@
|
|||
75acaf7f1894260fd07751092d828e74ca1ebb5bc1cd1d4a25b3e92f88dd5b06
|
||||
|
|
@ -0,0 +1 @@
|
|||
7a865350121f24bfbf3abffbad12a7616ab6662267a903a2f76ff24072db6acc
|
||||
|
|
@ -15398,6 +15398,26 @@ CREATE SEQUENCE import_placeholder_memberships_id_seq
|
|||
|
||||
ALTER SEQUENCE import_placeholder_memberships_id_seq OWNED BY import_placeholder_memberships.id;
|
||||
|
||||
CREATE TABLE import_placeholder_user_details (
|
||||
id bigint NOT NULL,
|
||||
placeholder_user_id bigint NOT NULL,
|
||||
namespace_id bigint,
|
||||
deletion_attempts integer DEFAULT 0 NOT NULL,
|
||||
organization_id bigint NOT NULL,
|
||||
last_deletion_attempt_at timestamp with time zone,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
updated_at timestamp with time zone NOT NULL
|
||||
);
|
||||
|
||||
CREATE SEQUENCE import_placeholder_user_details_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
ALTER SEQUENCE import_placeholder_user_details_id_seq OWNED BY import_placeholder_user_details.id;
|
||||
|
||||
CREATE TABLE import_source_user_placeholder_references (
|
||||
id bigint NOT NULL,
|
||||
source_user_id bigint NOT NULL,
|
||||
|
|
@ -27218,6 +27238,8 @@ ALTER TABLE ONLY import_failures ALTER COLUMN id SET DEFAULT nextval('import_fai
|
|||
|
||||
ALTER TABLE ONLY import_placeholder_memberships ALTER COLUMN id SET DEFAULT nextval('import_placeholder_memberships_id_seq'::regclass);
|
||||
|
||||
ALTER TABLE ONLY import_placeholder_user_details ALTER COLUMN id SET DEFAULT nextval('import_placeholder_user_details_id_seq'::regclass);
|
||||
|
||||
ALTER TABLE ONLY import_source_user_placeholder_references ALTER COLUMN id SET DEFAULT nextval('import_source_user_placeholder_references_id_seq'::regclass);
|
||||
|
||||
ALTER TABLE ONLY import_source_users ALTER COLUMN id SET DEFAULT nextval('import_source_users_id_seq'::regclass);
|
||||
|
|
@ -29740,6 +29762,9 @@ ALTER TABLE ONLY import_failures
|
|||
ALTER TABLE ONLY import_placeholder_memberships
|
||||
ADD CONSTRAINT import_placeholder_memberships_pkey PRIMARY KEY (id);
|
||||
|
||||
ALTER TABLE ONLY import_placeholder_user_details
|
||||
ADD CONSTRAINT import_placeholder_user_details_pkey PRIMARY KEY (id);
|
||||
|
||||
ALTER TABLE ONLY import_source_user_placeholder_references
|
||||
ADD CONSTRAINT import_source_user_placeholder_references_pkey PRIMARY KEY (id);
|
||||
|
||||
|
|
@ -35340,6 +35365,14 @@ CREATE INDEX index_import_placeholder_memberships_on_namespace_id ON import_plac
|
|||
|
||||
CREATE INDEX index_import_placeholder_memberships_on_project_id ON import_placeholder_memberships USING btree (project_id);
|
||||
|
||||
CREATE INDEX index_import_placeholder_user_details_on_eligible_for_deletion ON import_placeholder_user_details USING btree (deletion_attempts, last_deletion_attempt_at, id) WHERE (namespace_id IS NULL);
|
||||
|
||||
CREATE INDEX index_import_placeholder_user_details_on_namespace_id ON import_placeholder_user_details USING btree (namespace_id);
|
||||
|
||||
CREATE INDEX index_import_placeholder_user_details_on_organization_id ON import_placeholder_user_details USING btree (organization_id);
|
||||
|
||||
CREATE INDEX index_import_placeholder_user_details_on_placeholder_user_id ON import_placeholder_user_details USING btree (placeholder_user_id);
|
||||
|
||||
CREATE INDEX index_import_source_user_placeholder_references_on_namespace_id ON import_source_user_placeholder_references USING btree (namespace_id);
|
||||
|
||||
CREATE INDEX index_import_source_users_on_namespace_id_and_status ON import_source_users USING btree (namespace_id, status);
|
||||
|
|
@ -41821,6 +41854,9 @@ ALTER TABLE ONLY approval_project_rules_users
|
|||
ALTER TABLE ONLY security_policy_project_links
|
||||
ADD CONSTRAINT fk_0eba4d5d71 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE ONLY import_placeholder_user_details
|
||||
ADD CONSTRAINT fk_0f2747626d FOREIGN KEY (placeholder_user_id) REFERENCES users(id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE ONLY deployment_approvals
|
||||
ADD CONSTRAINT fk_0f58311058 FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
|
||||
|
||||
|
|
@ -41836,6 +41872,9 @@ ALTER TABLE ONLY packages_package_file_build_infos
|
|||
ALTER TABLE ONLY audit_events_streaming_event_type_filters
|
||||
ADD CONSTRAINT fk_107946dffb FOREIGN KEY (group_id) REFERENCES namespaces(id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE ONLY import_placeholder_user_details
|
||||
ADD CONSTRAINT fk_10a16b0435 FOREIGN KEY (organization_id) REFERENCES organizations(id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE ONLY work_item_type_custom_lifecycles
|
||||
ADD CONSTRAINT fk_111d417cb7 FOREIGN KEY (work_item_type_id) REFERENCES work_item_types(id) ON DELETE CASCADE;
|
||||
|
||||
|
|
@ -42493,6 +42532,9 @@ ALTER TABLE ONLY milestone_releases
|
|||
ALTER TABLE ONLY snippet_repository_states
|
||||
ADD CONSTRAINT fk_5f750f3182 FOREIGN KEY (snippet_repository_id) REFERENCES snippet_repositories(snippet_id) ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE ONLY import_placeholder_user_details
|
||||
ADD CONSTRAINT fk_5f76b35426 FOREIGN KEY (namespace_id) REFERENCES namespaces(id) ON DELETE SET NULL;
|
||||
|
||||
ALTER TABLE ONLY packages_conan_package_revisions
|
||||
ADD CONSTRAINT fk_5f7c6a9244 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: GitLab Duo Self-Hosted
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab Self-Managed
|
||||
|
||||
|
|
@ -19,8 +19,9 @@ title: GitLab Duo Self-Hosted
|
|||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/12972) in GitLab 17.1 [with a flag](../feature_flags.md) named `ai_custom_model`. Disabled by default.
|
||||
- [Enabled on GitLab Self-Managed](https://gitlab.com/groups/gitlab-org/-/epics/15176) in GitLab 17.6.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8
|
||||
- Generally available in GitLab 17.9
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8.
|
||||
- Generally available in GitLab 17.9.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: GitLab Duo Self-Hosted configuration and authentication
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab Self-Managed
|
||||
|
||||
|
|
@ -19,8 +19,9 @@ title: GitLab Duo Self-Hosted configuration and authentication
|
|||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/12972) in GitLab 17.1 [with a flag](../feature_flags.md) named `ai_custom_model`. Disabled by default.
|
||||
- [Enabled on GitLab Self-Managed](https://gitlab.com/groups/gitlab-org/-/epics/15176) in GitLab 17.6.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8
|
||||
- Generally available in GitLab 17.9
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8.
|
||||
- Generally available in GitLab 17.9.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Configure GitLab to access GitLab Duo Self-Hosted
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab Self-Managed
|
||||
|
||||
|
|
@ -21,7 +21,8 @@ title: Configure GitLab to access GitLab Duo Self-Hosted
|
|||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8
|
||||
- Ability to set AI gateway URL using UI [added](https://gitlab.com/gitlab-org/gitlab/-/issues/473143) in GitLab 17.9.
|
||||
- Generally available in GitLab 17.9
|
||||
- Generally available in GitLab 17.9.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Enable logging for self-hosted models
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab Self-Managed
|
||||
|
||||
|
|
@ -19,9 +19,10 @@ title: Enable logging for self-hosted models
|
|||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/12972) in GitLab 17.1 [with a flag](../feature_flags.md) named `ai_custom_model`. Disabled by default.
|
||||
- [Enabled on GitLab Self-Managed](https://gitlab.com/groups/gitlab-org/-/epics/15176) in GitLab 17.6.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8
|
||||
- Generally available in GitLab 17.9
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8.
|
||||
- Generally available in GitLab 17.9.
|
||||
- Ability to turn logging on and off through the UI added in GitLab 17.9.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: GitLab Duo Self-Hosted supported platforms
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab Self-Managed
|
||||
|
||||
|
|
@ -19,8 +19,9 @@ title: GitLab Duo Self-Hosted supported platforms
|
|||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/12972) in GitLab 17.1 [with a flag](../feature_flags.md) named `ai_custom_model`. Disabled by default.
|
||||
- [Enabled on GitLab Self-Managed](https://gitlab.com/groups/gitlab-org/-/epics/15176) in GitLab 17.6.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8
|
||||
- Generally available in GitLab 17.9
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8.
|
||||
- Generally available in GitLab 17.9.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Supported GitLab Duo Self-Hosted models and hardware requirements
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab Self-Managed
|
||||
|
||||
|
|
@ -19,8 +19,9 @@ title: Supported GitLab Duo Self-Hosted models and hardware requirements
|
|||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/12972) in GitLab 17.1 [with a flag](../feature_flags.md) named `ai_custom_model`. Disabled by default.
|
||||
- [Enabled on GitLab Self-Managed](https://gitlab.com/groups/gitlab-org/-/epics/15176) in GitLab 17.6.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8
|
||||
- Generally available in GitLab 17.9
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8.
|
||||
- Generally available in GitLab 17.9.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: Troubleshooting GitLab Duo Self-Hosted
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab Self-Managed
|
||||
|
||||
|
|
@ -19,8 +19,9 @@ title: Troubleshooting GitLab Duo Self-Hosted
|
|||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/12972) in GitLab 17.1 [with a flag](../feature_flags.md) named `ai_custom_model`. Disabled by default.
|
||||
- [Enabled on GitLab Self-Managed](https://gitlab.com/groups/gitlab-org/-/epics/15176) in GitLab 17.6.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8
|
||||
- Generally available in GitLab 17.9
|
||||
- Feature flag `ai_custom_model` removed in GitLab 17.8.
|
||||
- Generally available in GitLab 17.9.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -666,9 +666,9 @@ Supported attributes:
|
|||
| Attribute | Type | Required | Description |
|
||||
|-------------------------------------|-------------------|----------|-------------|
|
||||
| `id` | integer or string | Yes | The ID or [URL-encoded path of a project](rest/_index.md#namespaced-paths). |
|
||||
| `approvals_required` | integer | Yes | The number of required approvals for this rule. |
|
||||
| `approvals_required` | integer | No | The number of required approvals for this rule. |
|
||||
| `approval_rule_id` | integer | Yes | The ID of a approval rule. |
|
||||
| `name` | string | Yes | The name of the approval rule. Limited to 1024 characters. |
|
||||
| `name` | string | No | The name of the approval rule. Limited to 1024 characters. |
|
||||
| `applies_to_all_protected_branches` | boolean | No | Whether to apply the rule to all protected branches. If set to `true`, it ignores the value of `protected_branch_ids`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/335316) in GitLab 15.3. |
|
||||
| `group_ids` | Array | No | The IDs of groups as approvers. |
|
||||
| `protected_branch_ids` | Array | No | The IDs of protected branches to scope the rule by. To identify the ID, [use the API](protected_branches.md#list-protected-branches). |
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ For example:
|
|||
Files returned by this endpoint always have the `plain/text` content type.
|
||||
|
||||
In both examples, replace `<project-id>` with a valid project ID. You can find the project ID on the
|
||||
[project overview page](../../user/project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
[project overview page](../../user/project/working_with_projects.md#find-the-project-id).
|
||||
|
||||
Artifacts for [parent and child pipelines](../pipelines/downstream_pipelines.md#parent-child-pipelines)
|
||||
are searched in hierarchical order from parent to child. For example, if both parent and
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ After setting up WIF, you must grant the WIF principal access to the secrets in
|
|||
[Project's dashboard](https://console.cloud.google.com/home/dashboard).
|
||||
- `POOL_ID`: The ID (not name) of the workload identity pool created in the first section,
|
||||
for example `gitlab-pool`.
|
||||
- `GITLAB_PROJECT_ID`: The GitLab project ID found on the [project overview page](../../user/project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- `GITLAB_PROJECT_ID`: The GitLab project ID found on the [project overview page](../../user/project/working_with_projects.md#find-the-project-id).
|
||||
|
||||
1. Assign the role **Secret Manager Secret Accessor**.
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ In each example, replace:
|
|||
- `<token>` with your trigger token.
|
||||
- `<ref_name>` with a branch or tag name, like `main`.
|
||||
- `<project_id>` with your project ID, like `123456`. The project ID is displayed
|
||||
on the [project overview page](../../user/project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
on the [project overview page](../../user/project/working_with_projects.md#find-the-project-id).
|
||||
|
||||
### Use a CI/CD job
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ trigger_pipeline:
|
|||
In this example:
|
||||
|
||||
- `1234` is the project ID for `project-B`. The project ID is displayed on the
|
||||
[project overview page](../../user/project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
[project overview page](../../user/project/working_with_projects.md#find-the-project-id).
|
||||
- The [`rules`](../yaml/_index.md#rules) cause the job to run every time a tag is added to `project-A`.
|
||||
- `MY_TRIGGER_TOKEN` is a [masked CI/CD variable](../variables/_index.md#mask-a-cicd-variable)
|
||||
that contains the trigger token.
|
||||
|
|
@ -130,7 +130,7 @@ Replace:
|
|||
|
||||
- The URL with `https://gitlab.com` or the URL of your instance.
|
||||
- `<project_id>` with your project ID, like `123456`. The project ID is displayed
|
||||
on the [project overview page](../../user/project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
on the [project overview page](../../user/project/working_with_projects.md#find-the-project-id).
|
||||
- `<ref_name>` with a branch or tag name, like `main`. This value takes precedence over the `ref_name` in the webhook payload.
|
||||
The payload's `ref` is the branch that fired the trigger in the source repository.
|
||||
You must URL-encode the `ref_name` if it contains slashes.
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ schema changes, like additional indexes or columns, in an isolated copy of produ
|
|||
|
||||
1. [Visit the console](https://console.postgres.ai/).
|
||||
1. Select **Sign in with Google**. (Not GitLab, as you need Google SSO to connect with our project.)
|
||||
1. After you sign in, select the GitLab organization and then visit "Ask Joe" in the sidebar.
|
||||
1. After signing in, select the GitLab organization, select "Joe Bot" in the sidebar, and then visit "Ask Joe".
|
||||
1. Select the database you're testing against:
|
||||
- Most queries for the GitLab project run against `gitlab-production-main`.
|
||||
- If the query is for a CI table, select `gitlab-production-ci`.
|
||||
|
|
|
|||
|
|
@ -220,9 +220,9 @@ represent the single source of truth.
|
|||
It's best to use this technique as a performance optimization. For example: when an event has many
|
||||
subscribers that all fetch the same data again from the database.
|
||||
|
||||
### Update the schema
|
||||
### Update the event
|
||||
|
||||
Changes to the schema require multiple rollouts. While the new version is being deployed:
|
||||
Changes to the schema or event name require multiple rollouts. While the new version is being deployed:
|
||||
|
||||
- Existing publishers can publish events using the old version.
|
||||
- Existing subscribers can consume events using the old version.
|
||||
|
|
@ -231,6 +231,16 @@ Changes to the schema require multiple rollouts. While the new version is being
|
|||
As changing the schema ultimately impacts the Sidekiq arguments, refer to our
|
||||
[Sidekiq style guide](sidekiq/compatibility_across_updates.md#changing-the-arguments-for-a-worker) with regards to multiple rollouts.
|
||||
|
||||
#### Rename event
|
||||
|
||||
1. Rollout 1: Introduce new event and prepare the subscribers.
|
||||
- Introduce a copy of the event with new name (you can have the old event inherit from the new).
|
||||
- If the subscriber workers have knowledge of the event name, ensure that they are able to also process the new event.
|
||||
1. Rollout 2: Route new event to subscribers.
|
||||
- Change the publisher to use the new event.
|
||||
- Change all the subscriptions that used the old event to use the new event.
|
||||
- Remove the old event class.
|
||||
|
||||
#### Add properties
|
||||
|
||||
1. Rollout 1:
|
||||
|
|
@ -303,8 +313,9 @@ add a line like this to the `Gitlab::EventStore.configure!` method:
|
|||
|
||||
{{< alert type="warning" >}}
|
||||
|
||||
New workers are recommended to be introduced with a feature flag in order to
|
||||
[ensure compatibility with canary deployments](sidekiq/compatibility_across_updates.md#adding-new-workers).
|
||||
To [ensure compatibility with canary deployments](sidekiq/compatibility_across_updates.md#adding-new-workers)
|
||||
when registering subscriptions, the Sidekiq workers must be introduced in a previous deployment or we must
|
||||
use a feature flag.
|
||||
|
||||
{{< /alert >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ glab mr merge
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- LLM: Anthropic [Claude 3 Haiku](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-haiku)
|
||||
|
|
@ -86,6 +86,7 @@ glab mr merge
|
|||
{{< history >}}
|
||||
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ According to Sentry [it is safe to keep a DSN public](https://docs.sentry.io/con
|
|||
|
||||
Prerequisites:
|
||||
|
||||
- You need the numeric [project ID](../user/project/working_with_projects.md#access-a-project-by-using-the-project-id)
|
||||
- You need the numeric [project ID](../user/project/working_with_projects.md#find-the-project-id)
|
||||
for your project.
|
||||
|
||||
To rotate the Sentry DSN:
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ such as:
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise, GitLab Duo with Amazon Q
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- LLM for GitLab Self-Managed, GitLab Dedicated: Anthropic [Claude 3.5 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-5-sonnet)
|
||||
|
|
@ -379,6 +379,7 @@ such as:
|
|||
- [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/454550) to GitLab Duo and promoted to [beta](../../policy/development_stages_support.md#beta) in GitLab 17.3 [with a flag](../../administration/feature_flags.md) named `summarize_notes_with_duo`. Disabled by default.
|
||||
- [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/162122) in GitLab 17.4.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,8 +100,13 @@ you can also do the following:
|
|||
In addition to [turning on GitLab Duo features](turn_on_off.md),
|
||||
you can also do the following:
|
||||
|
||||
1. Verify that [subscription seats have been purchased](../../subscriptions/subscription-add-ons.md#purchase-gitlab-duo).
|
||||
1. Ensure that [seats are assigned to users](../../subscriptions/subscription-add-ons.md#assign-gitlab-duo-seats).
|
||||
1. For IDE users with the [GitLab Duo extension](../project/repository/code_suggestions/supported_extensions.md#supported-editor-extensions):
|
||||
- Verify that the extension is up-to-date.
|
||||
- Run extension setting health checks, and test the authentication.
|
||||
- If you have GitLab Duo Core, verify that you have:
|
||||
- A Premium or Ultimate subscription.
|
||||
- [Turned on IDE features](turn_on_off.md#change-gitlab-duo-core-availability).
|
||||
- If you have GitLab Duo Pro or Enterprise:
|
||||
- Verify that [a subscription add-on has been purchased](../../subscriptions/subscription-add-ons.md#purchase-gitlab-duo).
|
||||
- Ensure that [seats are assigned to users](../../subscriptions/subscription-add-ons.md#assign-gitlab-duo-seats).
|
||||
- For your IDE:
|
||||
- Verify that the [extension](../project/repository/code_suggestions/set_up.md#configure-editor-extension)
|
||||
or plugin is up-to-date.
|
||||
- Run health checks, and test the authentication.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ title: GitLab Duo Chat
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise, GitLab Duo with Amazon Q
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise, GitLab Duo with Amazon Q
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- LLMs: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet), Anthropic [Claude 3.5 Sonnet V2](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-5-sonnet-v2), Anthropic [Claude 3.5 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-5-sonnet), Anthropic [Claude 3.5 Haiku](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-5-haiku), and [Vertex AI Search](https://cloud.google.com/enterprise-search). The LLM depends on the question asked.
|
||||
- LLM for Amazon Q: Amazon Q Developer
|
||||
|
|
@ -78,23 +78,23 @@ In addition, Chat is aware of different information, depending on where you use
|
|||
|
||||
### In the GitLab UI
|
||||
|
||||
| Area | Available context | GitLab Duo Pro | GitLab Duo Enterprise | Instructions |
|
||||
|------|----------------|----------------|----------------------|-----------------|
|
||||
| Code files | File content | {{< icon name="check-circle-filled" >}} Yes | {{< icon name="check-circle-filled" >}} Yes | From the single file, ask about `this code` or `this file`. |
|
||||
| Epics | Epic details | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the epic, ask about `this epic`, `this`, or the URL. From any UI area, ask about the URL. |
|
||||
| Issues | Issue details | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the issue, ask about `this issue`, `this`, or the URL. From any UI area, ask about the URL. |
|
||||
| Merge requests | MR details | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the merge request, ask about `this merge request`, `this`, or the URL. For more information, see [Ask about a specific merge request](examples.md#ask-about-a-specific-merge-request). |
|
||||
| Commits | Commit details | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the commit, ask about `this commit` or `this`. From any UI area, ask about the URL. |
|
||||
| Pipeline jobs | Job details | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the pipeline job, ask about `this pipeline job` or `this`. From any UI area, ask about the URL. |
|
||||
| Area and available context | GitLab Duo Core | GitLab Duo Pro | GitLab Duo Enterprise | Instructions |
|
||||
|------|----------------|----------------|----------------------|-----------------|-----------------|
|
||||
| Code files and file content | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | {{< icon name="check-circle-filled" >}} Yes | From the single file, ask about `this code` or `this file`. |
|
||||
| Epics and epic details | {{< icon name="dash-circle" >}} No | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the epic, ask about `this epic`, `this`, or the URL. From any UI area, ask about the URL. |
|
||||
| Issues and issue details | {{< icon name="dash-circle" >}} No | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the issue, ask about `this issue`, `this`, or the URL. From any UI area, ask about the URL. |
|
||||
| Merge requests (MRs) and MR details | {{< icon name="dash-circle" >}} No | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the merge request, ask about `this merge request`, `this`, or the URL. For more information, see [Ask about a specific merge request](examples.md#ask-about-a-specific-merge-request). |
|
||||
| Commits and commit details | {{< icon name="dash-circle" >}} No | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the commit, ask about `this commit` or `this`. From any UI area, ask about the URL. |
|
||||
| Pipeline jobs and job details | {{< icon name="dash-circle" >}} No | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | From the pipeline job, ask about `this pipeline job` or `this`. From any UI area, ask about the URL. |
|
||||
|
||||
### In IDEs
|
||||
|
||||
| Area | Available context | GitLab Duo Pro | GitLab Duo Enterprise | Instructions |
|
||||
|------|----------------|----------------|----------------------|-----------------|
|
||||
| Selected lines in editor | Selected code | {{< icon name="check-circle-filled" >}} Yes | {{< icon name="check-circle-filled" >}} Yes | With the lines selected, ask about `this code` or `this file`. Chat is not aware of the file; you must select the lines you want to ask about. |
|
||||
| Epics | Epic details | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | Ask about the URL. |
|
||||
| Issues | Issue details | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | Ask about the URL. |
|
||||
| Files | File content | {{< icon name="check-circle-filled" >}} Yes | {{< icon name="check-circle-filled" >}} Yes | Use the `/include` command to search for project files to add to Duo Chat's context. After you've added the files, you can ask Duo Chat questions about the file contents. Available for VS Code and JetBrains IDEs. For more information, see [Ask about specific files](examples.md#ask-about-specific-files-in-the-ide). |
|
||||
| Area and available context | GitLab Duo Core | GitLab Duo Pro | GitLab Duo Enterprise | Instructions |
|
||||
|------|----------------|----------------|----------------------|-----------------|-----------------|
|
||||
| Selected lines in editor and selected code | {{< icon name="check-circle-filled" >}} Yes | {{< icon name="check-circle-filled" >}} Yes | {{< icon name="check-circle-filled" >}} Yes | With the lines selected, ask about `this code` or `this file`. Chat is not aware of the file; you must select the lines you want to ask about. |
|
||||
| Files and file content | {{< icon name="check-circle-filled" >}} Yes | {{< icon name="check-circle-filled" >}} Yes | {{< icon name="check-circle-filled" >}} Yes | Use the `/include` command to search for project files to add to Duo Chat's context. After you've added the files, you can ask Duo Chat questions about the file contents. Available for VS Code and JetBrains IDEs. For more information, see [Ask about specific files](examples.md#ask-about-specific-files-in-the-ide). |
|
||||
| Epics and epic details | {{< icon name="dash-circle" >}} No | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | Ask about the URL. |
|
||||
| Issues and issue details | {{< icon name="dash-circle" >}} No | {{< icon name="dash-circle" >}} No | {{< icon name="check-circle-filled" >}} Yes | Ask about the URL. |
|
||||
|
||||
In addition, in the IDEs, when you use any of the slash commands,
|
||||
like `/explain`, `/refactor`, `/fix`, or `/tests,` Duo Chat has access to the
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ The example questions on this page, including the [slash commands](#gitlab-duo-c
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI, Web IDE, VS Code, and JetBrains IDEs
|
||||
- LLM: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
|
@ -42,6 +42,7 @@ The example questions on this page, including the [slash commands](#gitlab-duo-c
|
|||
- [Generally available and feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154876) in GitLab 17.1.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -61,7 +62,7 @@ To keep Chat up to date with the documentation, its knowledge base is updated da
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI, Web IDE, VS Code, JetBrains IDEs
|
||||
|
|
@ -75,6 +76,7 @@ To keep Chat up to date with the documentation, its knowledge base is updated da
|
|||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122235) for GitLab Self-Managed and GitLab Dedicated in GitLab 16.8.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -98,7 +100,7 @@ For tips on how GitLab Duo Chat can improve your productivity with issues and ep
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI, Web IDE, VS Code, JetBrains IDEs
|
||||
|
|
@ -112,6 +114,7 @@ For tips on how GitLab Duo Chat can improve your productivity with issues and ep
|
|||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128487) for GitLab Self-Managed and GitLab Dedicated in GitLab 16.8.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -131,7 +134,7 @@ If the epic contains a large amount of text (more than 40,000 words), GitLab Duo
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI
|
||||
|
|
@ -143,6 +146,7 @@ If the epic contains a large amount of text (more than 40,000 words), GitLab Duo
|
|||
|
||||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/464587) in GitLab 17.5.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -164,7 +168,7 @@ While in the merge request, open Chat and type your question. For example:
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI
|
||||
|
|
@ -175,6 +179,7 @@ While in the merge request, open Chat and type your question. For example:
|
|||
{{< history >}}
|
||||
|
||||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/468460) in GitLab 17.6.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -188,7 +193,7 @@ You can ask about a specific GitLab commit. For example:
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI
|
||||
|
|
@ -199,6 +204,7 @@ You can ask about a specific GitLab commit. For example:
|
|||
{{< history >}}
|
||||
|
||||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/468461) in GitLab 17.6.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -214,7 +220,7 @@ You can ask about a specific GitLab pipeline job. For example:
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise, GitLab Duo with Amazon Q
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise, GitLab Duo with Amazon Q
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI, Web IDE, VS Code, JetBrains IDEs
|
||||
- LLM: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
|
@ -228,6 +234,7 @@ You can ask about a specific GitLab pipeline job. For example:
|
|||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for GitLab Self-Managed and GitLab Dedicated in GitLab 16.8.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -265,7 +272,7 @@ In the GitLab UI, you can also explain code in:
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI, Web IDE, VS Code, JetBrains IDEs
|
||||
- LLM: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
|
@ -278,6 +285,7 @@ In the GitLab UI, you can also explain code in:
|
|||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122235) for GitLab Self-Managed and GitLab Dedicated in GitLab 16.8.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -298,11 +306,23 @@ You can also ask Chat to generate code. For example:
|
|||
- `Create a product-consumer example with threads and shared memory in C++. Use atomic locks when possible.`
|
||||
- `Generate Rust code for high performance gRPC calls. Provide a source code example for a server and client.`
|
||||
|
||||
## Ask follow up questions
|
||||
## Ask follow-up questions
|
||||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI, Web IDE, VS Code, JetBrains IDEs
|
||||
- LLM for GitLab Self-Managed, GitLab Dedicated: Anthropic [Claude 3.5 Sonnet V2](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-5-sonnet-v2)
|
||||
- LLM for GitLab.com: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
||||
{{< /details >}}
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -320,9 +340,21 @@ A follow-up to the question `How to start a C# project?` could be:
|
|||
|
||||
## Ask about errors
|
||||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI, Web IDE, VS Code, JetBrains IDEs
|
||||
- LLM for GitLab Self-Managed, GitLab Dedicated: Anthropic [Claude 3.5 Sonnet V2](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-5-sonnet-v2)
|
||||
- LLM for GitLab.com: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
||||
{{< /details >}}
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -339,7 +371,7 @@ Programming languages that require compiling the source code may throw cryptic e
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: VS Code, JetBrains IDEs
|
||||
- LLM: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
|
@ -352,6 +384,7 @@ Programming languages that require compiling the source code may throw cryptic e
|
|||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- [Enabled on GitLab.com and GitLab Self-Managed](https://gitlab.com/groups/gitlab-org/-/epics/15183) in GitLab 17.9.
|
||||
- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/188613) in GitLab 18.0. All feature flags removed.
|
||||
- Changed to include the GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -386,7 +419,7 @@ You cannot use [Quick Chat](_index.md#in-gitlab-duo-quick-chat-in-the-editor-vie
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise, GitLab Duo with Amazon Q
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise, GitLab Duo with Amazon Q
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: Web IDE, VS Code, JetBrains IDEs
|
||||
- LLM: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
|
@ -400,6 +433,7 @@ You cannot use [Quick Chat](_index.md#in-gitlab-duo-quick-chat-in-the-editor-vie
|
|||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for GitLab Self-Managed and GitLab Dedicated in GitLab 16.8.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -425,7 +459,7 @@ For more information, see <i class="fa-youtube-play" aria-hidden="true"></i> [Ap
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise, GitLab Duo with Amazon Q
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise, GitLab Duo with Amazon Q
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: Web IDE, VS Code, JetBrains IDEs
|
||||
- LLM: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
|
@ -438,6 +472,7 @@ For more information, see <i class="fa-youtube-play" aria-hidden="true"></i> [Ap
|
|||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for GitLab.com, GitLab Self-Managed and GitLab Dedicated in GitLab 17.3.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -459,7 +494,7 @@ You can include additional instructions to be considered. For example:
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise, GitLab Duo with Amazon Q
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise, GitLab Duo with Amazon Q
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: Web IDE, VS Code, JetBrains IDEs
|
||||
- LLM: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
|
@ -473,6 +508,7 @@ You can include additional instructions to be considered. For example:
|
|||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/429915) for GitLab Self-Managed and GitLab Dedicated in GitLab 16.8.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -533,7 +569,7 @@ Alternatively, you can use GitLab Duo Root Cause Analysis to [troubleshoot faile
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise, GitLab Duo with Amazon Q
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI
|
||||
|
|
@ -548,6 +584,7 @@ Alternatively, you can use GitLab Duo Root Cause Analysis to [troubleshoot faile
|
|||
- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/441681) and moved to GitLab Duo Chat in GitLab 17.3.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6.
|
||||
- Failed jobs widget for merge requests [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174586) in GitLab 17.7.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -664,7 +701,7 @@ Use the commands to quickly accomplish specific tasks.
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise
|
||||
- Add-on: GitLab Duo Core, Pro or Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI, Web IDE, VS Code, JetBrains IDEs
|
||||
|
||||
|
|
@ -673,6 +710,7 @@ Use the commands to quickly accomplish specific tasks.
|
|||
{{< history >}}
|
||||
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -692,13 +730,19 @@ On GitLab.com, in GitLab 17.10 and later, when having [multiple conversations](_
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: GitLab UI
|
||||
|
||||
{{< /details >}}
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
These commands are dynamic and are available only in the GitLab UI when using Duo Chat:
|
||||
|
||||
| Command | Purpose | Area |
|
||||
|
|
@ -713,7 +757,7 @@ These commands are dynamic and are available only in the GitLab UI when using Du
|
|||
{{< details >}}
|
||||
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Pro or Enterprise
|
||||
- Add-on: GitLab Duo Core, Pro, or Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Editors: Web IDE, VS Code, JetBrains IDEs
|
||||
|
||||
|
|
@ -722,6 +766,7 @@ These commands are dynamic and are available only in the GitLab UI when using Du
|
|||
{{< history >}}
|
||||
|
||||
- [Enabled](https://gitlab.com/groups/gitlab-org/-/epics/15227) for [self-hosted model configuration](../../administration/gitlab_duo_self_hosted/_index.md#self-hosted-ai-gateway-and-llms) as well as the [default GitLab external AI vendor configuration](../../administration/gitlab_duo_self_hosted/_index.md#gitlabcom-ai-gateway-with-default-gitlab-external-vendor-llms) in GitLab 17.9.
|
||||
- Changed to include GitLab Duo Core add-on in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,12 @@ This page shows groups that you are a member of through:
|
|||
|
||||
## View a group
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- Accessing the group with the group ID was [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/165889) in GitLab 17.5.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
The group overview page displays information about the group and its members, subgroups, and projects, such as:
|
||||
|
||||
- Group description
|
||||
|
|
@ -133,6 +139,20 @@ To view a group:
|
|||
You can search for the subgroups and projects of the group
|
||||
and sort them in ascending or descending order.
|
||||
|
||||
You can access a group by using its ID instead of its name at `https://gitlab.example.com/-/g/<id>`.
|
||||
For example, if your group `example-group` has an ID `123456`, you can access the group either at
|
||||
`https://gitlab.example.com/example-group` or `https://gitlab.example.com/-/g/123456`.
|
||||
|
||||
## Find the Group ID
|
||||
|
||||
You might need the group ID if you want to interact with it using the [GitLab API](../../api/_index.md).
|
||||
|
||||
To find the Group ID:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your Group.
|
||||
1. On the Group overview page, in the upper-right corner, select **Actions** ({{< icon name="ellipsis_v" >}}).
|
||||
1. Select **Copy Group ID**.
|
||||
|
||||
## View group activity
|
||||
|
||||
To view the activity of a group:
|
||||
|
|
@ -150,26 +170,6 @@ To view the activity of a group:
|
|||
- **Designs**: Designs added, updated, and removed in the group's projects.
|
||||
- **Team**: Group members who joined and left the group's projects.
|
||||
|
||||
### Access a group by using the group ID
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/165889) in GitLab 17.5.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
You can access a group by using its ID instead of its name at `https://gitlab.example.com/-/g/<id>`.
|
||||
For example, if your group `example-group` has an ID `123456`, you can access the group either at
|
||||
`https://gitlab.example.com/example-group` or `https://gitlab.example.com/-/g/123456`.
|
||||
|
||||
You might need the group ID if you want to interact with it using the [GitLab API](../../api/_index.md).
|
||||
|
||||
To copy the Group ID:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your Group.
|
||||
1. On the Group overview page, in the upper-right corner, select **Actions** ({{< icon name="ellipsis_v" >}}).
|
||||
1. Select **Copy Group ID**.
|
||||
|
||||
## Create a group
|
||||
|
||||
To create a group:
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ Prerequisites:
|
|||
error (`Validation failed: Version is invalid`) occurs when you publish.
|
||||
- A valid `composer.json` file at the project root directory.
|
||||
- The Packages feature is enabled in a GitLab repository.
|
||||
- The project ID, which is displayed on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- The project ID, which is displayed on the [project overview page](../../project/working_with_projects.md#find-the-project-id).
|
||||
- One of the following token types:
|
||||
- A [personal access token](../../profile/personal_access_tokens.md) with the scope set to `api`.
|
||||
- A [deploy token](../../project/deploy_tokens/_index.md)
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ Prerequisites:
|
|||
- A local [Conan package](https://docs.conan.io/en/latest/creating_packages/getting_started.html)
|
||||
must exist.
|
||||
- For an instance remote, the package must meet the [naming convention](#package-recipe-naming-convention-for-instance-remotes).
|
||||
- You must have the project ID, which is displayed on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- You must have the project ID, which is displayed on the [project overview page](../../project/working_with_projects.md#find-the-project-id).
|
||||
|
||||
To publish the package, use the `conan upload` command:
|
||||
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ For the instance-level endpoint, ensure the relevant section of your `pom.xml` i
|
|||
|
||||
| Endpoint | Endpoint URL for `pom.xml` | Additional information |
|
||||
|----------|--------------------------------------------------------------------------|------------------------|
|
||||
| Project | `https://gitlab.example.com/api/v4/projects/<project_id>/packages/maven` | Replace `gitlab.example.com` with your domain name. Replace `<project_id>` with your project ID, found on your [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id). |
|
||||
| Project | `https://gitlab.example.com/api/v4/projects/<project_id>/packages/maven` | Replace `gitlab.example.com` with your domain name. Replace `<project_id>` with your project ID, found on your [project overview page](../../project/working_with_projects.md#find-the-project-id). |
|
||||
| Group | `https://gitlab.example.com/api/v4/groups/<group_id>/-/packages/maven` | Replace `gitlab.example.com` with your domain name. Replace `<group_id>` with your group ID, found on your group's homepage. |
|
||||
| Instance | `https://gitlab.example.com/api/v4/packages/maven` | Replace `gitlab.example.com` with your domain name. |
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ Make sure to replace:
|
|||
Make sure to replace:
|
||||
|
||||
- `<domain_name>` with your domain name. For example, `gitlab.com`.
|
||||
- `<project_id>` with the project ID from the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- `<project_id>` with the project ID from the [project overview page](../../project/working_with_projects.md#find-the-project-id).
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ npm config set -- //<domain_name>/api/v4/projects/<project_id>/packages/npm/:_au
|
|||
Make sure to replace:
|
||||
|
||||
- `<domain_name>` with your domain name. For example, `gitlab.com`.
|
||||
- `<project_id>` with the project ID from the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- `<project_id>` with the project ID from the [project overview page](../../project/working_with_projects.md#find-the-project-id).
|
||||
- `<token>` with your deploy token, group access token, project access token, or personal access token.
|
||||
|
||||
{{< /tab >}}
|
||||
|
|
@ -447,7 +447,7 @@ Prerequisites:
|
|||
|
||||
- Replace `@scope` with the [top-level group](#naming-convention) of the project you're installing to the package from.
|
||||
- Replace `<domain_name>` with your domain name, for example, `gitlab.com`.
|
||||
- Replace `<project_id>` with your project ID, found on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- Replace `<project_id>` with your project ID, found on the [project overview page](../../project/working_with_projects.md#find-the-project-id).
|
||||
|
||||
1. Install the package:
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ nuget source Add -Name <source_name> -Source "https://gitlab.example.com/api/v4/
|
|||
Replace:
|
||||
|
||||
- `<source_name>` with your source name
|
||||
- `<project_id>` with the project ID found on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id)
|
||||
- `<project_id>` with the project ID found on the [project overview page](../../project/working_with_projects.md#find-the-project-id)
|
||||
- `<gitlab_username>` with your GitLab username
|
||||
- `<personal_access_token>` with your personal access token
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ dotnet nuget add source "https://gitlab.example.com/api/v4/projects/<project_id>
|
|||
Replace:
|
||||
|
||||
- `<source_name>` with your source name
|
||||
- `<project_id>` with the project ID found on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id)
|
||||
- `<project_id>` with the project ID found on the [project overview page](../../project/working_with_projects.md#find-the-project-id)
|
||||
- `<gitlab_username>` with your GitLab username
|
||||
- `<personal_access_token>` with your personal access token
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ choco source add -n=<source_name> -s "'https://gitlab.example.com/api/v4/project
|
|||
Replace:
|
||||
|
||||
- `<source_name>` with your source name
|
||||
- `<project_id>` with the project ID found on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id)
|
||||
- `<project_id>` with the project ID found on the [project overview page](../../project/working_with_projects.md#find-the-project-id)
|
||||
- `<gitlab_username>` with your GitLab username
|
||||
- `<personal_access_token>` with your personal access token
|
||||
|
||||
|
|
@ -212,7 +212,7 @@ nuget source Add -Name <source_name> -Source "https://gitlab.example.com/api/v4/
|
|||
Replace:
|
||||
|
||||
- `<source_name>` with your source name
|
||||
- `<group_id>` with the group ID found on the [Group overview page](../../group/_index.md#access-a-group-by-using-the-group-id)
|
||||
- `<group_id>` with the group ID found on the [Group overview page](../../group/_index.md#find-the-group-id)
|
||||
- `<gitlab_username>` with your GitLab username
|
||||
- `<personal_access_token>` with your personal access token
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ dotnet nuget add source "https://gitlab.example.com/api/v4/groups/<group_id>/-/p
|
|||
Replace:
|
||||
|
||||
- `<source_name>` with your source name
|
||||
- `<group_id>` with the group ID found on the [Group overview page](../../group/_index.md#access-a-group-by-using-the-group-id)
|
||||
- `<group_id>` with the group ID found on the [Group overview page](../../group/_index.md#find-the-group-id)
|
||||
- `<gitlab_username>` with your GitLab username
|
||||
- `<personal_access_token>` with your personal access token
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ To authenticate with an access token:
|
|||
In this example:
|
||||
|
||||
- `<token>` must be the token value of either your personal access token or deploy token.
|
||||
- `<project_id>` is displayed on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- `<project_id>` is displayed on the [project overview page](../../project/working_with_projects.md#find-the-project-id).
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ You can find this file in root directory of your project, in the same place as t
|
|||
|
||||
- Replace `<my-org>` with your organization scope. Do not include the `@` symbol.
|
||||
- Replace `<domain>` with your domain name.
|
||||
- Replace `<project_id>` with your project's ID, which you can find on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- Replace `<project_id>` with your project's ID, which you can find on the [project overview page](../../project/working_with_projects.md#find-the-project-id).
|
||||
- Replace `<token>` with a deployment token, group access token, project access token, or personal access token.
|
||||
|
||||
In Yarn Classic, scoped registries with `publishConfig["@scope:registry"]` are not supported. See [Yarn pull request 7829](https://github.com/yarnpkg/yarn/pull/7829) for more information.
|
||||
|
|
@ -241,7 +241,7 @@ If you have a one-off package, you can install it from a group or project.
|
|||
|
||||
- Replace `<my-org>` with the top-level group that contains the group you want to install from. Exclude the `@` symbol.
|
||||
- Replace `<domain_name>` with your domain name, for example, `gitlab.com`.
|
||||
- Replace `<group_id>` with your group ID, found on the [group overview page](../../group#access-a-group-by-using-the-group-id).
|
||||
- Replace `<group_id>` with your group ID, found on the [group overview page](../../group#find-the-group-id).
|
||||
|
||||
1. Optional. If your package is private, you must set the registry:
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ If you have a one-off package, you can install it from a group or project.
|
|||
|
||||
- Replace `<domain_name>` with your domain name, for example, `gitlab.com`.
|
||||
- Replace `<token>` with a deployment token (recommended), group access token, project access token, or personal access token.
|
||||
- Replace `<group_id>` with your group ID, found on the [group overview page](../../group#access-a-group-by-using-the-group-id).
|
||||
- Replace `<group_id>` with your group ID, found on the [group overview page](../../group#find-the-group-id).
|
||||
|
||||
1. [Install the package with Yarn](#install-with-yarn).
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ If you have a one-off package, you can install it from a group or project.
|
|||
|
||||
- Replace `<my-org>` with the top-level group that contains the project you want to install from. Exclude the `@` symbol.
|
||||
- Replace `<domain_name>` with your domain name, for example, `gitlab.com`.
|
||||
- Replace `<project_id>` with your project ID, found on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- Replace `<project_id>` with your project ID, found on the [project overview page](../../project/working_with_projects.md#find-the-project-id).
|
||||
|
||||
1. Optional. If your package is private, you must set the registry:
|
||||
|
||||
|
|
@ -285,7 +285,7 @@ If you have a one-off package, you can install it from a group or project.
|
|||
|
||||
- Replace `<domain_name>` with your domain name, for example, `gitlab.com`.
|
||||
- Replace `<token>` with a deployment token (recommended), group access token, project access token, or personal access token.
|
||||
- Replace `<project_id>` with your project ID, found on the [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).
|
||||
- Replace `<project_id>` with your project ID, found on the [project overview page](../../project/working_with_projects.md#find-the-project-id).
|
||||
|
||||
1. [Install the package with Yarn](#install-with-yarn).
|
||||
|
||||
|
|
|
|||
|
|
@ -18,11 +18,31 @@ Your profile also includes settings, which you use to customize your GitLab expe
|
|||
|
||||
## Access your user profile
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- Accessing the profile with the user ID was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/185387) in GitLab 17.11.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
To access your profile:
|
||||
|
||||
1. On the left sidebar, select your avatar.
|
||||
1. Select your name or username.
|
||||
|
||||
You can also access a users' profile page by using the ID instead of the username at `https://gitlab.example.com/-/u/<id>`.
|
||||
For example, if your username is `gitlab-user` has an ID `12345`, you can access the profile page either at
|
||||
`https://gitlab.example.com/gitlab-user` or `https://gitlab.example.com/-/u/12345`.
|
||||
|
||||
## Find the user ID
|
||||
|
||||
You might need the user ID if you want to interact with it using the [GitLab API](../../api/_index.md).
|
||||
|
||||
To find the user ID:
|
||||
|
||||
1. Go to the users' profile page.
|
||||
1. On the profile page, in the upper-right corner, select **Actions** (**{ellipsis_v}**).
|
||||
1. Select **Copy user ID**.
|
||||
|
||||
## Access your user settings
|
||||
|
||||
To access your user settings:
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ To edit an issue:
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com
|
||||
- Status: Experiment
|
||||
|
|
@ -58,6 +58,7 @@ To edit an issue:
|
|||
|
||||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10762) in GitLab 16.3 as an [experiment](../../../policy/development_stages_support.md#experiment).
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ GitLab Duo is designed to provide contextually relevant information during the l
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed
|
||||
- Status: Beta
|
||||
|
|
@ -28,6 +28,7 @@ GitLab Duo is designed to provide contextually relevant information during the l
|
|||
- [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/429882) to beta in GitLab 16.10.
|
||||
- Changed to require GitLab Duo add-on in GitLab 17.6 and later.
|
||||
- Feature flag `add_ai_summary_for_new_mr` [enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/186108) in GitLab 17.11.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -50,7 +51,7 @@ Data usage: The diff of changes between the source branch's head and the target
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Status: Beta
|
||||
|
|
@ -63,6 +64,7 @@ Data usage: The diff of changes between the source branch's head and the target
|
|||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/14825) in GitLab 17.5 as an [experiment](../../../policy/development_stages_support.md#experiment) behind two feature flags named [`ai_review_merge_request`](https://gitlab.com/gitlab-org/gitlab/-/issues/456106) and [`duo_code_review_chat`](https://gitlab.com/gitlab-org/gitlab/-/issues/508632), both disabled by default.
|
||||
- Feature flags [`ai_review_merge_request`](https://gitlab.com/gitlab-org/gitlab/-/issues/456106) and [`duo_code_review_chat`](https://gitlab.com/gitlab-org/gitlab/-/issues/508632) enabled by default on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in 17.10.
|
||||
- [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/516234) to beta in GitLab 17.10.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -127,7 +129,7 @@ To enable `@GitLabDuo` to automatically review merge requests:
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- Status: Experiment
|
||||
|
|
@ -139,6 +141,7 @@ To enable `@GitLabDuo` to automatically review merge requests:
|
|||
|
||||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10466) in GitLab 16.0 as an [experiment](../../../policy/development_stages_support.md#experiment).
|
||||
- Feature flag `summarize_my_code_review` [enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/182448) in GitLab 17.10.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -161,7 +164,7 @@ Data usage: When you use this feature, the following data is sent to the large l
|
|||
|
||||
{{< details >}}
|
||||
|
||||
- Tier: Ultimate
|
||||
- Tier: Premium, Ultimate
|
||||
- Add-on: GitLab Duo Enterprise
|
||||
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
|
||||
- LLM: Anthropic [Claude 3.7 Sonnet](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-7-sonnet)
|
||||
|
|
@ -173,6 +176,7 @@ Data usage: When you use this feature, the following data is sent to the large l
|
|||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/10453) in GitLab 16.2 as an [experiment](../../../policy/development_stages_support.md#experiment) [with a flag](../../../administration/feature_flags.md) named `generate_commit_message_flag`. Disabled by default.
|
||||
- Feature flag `generate_commit_message_flag` [enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/158339) in GitLab 17.2.
|
||||
- Feature flag `generate_commit_message_flag` [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/173262) in GitLab 17.7.
|
||||
- Changed to include Premium in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,12 +41,14 @@ Use GitLab Duo Code Suggestions to write code more efficiently by using generati
|
|||
|
||||
To use Code Suggestions, you need:
|
||||
|
||||
- A Premium or Ultimate subscription with the GitLab Duo Pro or Enterprise add-on.
|
||||
- An assigned seat in your GitLab Duo subscription.
|
||||
- A GitLab Duo Core, Pro, or Enterprise add-on.
|
||||
- A Premium or Ultimate subscription.
|
||||
- If you have GitLab Duo Pro or Enterprise, an assigned seat.
|
||||
- If you have GitLab Duo Core, [IDE features turned on](../../../gitlab_duo/turn_on_off.md#change-gitlab-duo-core-availability).
|
||||
|
||||
{{< alert type="note" >}}
|
||||
|
||||
GitLab Duo requires GitLab 17.2 and later for the best user experience and results. Earlier versions may continue to work, however, the experience may be degraded. You should [upgrade to the latest version of GitLab](../../../../update/_index.md#upgrade-gitlab) for the best experience.
|
||||
GitLab Duo requires GitLab 17.2 or later. For GitLab Duo Core access, and for the best user experience and results, [upgrade to GitLab 18.0 or later](../../../../update/_index.md#upgrade-gitlab). Earlier versions might continue to work, however the experience might be degraded.
|
||||
|
||||
{{< /alert >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@ description: Set up Code Suggestions.
|
|||
title: Set up Code Suggestions
|
||||
---
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- Changed to include GitLab Duo Core in GitLab 18.0.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
You can use Code Suggestions in several different IDEs.
|
||||
To set up Code Suggestions, follow the instructions for your IDE.
|
||||
|
||||
|
|
@ -13,7 +19,10 @@ To set up Code Suggestions, follow the instructions for your IDE.
|
|||
|
||||
To use Code Suggestions, you need:
|
||||
|
||||
- A GitLab Duo add-on subscription and an assigned seat.
|
||||
- A GitLab Duo Core, Pro, or Enterprise add-on.
|
||||
- A Premium or Ultimate subscription.
|
||||
- If you have GitLab Duo Pro or Enterprise, an assigned seat.
|
||||
- If you have GitLab Duo Core, [IDE features turned on](../../../gitlab_duo/turn_on_off.md#change-gitlab-duo-core-availability).
|
||||
- To confirm that Code Suggestions [supports your preferred language](supported_extensions.md#supported-languages-by-ide).
|
||||
Different IDEs support different languages.
|
||||
|
||||
|
|
@ -34,8 +43,8 @@ Follow these steps for your IDE:
|
|||
|
||||
## Turn on Code Suggestions
|
||||
|
||||
If you are assigned a seat, GitLab Duo AI-native features are turned on by default.
|
||||
However, you can confirm that Code Suggestions is turned on.
|
||||
Code Suggestions is turned on [if you meet the prerequisites](#prerequisites).
|
||||
To confirm, open your IDE and verify if Code Suggestions works.
|
||||
|
||||
### VS Code
|
||||
|
||||
|
|
|
|||
|
|
@ -55,14 +55,6 @@ For users without permission to view the project's code, the overview page shows
|
|||
- The wiki homepage.
|
||||
- The list of issues in the project.
|
||||
|
||||
### Access a project by using the project ID
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- Project ID [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/431539) to the Actions menu in GitLab 16.7.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
You can access a project by using its ID instead of its name at `https://gitlab.example.com/projects/<id>`.
|
||||
For example, if in your personal namespace `alex` you have a project `my-project` with the ID `123456`,
|
||||
you can access the project either at `https://gitlab.example.com/alex/my-project` or `https://gitlab.example.com/projects/123456`.
|
||||
|
|
@ -73,9 +65,11 @@ In GitLab 17.5 and later, you can also use `https://gitlab.example.com/-/p/<id>`
|
|||
|
||||
{{< /alert >}}
|
||||
|
||||
## Find the Project ID
|
||||
|
||||
You might also need the project ID if you want to interact with the project using the [GitLab API](../../api/_index.md).
|
||||
|
||||
To copy the project ID:
|
||||
To find the project ID:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your project.
|
||||
1. On the project overview page, in the upper-right corner, select **Actions** ({{< icon name="ellipsis_v" >}}).
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ module ActiveContext
|
|||
start_time = current_time
|
||||
specs_buffer = []
|
||||
scores = {}
|
||||
@failures = []
|
||||
failures = []
|
||||
|
||||
queue.each_queued_items_by_shard(redis, shards: [shard]) do |shard_number, specs|
|
||||
next if specs.empty?
|
||||
|
|
@ -48,12 +48,14 @@ module ActiveContext
|
|||
|
||||
refs = deserialize_all(specs_buffer)
|
||||
|
||||
Reference.preprocess_references(refs).each do |ref|
|
||||
bulk_processor.process(ref)
|
||||
end
|
||||
preprocess_result = Reference.preprocess_references(refs)
|
||||
|
||||
preprocess_result[:successful].each { |ref| bulk_processor.process(ref) }
|
||||
|
||||
failures += preprocess_result[:failed]
|
||||
|
||||
flushing_duration_s = Benchmark.realtime do
|
||||
@failures = bulk_processor.flush
|
||||
failures += bulk_processor.flush
|
||||
end
|
||||
|
||||
logger.info(
|
||||
|
|
@ -63,7 +65,7 @@ module ActiveContext
|
|||
)
|
||||
|
||||
# Re-enqueue any failures so they are retried
|
||||
ActiveContext.track!(@failures, queue: queue)
|
||||
ActiveContext.track!(failures, queue: queue)
|
||||
|
||||
# Remove all the successes
|
||||
scores.each do |set_key, (first_score, last_score, count)|
|
||||
|
|
@ -76,12 +78,12 @@ module ActiveContext
|
|||
'meta.indexing.refs_count' => count,
|
||||
'meta.indexing.first_score' => first_score,
|
||||
'meta.indexing.last_score' => last_score,
|
||||
'meta.indexing.failures_count' => @failures.count,
|
||||
'meta.indexing.failures_count' => failures.count,
|
||||
'meta.indexing.bulk_execution_duration_s' => current_time - start_time
|
||||
)
|
||||
end
|
||||
|
||||
[specs_buffer.count, @failures.count]
|
||||
[specs_buffer.count, failures.count]
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -12,11 +12,58 @@ module ActiveContext
|
|||
end
|
||||
|
||||
def preprocess(refs)
|
||||
result = { successful: [], failed: [] }
|
||||
|
||||
refs_by_class = refs.group_by(&:class)
|
||||
refs_by_class.flat_map do |klass, class_refs|
|
||||
klass.preprocessors.reduce(class_refs) do |processed_refs, preprocessor|
|
||||
preprocessor[:block].call(processed_refs)
|
||||
|
||||
refs_by_class.each do |klass, class_refs|
|
||||
all_failed_refs = []
|
||||
current_successful_refs = class_refs
|
||||
|
||||
klass.preprocessors.each do |preprocessor|
|
||||
next if current_successful_refs.empty?
|
||||
|
||||
processed = preprocessor[:block].call(current_successful_refs)
|
||||
|
||||
all_failed_refs.concat(processed[:failed])
|
||||
current_successful_refs = processed[:successful]
|
||||
end
|
||||
|
||||
result[:successful].concat(current_successful_refs)
|
||||
result[:failed].concat(all_failed_refs)
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
def with_per_ref_handling(refs, error_types: [StandardError])
|
||||
return { successful: [], failed: [] } unless refs.any?
|
||||
|
||||
failed_refs = []
|
||||
successful_refs = []
|
||||
|
||||
refs.each do |ref|
|
||||
yield(ref)
|
||||
successful_refs << ref
|
||||
rescue *error_types => e
|
||||
::ActiveContext::Logger.retryable_exception(e, ref: ref.serialize)
|
||||
failed_refs << ref
|
||||
end
|
||||
|
||||
{ successful: successful_refs, failed: failed_refs }
|
||||
end
|
||||
|
||||
def with_batch_handling(refs, error_types: [StandardError])
|
||||
return { successful: [], failed: [] } unless refs.any?
|
||||
|
||||
begin
|
||||
yield(refs)
|
||||
|
||||
{ successful: refs, failed: [] }
|
||||
rescue *error_types => e
|
||||
::ActiveContext::Logger.retryable_exception(e, refs: refs.map(&:serialize))
|
||||
|
||||
{ successful: [], failed: refs }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -35,6 +35,16 @@ module ActiveContext
|
|||
error(**payload)
|
||||
end
|
||||
|
||||
def retryable_exception(exception, **kwargs)
|
||||
payload = {
|
||||
exception_class: exception.class.name,
|
||||
exception_message: "Retryable Error occurred: #{exception.message}",
|
||||
exception_backtrace: exception.backtrace
|
||||
}.merge(kwargs)
|
||||
|
||||
warn(**payload)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def log(severity, **kwargs)
|
||||
|
|
|
|||
|
|
@ -5,19 +5,27 @@ module ActiveContext
|
|||
module Chunking
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
ChunkingError = Class.new(StandardError)
|
||||
|
||||
class_methods do
|
||||
def chunk(refs:, chunker:, chunk_on:, field:)
|
||||
refs.each do |ref|
|
||||
return { successful: [], failed: [] } if refs.empty?
|
||||
|
||||
result = with_batch_handling(refs) do
|
||||
raise ChunkingError, "Chunker must respond to :chunks method" unless chunker.respond_to?(:chunks)
|
||||
|
||||
refs
|
||||
end
|
||||
|
||||
return result if result[:failed].any?
|
||||
|
||||
with_per_ref_handling(refs) do |ref|
|
||||
chunker.content = ref.send(chunk_on) # rubocop: disable GitlabSecurity/PublicSend -- method is defined elsewhere
|
||||
|
||||
chunks = chunker.chunks
|
||||
|
||||
ref.documents = chunks.map { |chunk| { "#{field}": chunk } }
|
||||
end
|
||||
|
||||
refs
|
||||
rescue StandardError => e
|
||||
ErrorHandler.log_and_raise_error(e)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,30 +18,51 @@ module ActiveContext
|
|||
content_method: nil,
|
||||
remove_content: true
|
||||
)
|
||||
refs.each do |ref|
|
||||
initialize_documents!(ref, content_method, content_field)
|
||||
versions = ref.embedding_versions
|
||||
batch_size = (BATCH_SIZE.to_f / versions.count).ceil
|
||||
with_batch_handling(refs) do
|
||||
docs_to_process = refs.flat_map do |ref|
|
||||
next [] unless ref.embedding_versions.any?
|
||||
|
||||
ref.documents.each_slice(batch_size) do |docs_batch|
|
||||
contents = docs_batch.pluck(content_field)
|
||||
initialize_documents!(ref, content_method, content_field)
|
||||
|
||||
embeddings_by_version = generate_embeddings_for_each_version(versions, contents)
|
||||
|
||||
docs_batch.each_with_index do |doc, index|
|
||||
ref.embedding_versions.each do |version|
|
||||
doc[version[:field]] = embeddings_by_version[version[:field]][index]
|
||||
end
|
||||
doc.delete(content_field) if remove_content
|
||||
# Create a mapping of reference, document, and embedding versions for processing
|
||||
ref.documents.map do |doc|
|
||||
{
|
||||
ref: ref,
|
||||
doc: doc,
|
||||
versions: ref.embedding_versions
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
refs
|
||||
rescue StandardError => e
|
||||
ErrorHandler.log_and_raise_error(e)
|
||||
# Process documents in batches to avoid rate limits
|
||||
docs_to_process.each_slice(BATCH_SIZE) do |batch|
|
||||
# Group documents by their embedding version configuration
|
||||
# This allows processing similar documents together with the same embedding model
|
||||
version_groups = batch.group_by { |item| item[:versions].map { |v| [v[:field], v[:model]] }.sort }
|
||||
|
||||
version_groups.each_value do |items|
|
||||
versions = items.first[:versions]
|
||||
contents = items.map { |item| item[:doc][content_field] }
|
||||
|
||||
embeddings_by_version = generate_embeddings_for_each_version(versions, contents)
|
||||
|
||||
# Apply the generated embeddings back to each document
|
||||
items.each.with_index do |item, index|
|
||||
versions.each do |version|
|
||||
item[:doc][version[:field]] = embeddings_by_version[version[:field]][index]
|
||||
end
|
||||
|
||||
item[:doc].delete(content_field) if remove_content
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
refs
|
||||
end
|
||||
end
|
||||
|
||||
# Initializes the documents for a reference if they don't exist
|
||||
# and populates the content field if a content_method is provided
|
||||
def initialize_documents!(ref, content_method, content_field)
|
||||
return unless content_method && ref.respond_to?(content_method)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,34 +5,38 @@ module ActiveContext
|
|||
module Preload
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
IndexingError = Class.new(StandardError)
|
||||
PreloadError = Class.new(StandardError)
|
||||
|
||||
BATCH_SIZE = 1000
|
||||
|
||||
class_methods do
|
||||
def preload(refs)
|
||||
unless model_klass.respond_to?(:preload_indexing_data)
|
||||
raise IndexingError, "#{self} class should implement :preload_indexing_data method"
|
||||
end
|
||||
return { successful: [], failed: [] } if refs.empty?
|
||||
|
||||
refs.each_slice(BATCH_SIZE) do |batch|
|
||||
preload_batch(batch)
|
||||
end
|
||||
with_batch_handling(refs) do
|
||||
unless model_klass.respond_to?(:preload_indexing_data)
|
||||
raise PreloadError, "#{self} class should implement :preload_indexing_data method"
|
||||
end
|
||||
|
||||
refs
|
||||
rescue StandardError => e
|
||||
::ActiveContext::Logger.exception(e)
|
||||
refs # continue even though refs are not preloaded
|
||||
refs.each_slice(BATCH_SIZE) do |batch|
|
||||
preload_batch(batch)
|
||||
end
|
||||
|
||||
refs
|
||||
end
|
||||
end
|
||||
|
||||
def preload_batch(batch)
|
||||
ids = batch.map(&:identifier)
|
||||
|
||||
records = model_klass.id_in(ids).preload_indexing_data
|
||||
records_by_id = records.index_by(&:id)
|
||||
|
||||
batch.each do |ref|
|
||||
ref.database_record = records_by_id[ref.identifier.to_i]
|
||||
with_per_ref_handling(batch) do |ref|
|
||||
record = records_by_id[ref.identifier.to_i]
|
||||
|
||||
raise PreloadError, "Record not found for identifier: #{ref.identifier}" unless record
|
||||
|
||||
ref.database_record = record
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ RSpec.describe ActiveContext::BulkProcessQueue do
|
|||
let(:redis) { instance_double(Redis) }
|
||||
let(:bulk_processor) { instance_double('ActiveContext::BulkProcessor') }
|
||||
let(:logger) { instance_double('Logger', info: nil, error: nil) }
|
||||
let(:preprocess_result) { { successful: references, failed: [] } }
|
||||
|
||||
subject(:bulk_process_queue) { described_class.new(queue, shard) }
|
||||
|
||||
|
|
@ -29,7 +30,7 @@ RSpec.describe ActiveContext::BulkProcessQueue do
|
|||
allow(bulk_process_queue).to receive(:deserialize_all).and_return(references)
|
||||
allow(redis).to receive(:zremrangebyscore)
|
||||
allow(references).to receive(:group_by).and_return({ reference_class => references })
|
||||
allow(reference_class).to receive(:preprocess_references).and_return(references)
|
||||
allow(reference_class).to receive(:preprocess_references).and_return(preprocess_result)
|
||||
end
|
||||
|
||||
it 'processes specs and flushes the bulk processor' do
|
||||
|
|
@ -51,19 +52,21 @@ RSpec.describe ActiveContext::BulkProcessQueue do
|
|||
|
||||
context 'when there are failures' do
|
||||
let(:failures) { ['failed_spec'] }
|
||||
let(:preprocess_result) { { successful: references, failed: ['preprocess_failed_ref'] } }
|
||||
|
||||
before do
|
||||
allow(bulk_processor).to receive(:flush).and_return(failures)
|
||||
end
|
||||
|
||||
it 're-enqueues failures' do
|
||||
expect(ActiveContext).to receive(:track!).with(failures, queue: queue)
|
||||
combined_failures = ['preprocess_failed_ref'] + failures
|
||||
expect(ActiveContext).to receive(:track!).with(combined_failures, queue: queue)
|
||||
|
||||
bulk_process_queue.process(redis)
|
||||
end
|
||||
|
||||
it 'returns the correct count of processed specs and failures' do
|
||||
expect(bulk_process_queue.process(redis)).to eq([2, 1])
|
||||
expect(bulk_process_queue.process(redis)).to eq([2, 2])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -48,9 +48,14 @@ RSpec.describe ActiveContext::Preprocessors::Chunking do
|
|||
|
||||
result = preprocess_refs
|
||||
|
||||
expect(result).to eq(references)
|
||||
expect(result[0].documents).to eq([{ some_content_field: 'Chunk 1.1' }, { some_content_field: 'Chunk 1.2' }])
|
||||
expect(result[1].documents).to eq([{ some_content_field: 'Chunk 2.1' }])
|
||||
expect(result).to be_a(Hash)
|
||||
expect(result).to have_key(:successful)
|
||||
expect(result).to have_key(:failed)
|
||||
expect(result[:successful]).to eq(references)
|
||||
expect(result[:failed]).to be_empty
|
||||
expect(result[:successful][0].documents).to eq([{ some_content_field: 'Chunk 1.1' },
|
||||
{ some_content_field: 'Chunk 1.2' }])
|
||||
expect(result[:successful][1].documents).to eq([{ some_content_field: 'Chunk 2.1' }])
|
||||
end
|
||||
|
||||
context 'when the chunker raises an error' do
|
||||
|
|
@ -58,13 +63,17 @@ RSpec.describe ActiveContext::Preprocessors::Chunking do
|
|||
|
||||
before do
|
||||
allow(mock_chunker).to receive(:chunks).and_raise(error)
|
||||
allow(ActiveContext::ErrorHandler).to receive(:log_and_raise_error)
|
||||
allow(ActiveContext::Logger).to receive(:retryable_exception)
|
||||
end
|
||||
|
||||
it 'delegates error handling to ErrorHandler' do
|
||||
expect(ActiveContext::ErrorHandler).to receive(:log_and_raise_error).with(error)
|
||||
it 'logs the error and returns failed references' do
|
||||
expect(ActiveContext::Logger).to receive(:retryable_exception).with(error, ref: anything).twice
|
||||
|
||||
preprocess_refs
|
||||
result = preprocess_refs
|
||||
|
||||
expect(result).to be_a(Hash)
|
||||
expect(result[:successful]).to be_empty
|
||||
expect(result[:failed]).to eq(references)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ RSpec.describe ActiveContext::Preprocessors::Embeddings do
|
|||
end
|
||||
end
|
||||
|
||||
let(:preprocessed_result) { ActiveContext::Reference.preprocess_references([reference]) }
|
||||
|
||||
let(:reference) { reference_class.new(collection_id: collection_id, routing: partition, args: object_id) }
|
||||
|
||||
let(:mock_adapter) { double }
|
||||
|
|
@ -39,9 +41,10 @@ RSpec.describe ActiveContext::Preprocessors::Embeddings do
|
|||
|
||||
Array.new(contents.size, vectors)
|
||||
end
|
||||
allow(ActiveContext::Logger).to receive(:retryable_exception)
|
||||
end
|
||||
|
||||
subject(:preprocessed_reference) { ActiveContext::Reference.preprocess_references([reference]).first }
|
||||
subject(:preprocessed_reference) { preprocessed_result[:successful].first }
|
||||
|
||||
describe '.apply_embeddings' do
|
||||
context 'when :content_method is passed and defined' do
|
||||
|
|
@ -297,9 +300,11 @@ RSpec.describe ActiveContext::Preprocessors::Embeddings do
|
|||
end
|
||||
|
||||
it 'raises and logs an error because the embedding content cannot be blank' do
|
||||
expect(ActiveContext::ErrorHandler).to receive(:log_and_raise_error).with(vertex_blank_error).once
|
||||
expect(ActiveContext::Logger).to receive(:retryable_exception).with(vertex_blank_error, refs: anything)
|
||||
|
||||
expect { preprocessed_reference }.not_to change { reference.documents.count }
|
||||
expect { preprocessed_result }.not_to change { reference.documents.count }
|
||||
expect(preprocessed_result[:successful]).to be_empty
|
||||
expect(preprocessed_result[:failed]).to eq([reference])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -338,9 +343,11 @@ RSpec.describe ActiveContext::Preprocessors::Embeddings do
|
|||
end
|
||||
|
||||
it 'raises and logs an error because the embedding content cannot be blank' do
|
||||
expect(ActiveContext::ErrorHandler).to receive(:log_and_raise_error).with(vertex_blank_error).once
|
||||
expect(ActiveContext::Logger).to receive(:retryable_exception).with(vertex_blank_error, refs: anything)
|
||||
|
||||
expect { preprocessed_reference }.not_to change { reference.documents.count }
|
||||
expect { preprocessed_result }.not_to change { reference.documents.count }
|
||||
expect(preprocessed_result[:successful]).to be_empty
|
||||
expect(preprocessed_result[:failed]).to eq([reference])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -60,14 +60,11 @@ RSpec.describe ActiveContext::Preprocessors::Preload do
|
|||
end
|
||||
|
||||
context 'when the model klass does not implement :preload_indexing_data' do
|
||||
it 'logs and does not raise an error' do
|
||||
expect(::ActiveContext::Logger).to receive(:exception).with(ActiveContext::Preprocessors::Preload::IndexingError)
|
||||
it 'returns all refs as failed' do
|
||||
expect(::ActiveContext::Logger).to receive(:retryable_exception).with(
|
||||
ActiveContext::Preprocessors::Preload::PreloadError, refs: anything)
|
||||
|
||||
expect { preprocess_refs }.not_to raise_error
|
||||
end
|
||||
|
||||
it 'returns references' do
|
||||
expect(preprocess_refs).to eq([reference_1, reference_2])
|
||||
expect(preprocess_refs[:failed]).to match_array([reference_1, reference_2])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -104,7 +104,9 @@ module Gitlab
|
|||
locks = connection.execute(<<-SQL)
|
||||
SELECT DISTINCT relation::regclass AS table_name
|
||||
FROM pg_locks
|
||||
JOIN pg_class ON pg_locks.relation = pg_class.oid
|
||||
WHERE relation IS NOT NULL
|
||||
AND pg_class.relkind IN ('r', 'p') -- Only regular/partitioned tables
|
||||
AND pid = pg_backend_pid()
|
||||
AND relation::regclass::text NOT LIKE 'pg_%'
|
||||
AND relation::regclass::text NOT LIKE 'information_schema.%'
|
||||
|
|
|
|||
|
|
@ -44,30 +44,30 @@ module Gitlab
|
|||
TRANSLATION_LEVELS = {
|
||||
'bg' => 0,
|
||||
'cs_CZ' => 0,
|
||||
'da_DK' => 18,
|
||||
'de' => 93,
|
||||
'da_DK' => 17,
|
||||
'de' => 92,
|
||||
'en' => 100,
|
||||
'eo' => 0,
|
||||
'es' => 44,
|
||||
'fil_PH' => 0,
|
||||
'fr' => 98,
|
||||
'fr' => 97,
|
||||
'gl_ES' => 0,
|
||||
'id_ID' => 0,
|
||||
'it' => 86,
|
||||
'ja' => 93,
|
||||
'it' => 85,
|
||||
'ja' => 94,
|
||||
'ko' => 99,
|
||||
'nb_NO' => 14,
|
||||
'nl_NL' => 0,
|
||||
'pl_PL' => 1,
|
||||
'pt_BR' => 94,
|
||||
'ro_RO' => 45,
|
||||
'ru' => 69,
|
||||
'ro_RO' => 44,
|
||||
'ru' => 72,
|
||||
'si_LK' => 8,
|
||||
'tr_TR' => 5,
|
||||
'uk' => 34,
|
||||
'zh_CN' => 90,
|
||||
'uk' => 33,
|
||||
'zh_CN' => 89,
|
||||
'zh_HK' => 0,
|
||||
'zh_TW' => 76
|
||||
'zh_TW' => 74
|
||||
}.freeze
|
||||
private_constant :TRANSLATION_LEVELS
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ module Gitlab
|
|||
|
||||
user.skip_confirmation_notification!
|
||||
user.assign_personal_namespace(namespace.organization)
|
||||
user.build_placeholder_user_detail(namespace: namespace, organization: namespace.organization)
|
||||
user.save!
|
||||
|
||||
log_placeholder_user_creation(user)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ module Gitlab
|
|||
started_time = get_time
|
||||
base_payload = parse_job(job)
|
||||
|
||||
ActiveRecord::LogSubscriber.reset_runtime
|
||||
ActiveRecord::RuntimeRegistry.reset
|
||||
|
||||
@logger.info log_job_start(job, base_payload)
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ module Gitlab
|
|||
|
||||
Gitlab::ExceptionLogFormatter.format!(job_exception, payload) if job_exception
|
||||
|
||||
db_duration = ActiveRecord::LogSubscriber.runtime
|
||||
db_duration = ActiveRecord::RuntimeRegistry.sql_runtime
|
||||
payload['db_duration_s'] = Gitlab::Utils.ms_to_round_sec(db_duration)
|
||||
|
||||
job_urgency = payload['class'].safe_constantize&.get_urgency.to_s
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ module Gitlab
|
|||
@metrics[:sidekiq_jobs_completion_seconds_sum].increment(labels, monotonic_time)
|
||||
@metrics[:sidekiq_jobs_completion_count].increment(labels, 1)
|
||||
@metrics[:sidekiq_jobs_cpu_seconds_sum].increment(labels, job_thread_cputime)
|
||||
@metrics[:sidekiq_jobs_db_seconds_sum].increment(labels, ActiveRecord::LogSubscriber.runtime / 1000)
|
||||
@metrics[:sidekiq_jobs_db_seconds_sum].increment(labels, ActiveRecord::RuntimeRegistry.sql_runtime / 1000)
|
||||
@metrics[:sidekiq_jobs_gitaly_seconds_sum].increment(labels, get_gitaly_time(instrumentation))
|
||||
@metrics[:sidekiq_redis_requests_duration_seconds_sum].increment(labels, get_redis_time(instrumentation))
|
||||
@metrics[:sidekiq_elasticsearch_requests_duration_seconds_sum].increment(labels, get_elasticsearch_time(instrumentation))
|
||||
|
|
@ -201,7 +201,7 @@ module Gitlab
|
|||
|
||||
@metrics[:sidekiq_jobs_completion_seconds]&.observe(labels, monotonic_time)
|
||||
|
||||
@metrics[:sidekiq_jobs_db_seconds]&.observe(labels, ActiveRecord::LogSubscriber.runtime / 1000)
|
||||
@metrics[:sidekiq_jobs_db_seconds]&.observe(labels, ActiveRecord::RuntimeRegistry.sql_runtime / 1000)
|
||||
@metrics[:sidekiq_jobs_gitaly_seconds]&.observe(labels, get_gitaly_time(instrumentation))
|
||||
@metrics[:sidekiq_redis_requests_duration_seconds]&.observe(labels, get_redis_time(instrumentation))
|
||||
@metrics[:sidekiq_elasticsearch_requests_duration_seconds]&.observe(labels, get_elasticsearch_time(instrumentation))
|
||||
|
|
|
|||
|
|
@ -4,24 +4,30 @@ module Gitlab
|
|||
class StringPlaceholderReplacer
|
||||
# This method accepts the following paras
|
||||
# - string: the string to be analyzed
|
||||
# - placeholder_regex: i.e. /%{project_path|project_id|default_branch|commit_sha}/
|
||||
# - placeholder_regex: i.e. /(project_path|project_id|default_branch|commit_sha)/
|
||||
# - limit: limits the number of replacements in the string. Set to 0 for unlimited
|
||||
# - block: this block will be called with each placeholder found in the string using
|
||||
# the placeholder regex. If the result of the block is nil, the original
|
||||
# placeholder will be returned.
|
||||
# the placeholder regex. If the result of the block is nil, the original
|
||||
# placeholder will be returned.
|
||||
|
||||
def self.replace_string_placeholders(string, placeholder_regex = nil, &block)
|
||||
def self.replace_string_placeholders(string, placeholder_regex = nil, limit: 0, &block)
|
||||
return string if string.blank? || placeholder_regex.blank? || !block
|
||||
|
||||
replace_placeholders(string, placeholder_regex, &block)
|
||||
replace_placeholders(string, placeholder_regex, limit: limit, &block)
|
||||
end
|
||||
|
||||
def self.placeholder_full_regex(placeholder_regex)
|
||||
/%(\{|%7B)(#{placeholder_regex})(\}|%7D)/
|
||||
end
|
||||
|
||||
class << self
|
||||
private
|
||||
|
||||
# If the result of the block is nil, then the placeholder is returned
|
||||
def replace_placeholders(string, placeholder_regex, &block)
|
||||
string.gsub(/%{(#{placeholder_regex})}/) do |arg|
|
||||
yield($~[1]) || arg
|
||||
def replace_placeholders(string, placeholder_regex, limit: 0, &block)
|
||||
Gitlab::Utils::Gsub
|
||||
.gsub_with_limit(string, placeholder_full_regex(placeholder_regex), limit: limit) do |match_data|
|
||||
yield(match_data[2]) || match_data[0]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
1676
locale/bg/gitlab.po
1676
locale/bg/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2226
locale/de/gitlab.po
2226
locale/de/gitlab.po
File diff suppressed because it is too large
Load Diff
1676
locale/eo/gitlab.po
1676
locale/eo/gitlab.po
File diff suppressed because it is too large
Load Diff
1874
locale/es/gitlab.po
1874
locale/es/gitlab.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1932
locale/fr/gitlab.po
1932
locale/fr/gitlab.po
File diff suppressed because it is too large
Load Diff
|
|
@ -49861,6 +49861,9 @@ msgstr ""
|
|||
msgid "RapidDiffs|Failed to expand lines, please try again."
|
||||
msgstr ""
|
||||
|
||||
msgid "RapidDiffs|File moved from %{old} to %{new}"
|
||||
msgstr ""
|
||||
|
||||
msgid "RapidDiffs|Line %d"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -49882,6 +49885,9 @@ msgstr ""
|
|||
msgid "RapidDiffs|Show lines before"
|
||||
msgstr ""
|
||||
|
||||
msgid "RapidDiffs|Show options"
|
||||
msgstr ""
|
||||
|
||||
msgid "Rate Limits"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue