Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-07-02 18:21:00 +00:00
parent 5ff17740d4
commit 33e1372939
176 changed files with 1581 additions and 762 deletions

View File

@ -145,7 +145,6 @@ Dangerfile
^[End-to-end] @gl-quality
/qa/
/gems/gitlab-cng/
^[LDAP] @dblessing @mkozono
/ee/lib/ee/gitlab/auth/ldap/
@ -1307,11 +1306,11 @@ lib/gitlab/checks/**
# opportunity to refine specific rules defined in this section.
# Note that frontend, CI templates and other concerns should be kept within
# the same section.
/app/**/ci/
/ee/app/**/ci/
/app/**/ci/*.rb
/ee/app/**/ci/*.rb
/lib/**/ci/
/ee/lib/**/ci/
/ee/app/**/merge_trains/
/ee/app/**/merge_trains/*.rb
/app/controllers/admin/jobs_controller.rb
/app/controllers/admin/runner_projects_controller.rb
/app/controllers/admin/runners_controller.rb
@ -1402,6 +1401,16 @@ lib/gitlab/checks/**
/lib/gitlab/ci/templates/Jobs/SAST.*.yml @gitlab-org/secure/static-analysis
/lib/gitlab/ci/templates/Jobs/Secret-Detection.*.yml @gitlab-org/secure/static-analysis
# Verify Frontend, optional approvals
^[Verify frontend] @gitlab-org/ci-cd/verify/frontend
/**/javascripts/ci/
/**/javascripts/token_access/
/**/javascripts/admin/application_settings/runner_token_expiration/
/**/javascripts/editor/schema/ci.json
/app/**/ci/*.haml
/ee/app/**/ci/*.haml
/ee/app/**/merge_trains/*.haml
## Verify:Runner Fleet Backend
^[Runner Fleet Backend] @gitlab-org/ci-cd/runner-fleet-team/backend-approvers
/app/controllers/admin/runner*.rb

View File

@ -44,6 +44,3 @@ include:
- local: .gitlab/ci/templates/gem.gitlab-ci.yml
inputs:
gem_name: "gitlab-housekeeper"
- local: .gitlab/ci/templates/gem.gitlab-ci.yml
inputs:
gem_name: "gitlab-cng"

View File

@ -10,7 +10,23 @@
SETUP_DB: "false"
before_script:
- !reference [.default-before_script, before_script]
- cd qa && bundle install
- cd ${WORKING_DIR:-qa} && bundle install
.qa-ruby-cng-gems-cache: &qa-ruby-cng-gems-cache
key:
prefix: "qa-ruby-gems-${BUILD_OS}-${OS_VERSION}-ruby-${RUBY_VERSION}"
files:
- qa/gems/cng-gitlab/Gemfile.lock
paths:
- qa/gems/cng-gitlab/vendor/bundle
policy: pull
.qa-cng-job-base:
extends:
- .qa-job-base
variables:
WORKING_DIR: qa/gems/gitlab-cng
cache: *qa-ruby-cng-gems-cache
.e2e-trigger-base:
extends: .production # this makes sure GITLAB_ALLOW_SEPARATE_CI_DATABASE is passed to the child pipeline
@ -49,12 +65,9 @@
- artifact: $DYNAMIC_PIPELINE_YML
job: e2e-test-pipeline-generate
qa:internal:
extends:
- .qa-job-base
- .qa:rules:internal
script:
- bundle exec rspec -O .rspec_internal
# ==========================================
# /qa caching
# ==========================================
cache-qa-gems:
extends:
@ -65,6 +78,14 @@ cache-qa-gems:
script:
- echo "Cache has been updated and ready to be uploaded."
cache-cng-gems:
extends:
- .qa-cng-job-base
- cache-qa-gems
cache:
<<: *qa-ruby-cng-gems-cache
policy: pull-push
# E2E runners have separate infra setup and different cache bucket
cache-qa-gems-e2e-runners:
extends:
@ -73,6 +94,56 @@ cache-qa-gems-e2e-runners:
tags:
- e2e
# ==========================================
# /qa linting and unit testing
# ==========================================
qa:metadata-lint:
extends:
- .qa-job-base
- .qa:rules:metadata-lint
variables:
QA_EXPORT_TEST_METRICS: "false"
# Disable warnings in browserslist which can break on backports
# https://github.com/browserslist/browserslist/blob/a287ec6/node.js#L367-L384
BROWSERSLIST_IGNORE_OLD_DATA: "true"
script:
- run_timed_command "bundle exec bin/qa Test::Instance::All http://localhost:3000 --test-metadata-only"
- cd ..
- run_timed_command "./scripts/qa/testcases-check qa/tmp/test-metadata.json"
- run_timed_command "./scripts/qa/quarantine-types-check qa/tmp/test-metadata.json"
artifacts:
expire_in: 31d
when: always
paths:
- qa/tmp/
qa:cng-lint:
extends:
- .qa-cng-job-base
- .qa:rules:gitlab-cng
stage: lint
script:
- bundle exec rubocop
qa:rspec-cng:
extends:
- .qa-cng-job-base
- .qa:rules:gitlab-cng
script:
- bundle exec rspec --force-color
qa:rspec-internal:
extends:
- .qa-job-base
- .qa:rules:internal
script:
- bundle exec rspec -O .rspec_internal
# ==========================================
# E2E testing
# ==========================================
# If a rename is required for this job, please notify the Delivery team (`@gitlab-org/delivery`)
e2e:package-and-test-ee:
extends:

View File

@ -684,7 +684,7 @@
- "ee/{lib/,spec/}tasks/gitlab/custom_roles/*"
.cng-orchestrator-patterns: &cng-orchestrator-patterns
- gems/gitlab-cng/**/*.rb
- qa/gems/gitlab-cng/**/*.rb
##################
# Conditions set #
@ -1522,6 +1522,18 @@
when: never
- !reference [.qa:rules:update-gem-cache, rules]
.qa:rules:metadata-lint:
rules:
- <<: *if-default-refs
changes: *qa-patterns
- <<: *if-default-refs
changes: *ci-qa-patterns
.qa:rules:gitlab-cng:
rules:
- <<: *if-default-refs
changes: *cng-orchestrator-patterns
.qa:rules:code-merge-request:
rules:
- <<: *if-merge-request
@ -2444,13 +2456,6 @@
- <<: *if-default-refs
changes: *code-backstage-qa-patterns
.static-analysis:rules:qa:metadata-lint:
rules:
- <<: *if-default-refs
changes: *qa-patterns
- <<: *if-default-refs
changes: [".gitlab/ci/static-analysis.gitlab-ci.yml"]
.static-analysis:rules:haml-lint:
rules:
- <<: *if-default-refs

View File

@ -124,32 +124,6 @@ rubocop:
fi
fi
qa:metadata-lint:
extends:
- .static-analysis-base
- .static-analysis:rules:qa:metadata-lint
before_script:
- !reference [.default-before_script, before_script]
- cd qa/
- bundle_install_script
script:
- run_timed_command "bundle exec bin/qa Test::Instance::All http://localhost:3000 --test-metadata-only"
- cd ..
- run_timed_command "./scripts/qa/testcases-check qa/tmp/test-metadata.json"
- run_timed_command "./scripts/qa/quarantine-types-check qa/tmp/test-metadata.json"
variables:
USE_BUNDLE_INSTALL: "false"
SETUP_DB: "false"
QA_EXPORT_TEST_METRICS: "false"
# Disable warnings in browserslist which can break on backports
# https://github.com/browserslist/browserslist/blob/a287ec6/node.js#L367-L384
BROWSERSLIST_IGNORE_OLD_DATA: "true"
artifacts:
expire_in: 31d
when: always
paths:
- qa/tmp/
feature-flags-usage:
extends:
- .static-analysis-base

View File

@ -32,6 +32,7 @@ AllCops:
TargetRailsVersion: 7.0
Exclude:
- 'gems/**/*'
- 'qa/gems/**/*'
- 'vendor/**/*'
- 'node_modules/**/*'
- 'db/fixtures/**/*'

View File

@ -373,7 +373,7 @@ gem 'pg_query', '~> 5.1.0', feature_category: :database
gem 'gitlab-schema-validation', path: 'gems/gitlab-schema-validation' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'gitlab-http', path: 'gems/gitlab-http' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'premailer-rails', '~> 1.10.3' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'premailer-rails', '~> 1.12.0', feature_category: :notifications
gem 'gitlab-labkit', '~> 0.36.0', feature_category: :shared
gem 'thrift', '>= 0.16.0' # rubocop:todo Gemfile/MissingFeatureCategory

View File

@ -225,7 +225,7 @@
{"name":"gitlab-mail_room","version":"0.0.25","platform":"ruby","checksum":"223ce7c3c0797b6015eaa37147884e6ddc7be9a7ee90a424358c96bc18613b1a"},
{"name":"gitlab-markup","version":"1.9.0","platform":"ruby","checksum":"7eda045a08ec2d110084252fa13a8c9eac8bdac0e302035ca7db4b82bcbd7ed4"},
{"name":"gitlab-net-dns","version":"0.9.2","platform":"ruby","checksum":"f726d978479d43810819f12a45c0906d775a07e34df111bbe693fffbbef3059d"},
{"name":"gitlab-sdk","version":"0.3.0","platform":"ruby","checksum":"22260f148451155c2e7bdfa1ea9f3e50061a7c31700cb80f8859713560b88903"},
{"name":"gitlab-sdk","version":"0.3.1","platform":"ruby","checksum":"48ba49084f4ab92df7c7ef9f347020d9dfdf6ed9c1e782b67264e98ffe6ea710"},
{"name":"gitlab-styles","version":"12.0.1","platform":"ruby","checksum":"d8a302b0ab0e1f18e2d11501760f1b85c5e70b5e5ca628828a0786c7984ed133"},
{"name":"gitlab_chronic_duration","version":"0.12.0","platform":"ruby","checksum":"0d766944d415b5c831f176871ee8625783fc0c5bfbef2d79a3a616f207ffc16d"},
{"name":"gitlab_omniauth-ldap","version":"2.2.0","platform":"ruby","checksum":"bb4d20acb3b123ed654a8f6a47d3fac673ece7ed0b6992edb92dca14bad2838c"},
@ -492,8 +492,8 @@
{"name":"pg_query","version":"5.1.0","platform":"ruby","checksum":"b7f7f47c864f08ccbed46a8244906fb6ee77ee344fd27250717963928c93145d"},
{"name":"plist","version":"3.7.0","platform":"ruby","checksum":"703ca90a7cb00e8263edd03da2266627f6741d280c910abbbac07c95ffb2f073"},
{"name":"png_quantizator","version":"0.2.1","platform":"ruby","checksum":"6023d4d064125c3a7e02929c95b7320ed6ac0d7341f9e8de0c9ea6576ef3106b"},
{"name":"premailer","version":"1.16.0","platform":"ruby","checksum":"03e4402c448e6bae13fb5f6301a8bde4f3508e1bff90ae7c0972c7be94694786"},
{"name":"premailer-rails","version":"1.10.3","platform":"ruby","checksum":"7cdcb97027866f7a81c490c6d15ada7f39666b5f6375f0821b7e97e0483b112f"},
{"name":"premailer","version":"1.23.0","platform":"ruby","checksum":"f0d7f6ba299559c96ddf982aa5263f85e5617c86437c8d8ffff120813b2d7efb"},
{"name":"premailer-rails","version":"1.12.0","platform":"ruby","checksum":"c13815d161b9bc7f7d3d81396b0bb0a61a90fa9bd89931548bf4e537c7710400"},
{"name":"prime","version":"0.1.2","platform":"ruby","checksum":"d4e956cadfaf04de036dc7dc74f95bf6a285a62cc509b28b7a66b245d19fe3a4"},
{"name":"prism","version":"0.29.0","platform":"ruby","checksum":"a52c843a0308a7f5faf28e9abd36e3284280fc7c34acba05d858cb009ba7475f"},
{"name":"proc_to_ast","version":"0.1.0","platform":"ruby","checksum":"92a73fa66e2250a83f8589f818b0751bcf227c68f85916202df7af85082f8691"},

View File

@ -723,7 +723,7 @@ GEM
redis-namespace (>= 1.8.2)
gitlab-markup (1.9.0)
gitlab-net-dns (0.9.2)
gitlab-sdk (0.3.0)
gitlab-sdk (0.3.1)
activesupport (>= 5.2.0)
rake (~> 13.0)
snowplow-tracker (~> 0.8.0)
@ -1369,12 +1369,13 @@ GEM
google-protobuf (>= 3.22.3)
plist (3.7.0)
png_quantizator (0.2.1)
premailer (1.16.0)
premailer (1.23.0)
addressable
css_parser (>= 1.6.0)
css_parser (>= 1.12.0)
htmlentities (>= 4.0.0)
premailer-rails (1.10.3)
premailer-rails (1.12.0)
actionmailer (>= 3)
net-smtp
premailer (~> 1.7, >= 1.7.9)
prime (0.1.2)
forwardable
@ -2159,7 +2160,7 @@ DEPENDENCIES
pg (~> 1.5.6)
pg_query (~> 5.1.0)
png_quantizator (~> 0.2.1)
premailer-rails (~> 1.10.3)
premailer-rails (~> 1.12.0)
prometheus-client-mmap (~> 1.1, >= 1.1.1)
pry-byebug
pry-rails (~> 0.3.9)

View File

@ -149,7 +149,10 @@ export default {
},
methods: {
addAnnotationToMap({ uid, source, target }) {
this.$set(this.annotationsMap, uid, { source, target });
this.annotationsMap = {
...this.annotationsMap,
[uid]: { source, target },
};
},
processGraphData(data) {
let parsed;

View File

@ -29,13 +29,13 @@ export const TARGET_NAMESPACE_FIELD = 'targetNamespace';
export const ROOT_NAMESPACE = { fullPath: '', id: null };
const PLACEHOLDER_STATUS_PENDING_ASSIGNMENT = 'pending_assignment';
export const PLACEHOLDER_STATUS_AWAITING_APPROVAL = 'awaiting_approval';
const PLACEHOLDER_STATUS_REJECTED = 'rejected';
export const PLACEHOLDER_STATUS_REASSIGNING = 'reassignment_in_progress';
const PLACEHOLDER_STATUS_FAILED = 'failed';
export const PLACEHOLDER_STATUS_KEPT_AS_PLACEHOLDER = 'keep_as_placeholder';
export const PLACEHOLDER_STATUS_COMPLETED = 'completed';
const PLACEHOLDER_STATUS_PENDING_ASSIGNMENT = 'PENDING_ASSIGNMENT';
export const PLACEHOLDER_STATUS_AWAITING_APPROVAL = 'AWAITING_APPROVAL';
const PLACEHOLDER_STATUS_REJECTED = 'REJECTED';
export const PLACEHOLDER_STATUS_REASSIGNING = 'REASSIGNMENT_IN_PROGRESS';
const PLACEHOLDER_STATUS_FAILED = 'FAILED';
export const PLACEHOLDER_STATUS_KEPT_AS_PLACEHOLDER = 'KEEP_AS_PLACEHOLDER';
export const PLACEHOLDER_STATUS_COMPLETED = 'COMPLETED';
export const placeholderUserBadges = {
[PLACEHOLDER_STATUS_PENDING_ASSIGNMENT]: {

View File

@ -1,7 +1,13 @@
<script>
import { GlBadge, GlTab, GlTabs } from '@gitlab/ui';
import { createAlert } from '~/alert';
import { s__ } from '~/locale';
import importSourceUsersQuery from '../../placeholders/graphql/queries/import_source_users.query.graphql';
import PlaceholdersTable from './placeholders_table.vue';
const DEFAULT_PAGE_SIZE = 20;
export default {
name: 'PlaceholdersTabApp',
components: {
@ -10,18 +16,69 @@ export default {
GlTabs,
PlaceholdersTable,
},
inject: ['group'],
data() {
return {
selectedTabIndex: 0,
cursor: {
before: null,
after: null,
},
};
},
apollo: {
sourceUsers: {
query: importSourceUsersQuery,
variables() {
return {
fullPath: this.group.path,
...this.cursor,
[this.cursor.before ? 'last' : 'first']: DEFAULT_PAGE_SIZE,
};
},
update(data) {
return data.namespace?.importSourceUsers;
},
error() {
createAlert({
message: s__('UserMapping|There was a problem fetching placeholder users.'),
});
},
},
},
computed: {
tabCount() {
// WIP: https://gitlab.com/groups/gitlab-org/-/epics/12378
return 0;
},
isLoading() {
return Boolean(this.$apollo.queries.sourceUsers.loading);
},
nodes() {
return this.sourceUsers?.nodes || [];
},
pageInfo() {
return this.sourceUsers?.pageInfo || {};
},
},
methods: {
onPrevPage() {
this.cursor = {
before: this.sourceUsers.pageInfo.startCursor,
after: null,
};
},
onNextPage() {
this.cursor = {
after: this.sourceUsers.pageInfo.endCursor,
before: null,
};
},
},
};
</script>
@ -34,7 +91,14 @@ export default {
<gl-badge class="gl-tab-counter-badge">{{ tabCount }}</gl-badge>
</template>
<placeholders-table key="unassigned" />
<placeholders-table
key="unassigned"
:items="nodes"
:page-info="pageInfo"
:is-loading="isLoading"
@prev="onPrevPage"
@next="onNextPage"
/>
</gl-tab>
<gl-tab>
@ -43,7 +107,15 @@ export default {
<gl-badge class="gl-tab-counter-badge">{{ tabCount }}</gl-badge>
</template>
<placeholders-table key="assigned" reassigned />
<placeholders-table
key="assigned"
reassigned
:items="nodes"
:page-info="pageInfo"
:is-loading="isLoading"
@prev="onPrevPage"
@next="onNextPage"
/>
</gl-tab>
</gl-tabs>
</template>

View File

@ -1,5 +1,12 @@
<script>
import { GlAvatarLabeled, GlBadge, GlTableLite, GlTooltipDirective } from '@gitlab/ui';
import {
GlAvatarLabeled,
GlBadge,
GlKeysetPagination,
GlLoadingIcon,
GlTable,
GlTooltipDirective,
} from '@gitlab/ui';
import { s__ } from '~/locale';
import {
@ -14,18 +21,29 @@ export default {
components: {
GlAvatarLabeled,
GlBadge,
GlTableLite,
GlKeysetPagination,
GlLoadingIcon,
GlTable,
PlaceholderActions,
},
directives: {
GlTooltip: GlTooltipDirective,
},
props: {
isLoading: {
type: Boolean,
required: true,
},
items: {
type: Array,
required: false,
default: () => [],
},
pageInfo: {
type: Object,
required: false,
default: () => ({}),
},
reassigned: {
type: Boolean,
required: false,
@ -83,44 +101,62 @@ export default {
</script>
<template>
<gl-table-lite :items="items" :fields="fields">
<template #cell(user)="{ item }">
<gl-avatar-labeled
:size="32"
:src="item.avatar_url"
:label="item.name"
:sub-label="item.username"
/>
</template>
<div>
<gl-table :items="items" :fields="fields" :busy="isLoading">
<template #table-busy>
<gl-loading-icon size="lg" class="gl-my-5" />
</template>
<template #cell(source)="{ item }">
<div>{{ item.source_hostname }}</div>
<div class="gl-mt-2">{{ item.source_username }}</div>
</template>
<template #cell(user)="{ item }">
<gl-avatar-labeled
v-if="item.placeholderUser"
:size="32"
:src="item.placeholderUser.avatarUrl"
:label="item.placeholderUser.name"
:sub-label="`@${item.placeholderUser.username}`"
/>
</template>
<template #cell(status)="{ item }">
<gl-badge
v-gl-tooltip="statusBadge(item).tooltip"
:variant="statusBadge(item).variant"
tabindex="0"
>{{ statusBadge(item).text }}</gl-badge
>
</template>
<template #cell(source)="{ item }">
<div>{{ item.sourceHostname }}</div>
<div class="gl-mt-2">{{ item.sourceUsername }}</div>
</template>
<template #cell(actions)="{ item }">
<gl-avatar-labeled
v-if="isReassignedItem(item)"
:size="32"
:src="item.reassignToUser.avatar_url"
:label="item.reassignToUser.name"
:sub-label="item.reassignToUser.username"
<template #cell(status)="{ item }">
<gl-badge
v-if="statusBadge(item)"
v-gl-tooltip="statusBadge(item).tooltip"
:variant="statusBadge(item).variant"
tabindex="0"
>{{ statusBadge(item).text }}</gl-badge
>
</template>
<template #cell(actions)="{ item }">
<gl-avatar-labeled
v-if="isReassignedItem(item) && item.reassignToUser"
:size="32"
:src="item.reassignToUser.avatarUrl"
:label="item.reassignToUser.name"
:sub-label="`@${item.reassignToUser.username}`"
/>
<placeholder-actions
v-else
:placeholder="item"
@confirm="onConfirm(item, $event)"
@cancel="onCancel(item)"
/>
</template>
</gl-table>
<div v-if="pageInfo.hasNextPage || pageInfo.hasPreviousPage" class="gl-text-center gl-mt-5">
<gl-keyset-pagination
v-bind="pageInfo"
:prev-text="__('Prev')"
:next-text="__('Next')"
@prev="$emit('prev')"
@next="$emit('next')"
/>
<placeholder-actions
v-else
:placeholder="item"
@confirm="onConfirm(item, $event)"
@cancel="onCancel(item)"
/>
</template>
</gl-table-lite>
</div>
</div>
</template>

View File

@ -0,0 +1,15 @@
#import "~/graphql_shared/fragments/user.fragment.graphql"
fragment ImportSourceUser on ImportSourceUser {
id
sourceUsername
sourceName
sourceHostname
status
placeholderUser {
...User
}
reassignToUser {
...User
}
}

View File

@ -0,0 +1,16 @@
#import "~/graphql_shared/fragments/page_info.fragment.graphql"
#import "../fragments/import_source_user.fragment.graphql"
query importSourceUsers($fullPath: ID!, $before: String, $after: String, $first: Int, $last: Int) {
namespace(fullPath: $fullPath) {
id
importSourceUsers(before: $before, after: $after, first: $first, last: $last) {
nodes {
...ImportSourceUser
}
pageInfo {
...PageInfo
}
}
}
}

View File

@ -142,7 +142,7 @@ export default {
data-track-action="click_button"
data-testid="comment-button"
>
<gl-button variant="confirm" :disabled="disabled" @click="handleClick">
<gl-button type="submit" variant="confirm" :disabled="disabled" @click="handleClick">
{{ commentButtonTitle }}
</gl-button>
<gl-collapsible-listbox

View File

@ -163,9 +163,6 @@ export default {
};
},
computed: {
showAreTicketsConfidentialByDefault() {
return this.glFeatures.serviceDeskTicketsConfidentiality;
},
showAddExternalParticipantsFromCC() {
return this.glFeatures.issueEmailParticipants;
},
@ -382,10 +379,7 @@ export default {
</template>
</gl-form-group>
<div
v-if="showAreTicketsConfidentialByDefault"
data-testid="service-desk-are-tickets-confidential-by-default-wrapper"
>
<div data-testid="service-desk-are-tickets-confidential-by-default-wrapper">
<h5>{{ $options.i18n.headlines.ticketVisibility }}</h5>
<gl-form-checkbox

View File

@ -40,7 +40,6 @@ class ProjectsController < Projects::ApplicationController
push_frontend_feature_flag(:remove_monitor_metrics, @project)
push_frontend_feature_flag(:explain_code_chat, current_user)
push_frontend_feature_flag(:issue_email_participants, @project)
push_frontend_feature_flag(:service_desk_tickets_confidentiality, @project)
push_frontend_feature_flag(:edit_branch_rules, @project)
# TODO: We need to remove the FF eventually when we rollout page_specific_styles
push_frontend_feature_flag(:page_specific_styles, current_user)

View File

@ -42,7 +42,7 @@ module PackagesHelper
end
def track_package_event(event_name, scope, **args)
::Packages::CreateEventService.new(nil, current_user, event_name: event_name, scope: scope).execute
::Packages::CreateEventService.new(args[:project], current_user, event_name: event_name, scope: scope).execute
category = args.delete(:category) || self.class.name
::Gitlab::Tracking.event(category, event_name.to_s, **args)
end
@ -80,6 +80,28 @@ module PackagesHelper
Ability.allowed?(current_user, :destroy_package, group)
end
def group_packages_template_data(group)
packages_template_data.merge({
can_delete_packages: can_delete_group_packages?(group).to_s,
endpoint: group_packages_path(group),
full_path: group.full_path,
group_list_url: group_packages_path(group),
page_type: 'groups',
settings_path: show_group_package_registry_settings(group) ? group_settings_packages_and_registries_path(group) : ''
})
end
def project_packages_template_data(project)
packages_template_data.merge({
can_delete_packages: can_delete_packages?(project).to_s,
endpoint: project_packages_path(project),
full_path: project.full_path,
page_type: 'projects',
project_list_url: project_packages_path(project),
settings_path: show_package_registry_settings(project) ? project_settings_packages_and_registries_path(project) : ''
})
end
def cleanup_settings_data(project)
{
project_id: project.id,
@ -105,4 +127,15 @@ module PackagesHelper
cleanup_settings_path: cleanup_image_tags_project_settings_packages_and_registries_path(project)
)
end
private
def packages_template_data
{
empty_list_illustration: image_path('illustrations/empty-state/empty-package-md.svg'),
group_list_url: '',
npm_instance_url: package_registry_instance_url(:npm),
project_list_url: ''
}
end
end

View File

@ -66,11 +66,15 @@ module Notes
!to_discussion.individual_note?
end
def discussion_class(noteable = nil)
def discussion_class(other_noteable = nil)
return IndividualNoteDiscussion unless other_noteable
sync_object = other_noteable.try(:sync_object)
# When commit notes are rendered on an MR's Discussion page, they are
# displayed in one discussion instead of individually.
# See also `#discussion_id` and `Discussion.override_discussion_id`.
if noteable && noteable != self.noteable
if !sync_object.present? && !current_noteable?(other_noteable)
OutOfContextDiscussion
else
IndividualNoteDiscussion
@ -93,5 +97,11 @@ module Notes
false
end
end
private
def current_noteable?(other_noteable)
other_noteable.id == noteable&.id && other_noteable.base_class_name == noteable&.base_class_name
end
end
end

View File

@ -22,13 +22,6 @@ class ContainerRepository < ApplicationRecord
belongs_to :project
ignore_columns %i[
migration_retries_count
migration_aborted_in_state
migration_skipped_reason
migration_state
], remove_with: '17.2', remove_after: '2024-06-24'
ignore_columns %i[
migration_aborted_at
migration_import_done_at

View File

@ -15,6 +15,7 @@ class Discussion
delegate :created_at,
:project,
:namespace,
:author,
:noteable,
:commit_id,

View File

@ -5,6 +5,7 @@ class ResourceLabelEvent < ResourceEvent
include MergeRequestResourceEvent
include Import::HasImportSource
include IgnorableColumns
include FromUnion
ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22'

View File

@ -5,6 +5,7 @@ class ResourceStateEvent < ResourceEvent
include Importable
include Import::HasImportSource
include IgnorableColumns
include FromUnion
ignore_column :imported, remove_with: '17.2', remove_after: '2024-07-22'

View File

@ -87,7 +87,6 @@ class ServiceDeskSetting < ApplicationRecord
end
def tickets_confidential_by_default?
return true unless Feature.enabled?(:service_desk_tickets_confidentiality, project)
# Tickets in public projects should always be confidential by default
return true if project.public?

View File

@ -40,6 +40,8 @@ class BaseDiscussionEntity < Grape::Entity
expose :resolved_at
expose :resolve_path do |discussion|
next unless discussion.project
resolve_project_discussion_path(discussion.project, discussion.noteable_collection_name, discussion.noteable, discussion.id)
end

View File

@ -82,6 +82,8 @@ class NoteEntity < API::Entities::Note
end
expose :resolve_path, if: ->(note, _) { note.part_of_discussion? && note.resolvable? } do |note|
next unless discussion.project
resolve_project_discussion_path(discussion.project, discussion.noteable_collection_name, discussion.noteable, discussion.id)
end

View File

@ -66,10 +66,13 @@ module BulkImports
private
attr_accessor :source_entity_identifier
def validate!
client.validate_instance_version!
validate_setting_enabled!
client.validate_import_scopes!
validate_source_full_path!
validate_setting_enabled!
end
def create_bulk_import
@ -102,22 +105,35 @@ module BulkImports
end
end
def validate_source_full_path!
gql_query = query_type(entity_type)
response = graphql_client.execute(
graphql_client.parse(gql_query.to_s),
{ full_path: source_full_path }
).original_hash
self.source_entity_identifier = ::GlobalID.parse(response.dig(*gql_query.data_path, 'id'))&.model_id
raise BulkImports::Error.source_full_path_validation_failure(source_full_path) if source_entity_identifier.nil?
end
def validate_setting_enabled!
source_full_path, source_type = Array.wrap(params)[0].values_at(:source_full_path, :source_type)
entity_type = ENTITY_TYPES_MAPPING.fetch(source_type)
if /^[0-9]+$/.match?(source_full_path)
query = query_type(entity_type)
response = graphql_client.execute(
graphql_client.parse(query.to_s),
{ full_path: source_full_path }
).original_hash
source_entity_identifier = ::GlobalID.parse(response.dig(*query.data_path, 'id')).model_id
else
source_entity_identifier = ERB::Util.url_encode(source_full_path)
end
client.get("/#{entity_type}/#{source_entity_identifier}/export_relations/status")
rescue BulkImports::NetworkError => e
raise BulkImports::Error.not_authorized(source_full_path) if e.message.include?("URL is blocked")
raise BulkImports::Error.setting_not_enabled if e.response.code == 404
raise BulkImports::Error.not_authorized(source_full_path) if e.response.code == 403
raise e
end
def entity_type
@entity_type ||= ENTITY_TYPES_MAPPING.fetch(Array.wrap(params)[0][:source_type])
end
def source_full_path
@source_full_path ||= Array.wrap(params)[0][:source_full_path]
end
def track_access_level(entity_params)

View File

@ -443,7 +443,7 @@ class NotificationService
def send_service_desk_notification(note)
return unless note.noteable_type == 'Issue'
return if note.confidential
return unless note.project.service_desk_enabled?
return unless note.project&.service_desk_enabled?
issue = note.noteable
recipients = issue.issue_email_participants

View File

@ -2,13 +2,32 @@
module Packages
class CreateEventService < BaseService
INTERNAL_EVENTS_NAMES = {
'pull_package' => 'pull_package_from_registry'
}.freeze
def execute
::Packages::Event.unique_counters_for(event_scope, event_name, originator_type).each do |event_name|
::Gitlab::UsageDataCounters::HLLRedisCounter.track_event(event_name, values: current_user.id)
end
::Packages::Event.counters_for(event_scope, event_name, originator_type).each do |event_name|
::Gitlab::UsageDataCounters::PackageEventCounter.count(event_name)
if INTERNAL_EVENTS_NAMES.key?(event_name)
user = current_user if current_user.is_a?(User)
Gitlab::InternalEvents.track_event(
INTERNAL_EVENTS_NAMES[event_name],
user: user,
project: project,
namespace: params[:namespace],
additional_properties: {
label: event_scope.to_s,
property: originator_type.to_s
}
)
else
::Packages::Event.counters_for(event_scope, event_name, originator_type).each do |event_name|
::Gitlab::UsageDataCounters::PackageEventCounter.count(event_name)
end
end
end

View File

@ -13,10 +13,6 @@ module ServiceDeskSettings
feature_flag: :issue_email_participants,
field: :add_external_participants_from_cc
)
apply_feature_flag_restrictions!(
feature_flag: :service_desk_tickets_confidentiality,
field: :tickets_confidential_by_default
)
# We want to know when custom email got enabled
write_log_message = params[:custom_email_enabled].present? && !settings.custom_email_enabled?

View File

@ -2,13 +2,4 @@
.row
.col-12
#js-vue-packages-list{ data: {
full_path: @group.full_path,
endpoint: group_packages_path(@group),
page_type: 'groups',
empty_list_illustration: image_path('illustrations/empty-state/empty-package-md.svg'),
npm_instance_url: package_registry_instance_url(:npm),
project_list_url: '',
settings_path: show_group_package_registry_settings(@group) ? group_settings_packages_and_registries_path(@group) : '',
can_delete_packages: can_delete_group_packages?(@group).to_s,
group_list_url: group_packages_path(@group) } }
#js-vue-packages-list{ data: group_packages_template_data(@group) }

View File

@ -6,13 +6,19 @@
%meta{ content: "IE=edge", "http-equiv" => "X-UA-Compatible" }/
%title= message.subject
-# Avoid premailer processing of client-specific styles (@media tag not supported)
-# We need to inline the contents here because mail clients (e.g. iOS Mail, Outlook)
-# do not support linked stylesheets.
%style{ type: 'text/css', 'data-premailer': 'ignore' }
= asset_to_string('mailer_client_specific.css').html_safe
-# Vite in dev mode isn't too great about reading assets a string,
-# so we do not inline it with vite. Similar solution to:
-# app/views/layouts/errors.html.haml
- if vite_enabled?
= universal_stylesheet_link_tag 'mailer_client_specific', data: { premailer: 'ignore' }
- else
-# Avoid premailer processing of client-specific styles (@media tag not supported)
-# We need to inline the contents here because mail clients (e.g. iOS Mail, Outlook)
-# do not support linked stylesheets.
%style{ type: 'text/css', 'data-premailer': 'ignore' }
= asset_to_string('mailer_client_specific.css').html_safe
= stylesheet_link_tag 'mailer.css'
= universal_stylesheet_link_tag 'mailer'
%body
= yield :preview_text
-# Test stub for RSpec testing of Notify and associated modules

View File

@ -1,6 +1,6 @@
.row-content-block.second-block.content-component-block.gl-px-0.gl-py-3
.gl-w-max.gl-max-w-full
#js-graph-ref-switcher{ data: { project_id: @project.id, ref: @ref, network_path: project_network_path(@project) } }
#js-graph-ref-switcher{ data: { project_id: @project.id, ref: @ref, network_path: project_network_path(@project, @ref, ref_type: @ref_type) } }
.oneline
= _("You can move around the graph by using the arrow keys.")

View File

@ -1,6 +1,6 @@
- breadcrumb_title _("Graph")
- page_title _("Graph"), @ref
- network_path = project_network_path(@project, @id, ref_type: @ref_type)
- network_path = project_network_path(@project, @ref, ref_type: @ref_type)
= render "head"
.gl-mt-5
.project-network.gl-border-1.gl-border-solid.gl-border-gray-300

View File

@ -2,13 +2,4 @@
.row
.col-12
#js-vue-packages-list{ data: {
full_path: @project.full_path,
endpoint: project_packages_path(@project),
page_type: 'projects',
empty_list_illustration: image_path('illustrations/empty-state/empty-package-md.svg'),
npm_instance_url: package_registry_instance_url(:npm),
project_list_url: project_packages_path(@project),
settings_path: show_package_registry_settings(@project) ? project_settings_packages_and_registries_path(@project) : '',
can_delete_packages: can_delete_packages?(@project).to_s,
group_list_url: '' } }
#js-vue-packages-list{ data: project_packages_template_data(@project) }

View File

@ -0,0 +1,23 @@
---
description: Package pulled from the registry
internal_events: true
action: pull_package_from_registry
identifiers:
- project
- namespace
- user
additional_properties:
label:
description: The name of the package type
property:
description: The auth type. Either 'guest', 'user' or 'deploy_token'
product_group: package_registry
milestone: '17.1'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/151919
distributions:
- ce
- ee
tiers:
- free
- premium
- ultimate

View File

@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/432778
milestone: '16.7'
type: development
group: group::threat insights
default_enabled: false
default_enabled: true

View File

@ -1,9 +0,0 @@
---
name: service_desk_tickets_confidentiality
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/33091
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150025
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/457181
milestone: '17.0'
group: group::respond
type: wip
default_enabled: false

View File

@ -8,5 +8,5 @@ Premailer::Rails.config.merge!(
remove_ids: false,
remove_scripts: false,
output_encoding: 'US-ASCII',
strategies: [:asset_pipeline]
strategies: ::Rails.env.production? ? [:asset_pipeline] : [:asset_pipeline, :network]
)

View File

@ -6,11 +6,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_composer_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: composer
distribution:
- ee
- ce

View File

@ -6,11 +6,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_conan_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: conan
distribution:
- ee
- ce

View File

@ -6,11 +6,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_debian_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: debian
distribution:
- ee
- ce

View File

@ -6,11 +6,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_generic_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: generic
distribution:
- ee
- ce

View File

@ -6,11 +6,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_golang_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: golang
distribution:
- ee
- ce

View File

@ -6,11 +6,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_maven_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: maven
distribution:
- ee
- ce

View File

@ -6,11 +6,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_npm_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: npm
distribution:
- ee
- ce

View File

@ -6,11 +6,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_nuget_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: nuget
distribution:
- ee
- ce

View File

@ -6,11 +6,9 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
distribution:
- ee
- ce

View File

@ -7,11 +7,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_pull_package_by_deploy_token
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
property: deploy_token
distribution:
- ee
- ce

View File

@ -7,13 +7,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_pull_package_by_guest
data_source: internal_events
events:
- name: package_pulled_by_guest
- name: pull_package_from_registry
filter:
property: guest
distribution:
- ee
- ce

View File

@ -7,11 +7,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_pull_package_by_user
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
property: user
distribution:
- ee
- ce

View File

@ -12,8 +12,6 @@ instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_push_package_by_deploy_token
events:
- name: package_pushed_using_deploy_token
distribution:
- ee
- ce

View File

@ -7,11 +7,11 @@ product_group: package_registry
value_type: number
status: active
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_pypi_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: pypi
distribution:
- ee
- ce

View File

@ -8,11 +8,11 @@ status: active
milestone: '13.10'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53480
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_rubygems_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: rubygems
distribution:
- ce
- ee

View File

@ -8,11 +8,11 @@ status: active
milestone: '13.11'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55018
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_terraform_module_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: terraform_module
distribution:
- ce
- ee

View File

@ -8,11 +8,11 @@ status: active
milestone: "14.0"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61014
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_helm_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: helm
distribution:
- ce
- ee

View File

@ -8,11 +8,11 @@ status: active
milestone: '15.6'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/97133
time_frame: all
data_source: redis
instrumentation_class: RedisMetric
options:
prefix: package_events
event: i_package_rpm_pull_package
data_source: internal_events
events:
- name: pull_package_from_registry
filter:
label: rpm
distribution:
- ce
- ee

View File

@ -0,0 +1,40 @@
# frozen_string_literal: true
class CreateCodeSuggestionAcceptanceTables < ClickHouse::Migration
def up
execute <<~SQL
CREATE TABLE IF NOT EXISTS code_suggestion_daily_events
(
user_id UInt64 DEFAULT 0,
date Date32 DEFAULT toDate(now64()),
event UInt8 DEFAULT 0,
occurrences UInt64 DEFAULT 0,
) ENGINE = SummingMergeTree
PARTITION BY toYear(date)
ORDER BY (user_id, date, event)
SETTINGS index_granularity = 64
SQL
execute <<~SQL
CREATE MATERIALIZED VIEW IF NOT EXISTS code_suggestion_daily_events_mv
TO code_suggestion_daily_events
AS
SELECT
user_id,
toDate(timestamp) as date,
event,
1 as occurrences
FROM code_suggestion_usages
SQL
end
def down
execute <<~SQL
DROP VIEW IF EXISTS code_suggestion_daily_events_mv
SQL
execute <<~SQL
DROP TABLE IF EXISTS code_suggestion_daily_events
SQL
end
end

View File

@ -16595,8 +16595,10 @@ Extra metadata for AI message.
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="aimetricscodecontributorscount"></a>`codeContributorsCount` | [`Int!`](#int) | Number of code contributors. |
| <a id="aimetricscodesuggestionscontributorscount"></a>`codeSuggestionsContributorsCount` | [`Int!`](#int) | Number of code contributors who used GitLab Duo Code Suggestions features. |
| <a id="aimetricscodecontributorscount"></a>`codeContributorsCount` | [`Int`](#int) | Number of code contributors. |
| <a id="aimetricscodesuggestionsacceptedcount"></a>`codeSuggestionsAcceptedCount` | [`Int`](#int) | Total count of code suggestions accepted by code contributors. |
| <a id="aimetricscodesuggestionscontributorscount"></a>`codeSuggestionsContributorsCount` | [`Int`](#int) | Number of code contributors who used GitLab Duo Code Suggestions features. |
| <a id="aimetricscodesuggestionsshowncount"></a>`codeSuggestionsShownCount` | [`Int`](#int) | Total count of code suggestions shown to code contributors. |
### `AiSelfHostedModel`

View File

@ -268,7 +268,9 @@ To achieve the same result as renaming an environment:
Sometimes, instead of using an [industry standard](https://en.wikipedia.org/wiki/Deployment_environment)
environment name, like `production`, you might want to use a code name, like `customer-portal`.
While there is no technical reason not to use a name like `customer-portal`, the name
no longer indicates that the environment is used for production.
no longer indicates that the environment is used for production. This can affect how metrics
like [deployment frequency](../../user/analytics/dora_metrics.md#how-deployment-frequency-is-calculated)
are calculated.
To indicate that a specific environment is for a specific use,
you can use tiers:
@ -282,6 +284,7 @@ you can use tiers:
| `other` | |
By default, GitLab assumes a tier based on [the environment name](../yaml/index.md#environmentname).
You cannot set an environment tier using the UI.
Instead, you can use the [`deployment_tier` keyword](../yaml/index.md#environmentdeployment_tier) to specify a tier.
## Configure manual deployments

View File

@ -16,8 +16,6 @@ do this with the Docker and Shell executors of GitLab Runner.
## Use PostgreSQL with the Docker executor
NOTE:
To pass variables set in the GitLab UI to service containers, you must [define the variables](../variables/index.md#define-a-cicd-variable-in-the-ui).
You must define your variables as either Group or Project, then call the variables in your job as shown in the following workaround.

View File

@ -194,7 +194,7 @@ This stage is responsible for [allure test report](index.md#allure-report) gener
The `e2e:test-on-cng` child pipeline runs tests against [Cloud Native GitLab](https://gitlab.com/gitlab-org/build/CNG) installation.
Unlike `review-apps`, this pipeline uses local [kind](https://github.com/kubernetes-sigs/kind) Kubernetes cluster.
Deployment is managed by the [`cng`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/gems/gitlab-cng/README.md)
Deployment is managed by the [`cng`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/gems/gitlab-cng/README.md)
orchestrator tool, which you can also use to locally recreate CI/CD deployments.
This pipeline is executed every two hours on scheduled pipelines and runs the following validations:
@ -235,6 +235,6 @@ This stage is responsible for [allure test report](index.md#allure-report) gener
To help with debugging:
- Each test job prints a list of arguments that you can pass to the [`cng`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/gems/gitlab-cng/README.md)
- Each test job prints a list of arguments that you can pass to the [`cng`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/gems/gitlab-cng/README.md)
orchestrator to exactly recreate the same deployment for local debugging.
- Cluster events log and all pod logs are saved in E2E test job artifacts.

View File

@ -52,11 +52,12 @@ Prerequisites:
- Your GitLab username.
- A personal access token or deploy token. For repository authentication:
- You can generate a [personal access token](../../../user/profile/personal_access_tokens.md)
with the scope set to `api`.
- You can generate a [deploy token](../../project/deploy_tokens/index.md)
with the scope set to `read_package_registry`, `write_package_registry`, or
both.
- You can generate a [personal access token](../../../user/profile/personal_access_tokens.md).
- To install packages from the repository, the scope of the token must include `read_api` or `api`.
- To publish packages to the repository, the scope of the token must include `api`.
- You can generate a [deploy token](../../project/deploy_tokens/index.md).
- To install packages from the repository, the scope of the token must include `read_package_registry`.
- To publish packages to the repository, the scope of the token must include `write_package_registry`.
- A name for your source.
- Depending on the [endpoint level](#use-the-gitlab-endpoint-for-nuget-packages) you use, either:
- Your project ID, which is found on your [project overview page](../../project/working_with_projects.md#access-a-project-by-using-the-project-id).

View File

@ -188,11 +188,7 @@ To edit the custom email display name:
## Default ticket visibility
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33091) in GitLab 17.2 [with a flag](../../../administration/feature_flags.md) named `service_desk_ticket_confidentiality`. Disabled by default.
FLAG:
The availability of this feature is controlled by a feature flag.
For more information, see the history.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33091) in GitLab 17.2.
New tickets are confidential by default, so only project members with at least the Reporter role
can view them.

View File

@ -54,6 +54,7 @@ Meanwhile:
- [Customize emails sent to external participants](configure.md#customize-emails-sent-to-external-participants)
- [Use a custom template for Service Desk tickets](configure.md#use-a-custom-template-for-service-desk-tickets)
- [Support Bot user](configure.md#support-bot-user)
- [Default ticket visibility](configure.md#default-ticket-visibility)
- [Reopen issues when an external participant comments](configure.md#reopen-issues-when-an-external-participant-comments)
- [Custom email address](configure.md#custom-email-address)
- [Use an additional Service Desk alias email](configure.md#use-an-additional-service-desk-alias-email)

View File

@ -1,4 +0,0 @@
include:
- local: gems/gem.gitlab-ci.yml
inputs:
gem_name: gitlab-cng

View File

@ -1,18 +0,0 @@
inherit_from:
- ../config/rubocop.yml
Gemfile/MissingFeatureCategory:
Enabled: false
Rails/Output:
Enabled: false
Rails/Pluck:
Enabled: false
Rails/Exit:
Enabled: false
RSpec/MultipleMemoizedHelpers:
AllowSubject: true
Max: 8

View File

@ -1,5 +0,0 @@
# frozen_string_literal: true
source "https://rubygems.org"
gemspec

View File

@ -99,7 +99,13 @@ module API
strong_memoize_attr :user_project_with_read_package
def track_package_event(action, scope, **args)
service = ::Packages::CreateEventService.new(nil, current_user, event_name: action, scope: scope)
service = ::Packages::CreateEventService.new(
args[:project],
current_user,
namespace: args[:namespace],
event_name: action,
scope: scope
)
service.execute
category = args.delete(:category) || self.options[:for].name
@ -115,9 +121,19 @@ module API
)
if action.to_s == 'push_package' && service.originator_type == :deploy_token
track_snowplow_event("push_package_by_deploy_token", category, args)
track_snowplow_event(
'push_package_by_deploy_token',
'package_pushed_using_deploy_token',
category,
args
)
elsif action.to_s == 'pull_package' && service.originator_type == :guest
track_snowplow_event("pull_package_by_guest", category, args)
track_snowplow_event(
'pull_package_by_guest',
'package_pulled_by_guest',
category,
args
)
end
end
@ -132,17 +148,17 @@ module API
private
def track_snowplow_event(action_name, category, args)
def track_snowplow_event(action_name, snowplow_event_name, category, args)
event_name = "i_package_#{action_name}"
key_path = "counts.package_events_i_package_#{action_name}"
service_ping_context = Gitlab::Usage::MetricDefinition.context_for(key_path).to_context
context = Gitlab::Tracking::ServicePingContext.new(data_source: :redis, event: snowplow_event_name).to_context
Gitlab::Tracking.event(
category,
action_name,
property: event_name,
label: key_path,
context: [service_ping_context],
context: [context],
**args
)
end

View File

@ -31,8 +31,18 @@ module BulkImports
path: full_path))
end
def self.source_full_path_validation_failure(full_path)
self.new(format(s_("BulkImport|Import failed. '%{path}' not found."),
path: full_path))
end
def self.not_authorized(full_path)
self.new(format(s_("BulkImport|Import failed. You don't have permission to export '%{path}'."),
path: full_path))
end
def self.setting_not_enabled
self.new(s_("BulkImport|Group import disabled on source or destination instance. " \
self.new(s_("BulkImport|Migration by direct transfer disabled on source or destination instance. " \
"Ask an administrator to enable it on both instances and try again."))
end
end

View File

@ -155,6 +155,8 @@ semgrep-sast:
- '**/*.c++'
- '**/*.cp'
- '**/*.cxx'
- '**/*.h'
- '**/*.hpp'
- '**/*.go'
- '**/*.java'
- '**/*.html'

View File

@ -166,6 +166,8 @@ semgrep-sast:
- '**/*.c++'
- '**/*.cp'
- '**/*.cxx'
- '**/*.h'
- '**/*.hpp'
- '**/*.go'
- '**/*.java'
- '**/*.html'
@ -192,6 +194,8 @@ semgrep-sast:
- '**/*.c++'
- '**/*.cp'
- '**/*.cxx'
- '**/*.h'
- '**/*.hpp'
- '**/*.go'
- '**/*.java'
- '**/*.html'

View File

@ -1,40 +1,27 @@
---
- i_package_composer_delete_package
- i_package_composer_pull_package
- i_package_composer_push_package
- i_package_conan_delete_package
- i_package_conan_pull_package
- i_package_conan_push_package
- i_package_debian_delete_package
- i_package_debian_pull_package
- i_package_debian_push_package
- i_package_delete_package
- i_package_delete_package_by_deploy_token
- i_package_delete_package_by_guest
- i_package_delete_package_by_user
- i_package_generic_delete_package
- i_package_generic_pull_package
- i_package_generic_push_package
- i_package_golang_delete_package
- i_package_golang_pull_package
- i_package_golang_push_package
- i_package_helm_pull_package
- i_package_helm_push_package
- i_package_maven_delete_package
- i_package_maven_pull_package
- i_package_maven_push_package
- i_package_npm_delete_package
- i_package_npm_pull_package
- i_package_npm_push_package
- i_package_nuget_delete_package
- i_package_nuget_pull_package
- i_package_nuget_push_package
- i_package_nuget_pull_symbol_package
- i_package_nuget_push_symbol_package
- i_package_pull_package
- i_package_pull_package_by_deploy_token
- i_package_pull_package_by_guest
- i_package_pull_package_by_user
- i_package_pull_symbol_package
- i_package_pull_symbol_package_by_deploy_token
- i_package_pull_symbol_package_by_guest
@ -48,13 +35,9 @@
- i_package_push_symbol_package_by_guest
- i_package_push_symbol_package_by_user
- i_package_pypi_delete_package
- i_package_pypi_pull_package
- i_package_pypi_push_package
- i_package_rubygems_delete_package
- i_package_rubygems_pull_package
- i_package_rubygems_push_package
- i_package_terraform_module_delete_package
- i_package_terraform_module_pull_package
- i_package_terraform_module_push_package
- i_package_rpm_push_package
- i_package_rpm_pull_package

View File

@ -524,8 +524,6 @@
- p_ci_templates_workflows_branch_pipelines
- p_ci_templates_workflows_mergerequest_pipelines
- p_terraform_state_api_unique_users
- package_pulled_by_guest
- package_pushed_using_deploy_token
- project_action
- project_created_analytics_dashboard
- project_initialized_product_analytics

View File

@ -8,35 +8,52 @@
# ...
#
'{event_counters}_analytics_dashboard_viewed': USAGE_PRODUCT_ANALYTICS_VIEW_DASHBOARD
'{event_counters}_click_external_link_license_compliance': USAGE_USERS_CLICKING_LICENSE_TESTING_VISITING_EXTERNAL_WEBSITE
'{event_counters}_click_full_report_license_compliance': USAGE_USERS_VISITING_TESTING_LICENSE_COMPLIANCE_FULL_REPORT
'{event_counters}_create_commit_from_web_ide': WEB_IDE_COMMITS_COUNT
'{event_counters}_create_commit_note': USAGE_NOTE_CREATE_COMMIT
'{event_counters}_create_design_management_design': USAGE_DESIGN_MANAGEMENT_DESIGNS_CREATE
'{event_counters}_create_merge_request': USAGE_MERGE_REQUEST_CREATE
'{event_counters}_create_merge_request_from_web_ide': WEB_IDE_MERGE_REQUESTS_COUNT
'{event_counters}_create_merge_request_note': USAGE_NOTE_CREATE_MERGEREQUEST
'{event_counters}_create_snippet': USAGE_SNIPPET_CREATE
'{event_counters}_create_snippet_note': USAGE_NOTE_CREATE_SNIPPET
'{event_counters}_create_wiki_page': USAGE_WIKI_PAGES_CREATE
'{event_counters}_delete_design_management_design': USAGE_DESIGN_MANAGEMENT_DESIGNS_DELETE
'{event_counters}_delete_wiki_page': USAGE_WIKI_PAGES_DELETE
'{event_counters}_licenses_list_viewed': USAGE_LICENSES_LIST_VIEWS
'{event_counters}_update_snippet': USAGE_SNIPPET_UPDATE
'{event_counters}_usage_data_download_payload_clicked': USAGE_SERVICE_USAGE_DATA_DOWNLOAD_PAYLOAD_CLICK
'{event_counters}_value_streams_dashboard_viewed': USAGE_VALUE_STREAMS_DASHBOARD_VIEWS
'{event_counters}_view_cycle_analytics': USAGE_CYCLE_ANALYTICS_VIEWS
'{event_counters}_view_productivity_analytics': USAGE_PRODUCTIVITY_ANALYTICS_VIEWS
'{event_counters}_web_ide_viewed': WEB_IDE_VIEWS_COUNT
'{event_counters}_perform_navbar_search': NAVBAR_SEARCHES_COUNT
'{event_counters}_perform_search': ALL_SEARCHES_COUNT
'{event_counters}_pull_package_from_registry': USAGE_PACKAGE_EVENTS_I_PACKAGE_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:composer]': USAGE_PACKAGE_EVENTS_I_PACKAGE_COMPOSER_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:conan]': USAGE_PACKAGE_EVENTS_I_PACKAGE_CONAN_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:debian]': USAGE_PACKAGE_EVENTS_I_PACKAGE_DEBIAN_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:generic]': USAGE_PACKAGE_EVENTS_I_PACKAGE_GENERIC_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:golang]': USAGE_PACKAGE_EVENTS_I_PACKAGE_GOLANG_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:helm]': USAGE_PACKAGE_EVENTS_I_PACKAGE_HELM_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:maven]': USAGE_PACKAGE_EVENTS_I_PACKAGE_MAVEN_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:npm]': USAGE_PACKAGE_EVENTS_I_PACKAGE_NPM_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:nuget]': USAGE_PACKAGE_EVENTS_I_PACKAGE_NUGET_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:pypi]': USAGE_PACKAGE_EVENTS_I_PACKAGE_PYPI_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:rpm]': USAGE_PACKAGE_EVENTS_I_PACKAGE_RPM_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:rubygems]': USAGE_PACKAGE_EVENTS_I_PACKAGE_RUBYGEMS_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[label:terraform_module]': USAGE_PACKAGE_EVENTS_I_PACKAGE_TERRAFORM_MODULE_PULL_PACKAGE
'{event_counters}_pull_package_from_registry-filter:[property:deploy_token]': USAGE_PACKAGE_EVENTS_I_PACKAGE_PULL_PACKAGE_BY_DEPLOY_TOKEN
'{event_counters}_pull_package_from_registry-filter:[property:guest]': USAGE_PACKAGE_EVENTS_I_PACKAGE_PULL_PACKAGE_BY_GUEST
'{event_counters}_pull_package_from_registry-filter:[property:user]': USAGE_PACKAGE_EVENTS_I_PACKAGE_PULL_PACKAGE_BY_USER
'{event_counters}_source_code_pushed': USAGE_SOURCE_CODE_PUSHES
'{event_counters}_status_page_incident_published': USAGE_STATUS_PAGE_INCIDENT_PUBLISHES
'{event_counters}_status_page_incident_unpublished': USAGE_STATUS_PAGE_INCIDENT_UNPUBLISHES
'{event_counters}_create_wiki_page': USAGE_WIKI_PAGES_CREATE
'{event_counters}_delete_wiki_page': USAGE_WIKI_PAGES_DELETE
'{event_counters}_update_wiki_page': USAGE_WIKI_PAGES_UPDATE
'{event_counters}_view_wiki_page': USAGE_WIKI_PAGES_VIEW
'{event_counters}_click_full_report_license_compliance': USAGE_USERS_VISITING_TESTING_LICENSE_COMPLIANCE_FULL_REPORT
'{event_counters}_click_external_link_license_compliance': USAGE_USERS_CLICKING_LICENSE_TESTING_VISITING_EXTERNAL_WEBSITE
'{event_counters}_perform_search': ALL_SEARCHES_COUNT
'{event_counters}_perform_navbar_search': NAVBAR_SEARCHES_COUNT
'{event_counters}_source_code_pushed': USAGE_SOURCE_CODE_PUSHES
'{event_counters}_create_design_management_design': USAGE_DESIGN_MANAGEMENT_DESIGNS_CREATE
'{event_counters}_update_design_management_design': USAGE_DESIGN_MANAGEMENT_DESIGNS_UPDATE
'{event_counters}_delete_design_management_design': USAGE_DESIGN_MANAGEMENT_DESIGNS_DELETE
'{event_counters}_create_merge_request': USAGE_MERGE_REQUEST_CREATE
'{event_counters}_create_merge_request_note': USAGE_NOTE_CREATE_MERGEREQUEST
'{event_counters}_create_commit_from_web_ide': WEB_IDE_COMMITS_COUNT
'{event_counters}_create_merge_request_from_web_ide': WEB_IDE_MERGE_REQUESTS_COUNT
'{event_counters}_trigger_audit_event-filter:[label:delete_epic]': USAGE_AUDIT_EVENTS_DELETE_EPIC
'{event_counters}_trigger_audit_event-filter:[label:delete_issue]': USAGE_AUDIT_EVENTS_DELETE_ISSUE
'{event_counters}_trigger_audit_event-filter:[label:delete_merge_request]': USAGE_AUDIT_EVENTS_DELETE_MERGE_REQUEST
'{event_counters}_trigger_audit_event-filter:[label:delete_work_item]': USAGE_AUDIT_EVENTS_DELETE_WORK_ITEM
'{event_counters}_update_design_management_design': USAGE_DESIGN_MANAGEMENT_DESIGNS_UPDATE
'{event_counters}_update_snippet': USAGE_SNIPPET_UPDATE
'{event_counters}_update_wiki_page': USAGE_WIKI_PAGES_UPDATE
'{event_counters}_usage_data_download_payload_clicked': USAGE_SERVICE_USAGE_DATA_DOWNLOAD_PAYLOAD_CLICK
'{event_counters}_value_streams_dashboard_viewed': USAGE_VALUE_STREAMS_DASHBOARD_VIEWS
'{event_counters}_view_cycle_analytics': USAGE_CYCLE_ANALYTICS_VIEWS
'{event_counters}_view_productivity_analytics': USAGE_PRODUCTIVITY_ANALYTICS_VIEWS
'{event_counters}_view_wiki_page': USAGE_WIKI_PAGES_VIEW
'{event_counters}_web_ide_viewed': WEB_IDE_VIEWS_COUNT

View File

@ -9783,21 +9783,24 @@ msgstr ""
msgid "BulkImport|Following data will not be migrated: %{bullets} Contact system administrator of %{host} to upgrade GitLab if you need this data in your migration"
msgstr ""
msgid "BulkImport|Group import disabled on source or destination instance. Ask an administrator to enable it on both instances and try again."
msgstr ""
msgid "BulkImport|Import completed"
msgstr ""
msgid "BulkImport|Import failed. '%{path}' already exists. Change the destination and try again."
msgstr ""
msgid "BulkImport|Import failed. '%{path}' not found."
msgstr ""
msgid "BulkImport|Import failed. Destination '%{destination}' is invalid, or you don't have permission."
msgstr ""
msgid "BulkImport|Import failed. Destination URL %{url}"
msgstr ""
msgid "BulkImport|Import failed. You don't have permission to export '%{path}'."
msgstr ""
msgid "BulkImport|Import failed: Destination cannot be a subgroup of the source group. Change the destination and try again."
msgstr ""
@ -9837,6 +9840,9 @@ msgstr ""
msgid "BulkImport|Maximum download file size when importing from source GitLab instances by direct transfer."
msgstr ""
msgid "BulkImport|Migration by direct transfer disabled on source or destination instance. Ask an administrator to enable it on both instances and try again."
msgstr ""
msgid "BulkImport|Migration details"
msgstr ""
@ -57740,6 +57746,9 @@ msgstr ""
msgid "UserMapping|Source: %{source_hostname}"
msgstr ""
msgid "UserMapping|There was a problem fetching placeholder users."
msgstr ""
msgid "UserProfile|%{count} %{file}"
msgstr ""

View File

@ -41,10 +41,11 @@ WORKDIR /home/gitlab/qa
##
# Install qa dependencies or fetch from cache if unchanged
#
COPY ./qa/Gemfile* /home/gitlab/qa/
COPY ./vendor/gems/ /home/gitlab/vendor/gems/
COPY ./gems/ /home/gitlab/gems/
RUN bundle config set --local without development \
COPY qa/Gemfile* /home/gitlab/qa/
COPY vendor/gems/ /home/gitlab/vendor/gems/
COPY gems/gitlab-utils /home/gitlab/gems/gitlab-utils
COPY qa/gems /home/gitlab/qa/gems
RUN ls -la && bundle config set --local without development \
&& bundle install --retry=3
COPY ./config/initializers/0_inject_enterprise_edition_module.rb /home/gitlab/config/initializers/
@ -60,7 +61,7 @@ COPY ./qa /home/gitlab/qa
ENTRYPOINT ["bin/test"]
# Add ee files when passing the parameter: `--build-arg QA_BUILD_TARGET=ee`
FROM foss as ee
FROM foss AS ee
# Copy VERSION to ensure the COPY succeeds to copy at least one file since ee/app/models/license.rb isn't present in FOSS
# The [b] part makes ./ee/app/models/license.r[b] a pattern that is allowed to return no files (which is the case in FOSS)
ONBUILD COPY VERSION ./ee/app/models/license.r[b] /home/gitlab/ee/app/models/
@ -74,7 +75,7 @@ ONBUILD COPY ./jh/config/feature_flags /home/gitlab/jh/config/feature_flags
# Add solargraph gem for devcontainer
# Solargraph is only present in parent Gemfile so we just install it manually
FROM ee as dev
FROM ee AS dev
RUN gem install solargraph --force
FROM $QA_BUILD_TARGET

View File

@ -34,6 +34,7 @@ gem "warning", "~> 1.4"
gem 'chemlab', '~> 0.11', '>= 0.11.1'
gem 'chemlab-library-www-gitlab-com', '~> 0.1', '>= 0.1.1'
gem 'chemlab-library-gitlab', path: 'gems/chemlab-gitlab'
# dependencies for jenkins client
gem 'nokogiri', '~> 1.16', '>= 1.16.6'
@ -48,6 +49,6 @@ group :development do
end
group :ci do
gem 'gitlab-cng', path: '../gems/gitlab-cng'
gem 'gitlab-cng', path: 'gems/gitlab-cng'
gem 'junit_merge', '~> 0.1.2'
end

View File

@ -1,5 +1,21 @@
PATH
remote: ../gems/gitlab-cng
remote: ../gems/gitlab-utils
specs:
gitlab-utils (0.1.0)
actionview (>= 6.1.7.2)
activesupport (>= 6.1.7.2)
addressable (~> 2.8)
rake (~> 13.0)
PATH
remote: gems/chemlab-gitlab
specs:
chemlab-library-gitlab (0.3.0)
chemlab (~> 0.9)
zeitwerk (~> 2.4)
PATH
remote: gems/gitlab-cng
specs:
gitlab-cng (0.0.1)
activesupport (>= 7)
@ -10,15 +26,6 @@ PATH
tty-spinner (~> 0.9.3)
tty-which (~> 0.5.0)
PATH
remote: ../gems/gitlab-utils
specs:
gitlab-utils (0.1.0)
actionview (>= 6.1.7.2)
activesupport (>= 6.1.7.2)
addressable (~> 2.8)
rake (~> 13.0)
GEM
remote: https://rubygems.org/
specs:
@ -384,6 +391,7 @@ DEPENDENCIES
capybara (~> 3.40.0)
capybara-screenshot (~> 1.0.26)
chemlab (~> 0.11, >= 0.11.1)
chemlab-library-gitlab!
chemlab-library-www-gitlab-com (~> 0.1, >= 0.1.1)
deprecation_toolkit (~> 2.2.0)
factory_bot (~> 6.3.0)

View File

@ -0,0 +1,27 @@
# We need to ignore exclusions defined in parent RuboCop configuration
# (AllCops/Exclude: 'gems/**/*') if RuboCop cop is run within `gems/...`.
# See https://gitlab.com/gitlab-org/gitlab/-/issues/417281
<%
relative_path = Dir.pwd.delete_prefix(File.expand_path('../../..'))
RuboCop::ConfigLoader.ignore_parent_exclusion = relative_path.start_with?('/qa/gems/')
%>
---
inherit_gem:
gitlab-styles:
- rubocop-default.yml
AllCops:
TargetRubyVersion: 3.0
SuggestExtensions: false
NewCops: disable
Rails:
Enabled: false
CodeReuse/ActiveRecord:
Exclude:
- "**/*_spec.rb"
RSpec/MultipleMemoizedHelpers:
Max: 25
AllowSubject: true

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
source "https://rubygems.org"
gemspec
group :test do
gem "climate_control", "~> 1.2"
gem "gitlab-styles", "~> 11.0"
gem "pry", "~> 0.14.2"
gem "rspec", "~> 3.0"
gem "simplecov", "~> 0.22.0"
end

Some files were not shown because too many files have changed in this diff Show More