Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
c441318451
commit
84b4fcc620
|
|
@ -78,7 +78,7 @@ workflow:
|
|||
QA_ALLOW_LOCAL_REQUESTS: "true"
|
||||
QA_SUITE_STATUS_ENV_FILE: $CI_PROJECT_DIR/suite_status.env
|
||||
QA_RUN_IN_PARALLEL: "true"
|
||||
QA_PARALLEL_PROCESSES: 5
|
||||
QA_PARALLEL_PROCESSES: 4
|
||||
GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN
|
||||
before_script:
|
||||
- echo "SUITE_RAN=true" > "$QA_SUITE_STATUS_ENV_FILE"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
6ac5ec362f7794ee359fec0db88e2c828ba1b19b
|
||||
8e905bd19b45aa6a4bf8c2ae4cf31f271a7cb3de
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@
|
|||
{"name":"net-protocol","version":"0.1.3","platform":"ruby","checksum":"ad43e2be965ede676683c047b2c3d76762aa49a764779d98312a10da04622c14"},
|
||||
{"name":"net-scp","version":"4.0.0","platform":"ruby","checksum":"b32ded0d48c88ce70844a063e4e14efb44a95e51a9e0c0bfb0c54b4313b622ea"},
|
||||
{"name":"net-smtp","version":"0.3.3","platform":"ruby","checksum":"3d51dcaa981b74aff2d89cbe89de4503bc2d682365ea5176366e950a0d68d5b0"},
|
||||
{"name":"net-ssh","version":"7.2.0","platform":"ruby","checksum":"2a28f177173d1f6bef77471fa927c73959cda36cd03772e117f2fec48f34d2cb"},
|
||||
{"name":"net-ssh","version":"7.3.0","platform":"ruby","checksum":"172076c4b30ce56fb25a03961b0c4da14e1246426401b0f89cba1a3b54bf3ef0"},
|
||||
{"name":"netrc","version":"0.11.0","platform":"ruby","checksum":"de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f"},
|
||||
{"name":"nio4r","version":"2.7.0","platform":"java","checksum":"3f2e515e928ceeef7668e1f64fc3bfef1417a5ec0908d8e69f2c6d486284e04d"},
|
||||
{"name":"nio4r","version":"2.7.0","platform":"ruby","checksum":"9586a685eca8246d6406e712a525e705d15bb88f709d78fc3f141e864df97276"},
|
||||
|
|
|
|||
|
|
@ -1198,7 +1198,7 @@ GEM
|
|||
net-ssh (>= 2.6.5, < 8.0.0)
|
||||
net-smtp (0.3.3)
|
||||
net-protocol
|
||||
net-ssh (7.2.0)
|
||||
net-ssh (7.3.0)
|
||||
netrc (0.11.0)
|
||||
nio4r (2.7.0)
|
||||
no_proxy_fix (0.1.2)
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@
|
|||
{"name":"net-protocol","version":"0.1.3","platform":"ruby","checksum":"ad43e2be965ede676683c047b2c3d76762aa49a764779d98312a10da04622c14"},
|
||||
{"name":"net-scp","version":"4.0.0","platform":"ruby","checksum":"b32ded0d48c88ce70844a063e4e14efb44a95e51a9e0c0bfb0c54b4313b622ea"},
|
||||
{"name":"net-smtp","version":"0.3.3","platform":"ruby","checksum":"3d51dcaa981b74aff2d89cbe89de4503bc2d682365ea5176366e950a0d68d5b0"},
|
||||
{"name":"net-ssh","version":"7.2.0","platform":"ruby","checksum":"2a28f177173d1f6bef77471fa927c73959cda36cd03772e117f2fec48f34d2cb"},
|
||||
{"name":"net-ssh","version":"7.3.0","platform":"ruby","checksum":"172076c4b30ce56fb25a03961b0c4da14e1246426401b0f89cba1a3b54bf3ef0"},
|
||||
{"name":"netrc","version":"0.11.0","platform":"ruby","checksum":"de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f"},
|
||||
{"name":"nio4r","version":"2.7.0","platform":"java","checksum":"3f2e515e928ceeef7668e1f64fc3bfef1417a5ec0908d8e69f2c6d486284e04d"},
|
||||
{"name":"nio4r","version":"2.7.0","platform":"ruby","checksum":"9586a685eca8246d6406e712a525e705d15bb88f709d78fc3f141e864df97276"},
|
||||
|
|
|
|||
|
|
@ -1213,7 +1213,7 @@ GEM
|
|||
net-ssh (>= 2.6.5, < 8.0.0)
|
||||
net-smtp (0.3.3)
|
||||
net-protocol
|
||||
net-ssh (7.2.0)
|
||||
net-ssh (7.3.0)
|
||||
netrc (0.11.0)
|
||||
nio4r (2.7.0)
|
||||
no_proxy_fix (0.1.2)
|
||||
|
|
|
|||
|
|
@ -170,11 +170,9 @@ export default {
|
|||
<gl-disclosure-dropdown
|
||||
ref="dropdown"
|
||||
dropup
|
||||
icon="chevron-down"
|
||||
size="small"
|
||||
category="tertiary"
|
||||
boundary="viewport"
|
||||
no-caret
|
||||
text-sr-only
|
||||
:items="dropdownItems"
|
||||
:toggle-text="__('Edit table')"
|
||||
|
|
|
|||
|
|
@ -93,8 +93,6 @@ export default {
|
|||
toggle-text="Import options"
|
||||
text-sr-only
|
||||
:disabled="isInvalid"
|
||||
icon="chevron-down"
|
||||
no-caret
|
||||
variant="confirm"
|
||||
category="secondary"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -712,13 +712,10 @@ export default {
|
|||
v-gl-tooltip.hover.focus="__('Select merge moment')"
|
||||
:disabled="isMergeButtonDisabled"
|
||||
variant="confirm"
|
||||
class="gl-mr-0"
|
||||
data-testid="merge-immediately-dropdown"
|
||||
icon="chevron-down"
|
||||
toggle-class="btn-icon js-merge-moment"
|
||||
:toggle-text="__('Select a merge moment')"
|
||||
text-sr-only
|
||||
no-caret
|
||||
>
|
||||
<gl-disclosure-dropdown-item
|
||||
v-if="
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ li.note {
|
|||
|
||||
.gitlab-promo {
|
||||
a {
|
||||
color: $gray-300;
|
||||
@apply gl-text-disabled;
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@
|
|||
flex-direction: column;
|
||||
|
||||
.reference {
|
||||
color: $gray-300;
|
||||
@apply gl-text-disabled;
|
||||
margin-top: $gl-padding-4;
|
||||
}
|
||||
}
|
||||
|
|
@ -826,7 +826,7 @@
|
|||
color: $dropdown-title-btn-color;
|
||||
|
||||
&:hover {
|
||||
color: $gray-300;
|
||||
@apply gl-text-disabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ module StreamDiffs
|
|||
end
|
||||
|
||||
def stream_diff_files(options)
|
||||
return unless resource
|
||||
|
||||
resource.diffs_for_streaming(options).diff_files.each do |diff_file|
|
||||
response.stream.write(render_diff_file(diff_file))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -97,6 +97,18 @@ class Projects::MergeRequests::ApplicationController < Projects::ApplicationCont
|
|||
@commit ||= @project.commit(commit_id)
|
||||
end
|
||||
# rubocop: enable CodeReuse/ActiveRecord
|
||||
|
||||
def build_merge_request
|
||||
params[:merge_request] ||= ActionController::Parameters.new(source_project: @project)
|
||||
new_params = merge_request_params.merge(diff_options: diff_options)
|
||||
|
||||
# Gitaly N+1 issue: https://gitlab.com/gitlab-org/gitlab-foss/issues/58096
|
||||
Gitlab::GitalyClient.allow_n_plus_1_calls do
|
||||
@merge_request = ::MergeRequests::BuildService
|
||||
.new(project: project, current_user: current_user, params: new_params)
|
||||
.execute
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Projects::MergeRequests::ApplicationController.prepend_mod_with('Projects::MergeRequests::ApplicationController')
|
||||
|
|
|
|||
|
|
@ -113,18 +113,6 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap
|
|||
.execute(include_routes: false, include_fork_networks: true, search: params[:search]).limit(20)
|
||||
end
|
||||
|
||||
def build_merge_request
|
||||
params[:merge_request] ||= ActionController::Parameters.new(source_project: @project)
|
||||
new_params = merge_request_params.merge(diff_options: diff_options)
|
||||
|
||||
# Gitaly N+1 issue: https://gitlab.com/gitlab-org/gitlab-foss/issues/58096
|
||||
Gitlab::GitalyClient.allow_n_plus_1_calls do
|
||||
@merge_request = ::MergeRequests::BuildService
|
||||
.new(project: project, current_user: current_user, params: new_params)
|
||||
.execute
|
||||
end
|
||||
end
|
||||
|
||||
def define_new_vars
|
||||
@noteable = @merge_request
|
||||
@target_project = @merge_request.target_project
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Projects
|
||||
module MergeRequests
|
||||
class CreationsDiffsStreamController < Projects::MergeRequests::ApplicationController
|
||||
include StreamDiffs
|
||||
|
||||
skip_before_action :merge_request
|
||||
before_action :authorize_create_merge_request_from!
|
||||
before_action :build_merge_request
|
||||
|
||||
private
|
||||
|
||||
def resource
|
||||
@merge_request.compare if @merge_request.can_be_created
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -211,25 +211,14 @@ class Issue < ApplicationRecord
|
|||
scope :with_issue_type, ->(types) {
|
||||
types = Array(types)
|
||||
|
||||
if Feature.enabled?(:issues_use_correct_work_item_type_id, :instance)
|
||||
# Using != 1 since we also want the guard clause to handle empty arrays
|
||||
return joins(:correct_work_item_type).where(work_item_types: { base_type: types }) if types.size != 1
|
||||
# Using != 1 since we also want the guard clause to handle empty arrays
|
||||
return joins(:correct_work_item_type).where(work_item_types: { base_type: types }) if types.size != 1
|
||||
|
||||
# This optimization helps the planer use the correct indexes when filtering by a single type
|
||||
where(
|
||||
'"issues"."correct_work_item_type_id" = (?)',
|
||||
WorkItems::Type.by_type(types.first).select(:correct_id).limit(1)
|
||||
)
|
||||
else
|
||||
# Using != 1 since we also want the guard clause to handle empty arrays
|
||||
return joins(:work_item_type).where(work_item_types: { base_type: types }) if types.size != 1
|
||||
|
||||
# This optimization helps the planer use the correct indexes when filtering by a single type
|
||||
where(
|
||||
'"issues"."work_item_type_id" = (?)',
|
||||
WorkItems::Type.by_type(types.first).select(:id).limit(1)
|
||||
)
|
||||
end
|
||||
# This optimization helps the planer use the correct indexes when filtering by a single type
|
||||
where(
|
||||
'"issues"."correct_work_item_type_id" = (?)',
|
||||
WorkItems::Type.by_type(types.first).select(:correct_id).limit(1)
|
||||
)
|
||||
}
|
||||
scope :without_issue_type, ->(types) {
|
||||
joins(::Gitlab::Issues::TypeAssociationGetter.call).where.not(work_item_types: { base_type: types })
|
||||
|
|
@ -366,9 +355,7 @@ class Issue < ApplicationRecord
|
|||
|
||||
# TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/499911
|
||||
def work_item_type
|
||||
return correct_work_item_type if Feature.enabled?(:issues_use_correct_work_item_type_id, :instance)
|
||||
|
||||
super
|
||||
correct_work_item_type
|
||||
end
|
||||
|
||||
def work_item_type_id=(input_work_item_type_id)
|
||||
|
|
|
|||
|
|
@ -87,8 +87,6 @@ module WorkItems
|
|||
scope :order_by_name_asc, -> { order(arel_table[:name].lower.asc) }
|
||||
scope :by_type, ->(base_type) { where(base_type: base_type) }
|
||||
scope :with_correct_id_and_fallback, ->(correct_ids) {
|
||||
return id_in(correct_ids) if Feature.disabled?(:issues_set_correct_work_item_type_id, :instance)
|
||||
|
||||
# This shouldn't work for nil ids as we expect newer instances to have NULL values in old_id
|
||||
correct_ids = Array(correct_ids).compact
|
||||
return none if correct_ids.blank?
|
||||
|
|
@ -137,8 +135,6 @@ module WorkItems
|
|||
end
|
||||
|
||||
def to_global_id
|
||||
return super if Feature.disabled?(:issues_set_correct_work_item_type_id, :instance)
|
||||
|
||||
::Gitlab::GlobalId.build(self, id: correct_id)
|
||||
end
|
||||
# Alias necessary here as the Gem uses `alias` to define the `gid` method
|
||||
|
|
|
|||
|
|
@ -56,13 +56,12 @@ module WorkItems
|
|||
private
|
||||
|
||||
def counts_by_state(work_item_type)
|
||||
type_id_column = Feature.enabled?(:issues_use_correct_work_item_type_id, :instance) ? 'correct_id' : 'id'
|
||||
open_count = counts_by_type_and_state.fetch(
|
||||
[work_item_type.attributes[type_id_column], WorkItem.available_states[:opened]],
|
||||
[work_item_type.attributes['correct_id'], WorkItem.available_states[:opened]],
|
||||
0
|
||||
)
|
||||
closed_count = counts_by_type_and_state.fetch(
|
||||
[work_item_type.attributes[type_id_column], WorkItem.available_states[:closed]],
|
||||
[work_item_type.attributes['correct_id'], WorkItem.available_states[:closed]],
|
||||
0
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
- add_to_breadcrumbs _('Pipelines'), project_pipelines_path(@project)
|
||||
- breadcrumb_title "##{@pipeline.id}"
|
||||
- page_title _('Pipeline')
|
||||
- pipeline_has_errors = @pipeline.builds.empty? && @pipeline.yaml_errors.present?
|
||||
- pipeline_has_errors = @pipeline.builds.empty? && @pipeline.error_messages.any?
|
||||
- add_page_specific_style 'page_bundles/pipeline'
|
||||
- add_page_specific_style 'page_bundles/reports'
|
||||
- add_page_specific_style 'page_bundles/ci_status'
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
alert_options: { class: 'gl-mb-5' }) do |c|
|
||||
- c.with_body do
|
||||
%ul
|
||||
- @pipeline.yaml_errors.split("\n").each do |error|
|
||||
- @pipeline.error_messages.pluck(:content).each do |error| # rubocop:disable CodeReuse/ActiveRecord -- done temporarily to drop yaml_errors
|
||||
%li= error
|
||||
- if can_view_pipeline_editor?(@project)
|
||||
= render Pajamas::ButtonComponent.new(href: project_ci_pipeline_editor_path(@project, branch_name: @pipeline.source_ref), variant: :confirm) do
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ module Gitlab
|
|||
|
||||
# Necessary temporarily as new version might process jobs enqueued in old version
|
||||
def ensure_correct_work_item_type(attributes)
|
||||
return attributes if Feature.disabled?(:issues_set_correct_work_item_type_id, :instance)
|
||||
return attributes unless attributes.key?('work_item_type_id')
|
||||
|
||||
work_item_type = ::WorkItems::Type.find_by_correct_id_with_fallback(attributes['work_item_type_id'])
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
name: issues_set_correct_work_item_type_id
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/504064
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/171781
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/504107
|
||||
milestone: '17.7'
|
||||
group: group::project management
|
||||
type: wip
|
||||
default_enabled: false
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
name: issues_use_correct_work_item_type_id
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/493976
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169798
|
||||
rollout_issue_url:
|
||||
milestone: '17.6'
|
||||
group: group::project management
|
||||
type: wip
|
||||
default_enabled: false
|
||||
|
|
@ -94,5 +94,6 @@ scope path: 'merge_requests', controller: 'merge_requests/creations' do
|
|||
get :diff_for_path
|
||||
get :branch_from
|
||||
get :branch_to
|
||||
get :diffs_stream, to: 'merge_requests/creations_diffs_stream#diffs'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ The following GitLab features are deprecated and no longer recommended for use.
|
|||
For advanced searching and filtering of this deprecation information, try
|
||||
[a tool built by our Customer Success team](https://gitlab-com.gitlab.io/cs-tools/gitlab-cs-tools/what-is-new-since/?tab=deprecations).
|
||||
|
||||
[REST API deprecations](https://docs.gitlab.com/ee/api/rest/deprecations.html)
|
||||
and [GraphQL deprecations](https://docs.gitlab.com/ee/api/graphql/removed_items.html)
|
||||
are documented separately.
|
||||
[REST API deprecations](https://docs.gitlab.com/ee/api/rest/deprecations.html) are documented separately.
|
||||
|
||||
**{rss}** **To be notified of upcoming breaking changes**,
|
||||
add this URL to your RSS feed reader: `https://about.gitlab.com/breaking-changes.xml`
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
migration_job_name: BackfillSeatAssignmentsTable
|
||||
description: Backfill subcription_seat_assignments table with namespace memberships data.
|
||||
description: Backfill subscription_seat_assignments table with namespace memberships data.
|
||||
feature_category: seat_cost_management
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/172095
|
||||
milestone: '17.7'
|
||||
queued_migration_version: 20241108133603
|
||||
milestone: '17.8'
|
||||
queued_migration_version: 20241209131010
|
||||
finalized_by: # version of the migration that finalized this BBM
|
||||
|
|
|
|||
|
|
@ -11,17 +11,12 @@ class QueueBackfillSeatAssignmentsTable < Gitlab::Database::Migration[2.2]
|
|||
SUB_BATCH_SIZE = 1000
|
||||
|
||||
def up
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:members,
|
||||
:id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
# no-op, there were invalid records that needs to be fixed.
|
||||
# Fixed by: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174545
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(MIGRATION, :members, :id, [])
|
||||
# no-op, there were invalid records that needs to be fixed.
|
||||
# Fixed by: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174545
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class TruncateSubscriptionSeatAssignments < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.8'
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
truncate_tables!('subscription_seat_assignments')
|
||||
end
|
||||
|
||||
def down
|
||||
# no-op
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class QueueRequeueBackfillSeatAssignmentsTable < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.8'
|
||||
|
||||
restrict_gitlab_migration gitlab_schema: :gitlab_main
|
||||
|
||||
MIGRATION = "BackfillSeatAssignmentsTable"
|
||||
DELAY_INTERVAL = 2.minutes
|
||||
BATCH_SIZE = 10_000
|
||||
SUB_BATCH_SIZE = 1000
|
||||
|
||||
def up
|
||||
delete_batched_background_migration(MIGRATION, :members, :id, [])
|
||||
|
||||
queue_batched_background_migration(
|
||||
MIGRATION,
|
||||
:members,
|
||||
:id,
|
||||
job_interval: DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE,
|
||||
sub_batch_size: SUB_BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
delete_batched_background_migration(MIGRATION, :members, :id, [])
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
267d0f9278b4bb269512f9cc65c5a843ad27d74c03cf862024ba3aebc42e1714
|
||||
|
|
@ -0,0 +1 @@
|
|||
b647e83a95daace95d0d52a78dbbe29e23e3cf2bc98df6766fe1a0ca3e39f746
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ GraphQL is a versionless API, unlike the REST API.
|
|||
Occasionally, items have to be updated or removed from the GraphQL API.
|
||||
According to our [process for removing items](index.md#deprecation-and-removal-process), here are the items that have been removed.
|
||||
|
||||
For deprecations, see the [Deprecations by version page](../../update/deprecations.md).
|
||||
|
||||
## GitLab 17.0
|
||||
|
||||
Fields removed in GitLab 17.0.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Cells Infrastructure
|
||||
info: Analysis of Application Settings for Cells 1.0.
|
||||
---
|
||||
# Application Settings analysis
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Cells Infrastructure
|
||||
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Cells Infrastructure
|
||||
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Cells Infrastructure
|
||||
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -327,8 +327,9 @@ If a report uses a `PATCH` version that doesn't match any vendored schema versio
|
|||
the latest vendored `PATCH` version. For example, if a report version is 15.0.23 and the latest vendored
|
||||
version is 15.0.6, the report is validated against version 15.0.6.
|
||||
|
||||
GitLab uses the [`gitlab-security_report_schemas`](https://rubygems.org/gems/gitlab-security_report_schemas)
|
||||
gem to perform validation. You can see which schema versions are supported in your GitLab version
|
||||
GitLab validates reports against security report JSON schemas
|
||||
it reads from the [`gitlab-security_report_schemas`](https://rubygems.org/gems/gitlab-security_report_schemas)
|
||||
gem. You can see which schema versions are supported in your GitLab version
|
||||
by looking at the version of the gem in your GitLab installation. For example,
|
||||
[GitLab 15.4](https://gitlab.com/gitlab-org/gitlab/-/blob/93a2a651a48bd03d9d84847e1cade19962ab4292/Gemfile#L431)
|
||||
uses version `0.1.2.min15.0.0.max15.2.0`, which means it has versions in the range `15.0.0` and `15.2.0`.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: "See the Technical Writers assigned to Development Guidelines: https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines"
|
||||
description: "Development Guidelines: learn about organization when developing GitLab."
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
stage: Tenant Scale
|
||||
group: Database
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments"
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: For assistance with this tutorial, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects.
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: For assistance with this tutorial, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects.
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ The following GitLab features are deprecated and no longer recommended for use.
|
|||
For advanced searching and filtering of this deprecation information, try
|
||||
[a tool built by our Customer Success team](https://gitlab-com.gitlab.io/cs-tools/gitlab-cs-tools/what-is-new-since/?tab=deprecations).
|
||||
|
||||
[REST API deprecations](https://docs.gitlab.com/ee/api/rest/deprecations.html)
|
||||
and [GraphQL deprecations](https://docs.gitlab.com/ee/api/graphql/removed_items.html)
|
||||
are documented separately.
|
||||
[REST API deprecations](https://docs.gitlab.com/ee/api/rest/deprecations.html) are documented separately.
|
||||
|
||||
**{rss}** **To be notified of upcoming breaking changes**,
|
||||
add this URL to your RSS feed reader: `https://about.gitlab.com/breaking-changes.xml`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -4,21 +4,21 @@ group: Container Registry
|
|||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
# Dependency Proxy
|
||||
# Dependency proxy for container images
|
||||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
|
||||
The GitLab Dependency Proxy is a local proxy you can use for your frequently-accessed
|
||||
The GitLab dependency proxy for container images is a local proxy you can use for your frequently-accessed
|
||||
upstream images.
|
||||
|
||||
In the case of CI/CD, the Dependency Proxy receives a request and returns the
|
||||
In the case of CI/CD, the dependency proxy receives a request and returns the
|
||||
upstream image from a registry, acting as a pull-through cache.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To use the Dependency Proxy, it must be enabled for the GitLab instance. It's enabled by default,
|
||||
To use the dependency proxy for container images, it must be enabled for the GitLab instance. It's enabled by default,
|
||||
but [administrators can turn it off](../../../administration/packages/dependency_proxy.md).
|
||||
|
||||
### Supported images and packages
|
||||
|
|
@ -32,32 +32,32 @@ The following images and packages are supported.
|
|||
For a list of planned additions, view the
|
||||
[direction page](https://about.gitlab.com/direction/package/#dependency-proxy).
|
||||
|
||||
## Enable or turn off the Dependency Proxy for a group
|
||||
## Enable or turn off the dependency proxy for a group
|
||||
|
||||
> - Required role [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/350682) from Developer to Maintainer in GitLab 15.0.
|
||||
> - Required role [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/370471) from Maintainer to Owner in GitLab 17.0.
|
||||
|
||||
To enable or turn off the Dependency Proxy for a group:
|
||||
To enable or turn off the dependency proxy for a group:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your group.
|
||||
1. Select **Settings > Packages and registries**.
|
||||
1. Expand the **Dependency Proxy** section.
|
||||
1. To enable the proxy, turn on **Enable Proxy**. To turn it off, turn the toggle off.
|
||||
|
||||
This setting only affects the Dependency Proxy for a group. Only an administrator can
|
||||
[turn the Dependency Proxy on or off](../../../administration/packages/dependency_proxy.md)
|
||||
This setting only affects the dependency proxy for a group. Only an administrator can
|
||||
[turn the dependency proxy on or off](../../../administration/packages/dependency_proxy.md)
|
||||
for the entire GitLab instance.
|
||||
|
||||
## View the Dependency Proxy
|
||||
## View the dependency proxy for container images
|
||||
|
||||
To view the Dependency Proxy:
|
||||
To view the dependency proxy for container images:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your group.
|
||||
1. Select **Operate > Dependency Proxy**.
|
||||
|
||||
The Dependency Proxy is not available for projects.
|
||||
The dependency proxy is not available for projects.
|
||||
|
||||
## Use the Dependency Proxy for Docker images
|
||||
## Use the dependency proxy for Docker images
|
||||
|
||||
You can use GitLab as a source for your Docker images.
|
||||
|
||||
|
|
@ -65,19 +65,19 @@ Prerequisites:
|
|||
|
||||
- Your images must be stored on [Docker Hub](https://hub.docker.com/).
|
||||
|
||||
### Authenticate with the Dependency Proxy
|
||||
### Authenticate with the dependency proxy for container images
|
||||
|
||||
> - [Removed](https://gitlab.com/gitlab-org/gitlab/-/issues/276777) the feature flag `dependency_proxy_for_private_groups` in GitLab 15.0.
|
||||
> - Support for group access tokens [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/362991) in GitLab 16.3.
|
||||
|
||||
Because the Dependency Proxy is storing Docker images in a space associated with your group,
|
||||
you must authenticate against the Dependency Proxy.
|
||||
Because the dependency proxy for container images is storing Docker images in a space associated with your group,
|
||||
you must authenticate with it.
|
||||
|
||||
Follow the [instructions for using images from a private registry](../../../ci/docker/using_docker_images.md#access-an-image-from-a-private-container-registry),
|
||||
but instead of using `registry.example.com:5000`, use your GitLab domain with no port `gitlab.example.com`.
|
||||
|
||||
NOTE:
|
||||
[Admin Mode](../../../administration/settings/sign_in_restrictions.md#admin-mode) does not apply during authentication with the dependency proxy. If you are an administrator with Admin Mode enabled, and you create a personal access token without the `admin_mode` scope, that token works even though Admin Mode is enabled.
|
||||
[Admin Mode](../../../administration/settings/sign_in_restrictions.md#admin-mode) does not apply during authentication with the dependency proxy for container images. If you are an administrator with Admin Mode enabled, and you create a personal access token without the `admin_mode` scope, that token works even though Admin Mode is enabled.
|
||||
|
||||
For example, to manually sign in:
|
||||
|
||||
|
|
@ -92,10 +92,10 @@ You can authenticate using:
|
|||
- A [group deploy token](../../../user/project/deploy_tokens/index.md) with the scope set to `read_registry` and `write_registry`.
|
||||
- A [group access token](../../../user/group/settings/group_access_tokens.md) for the group, with the scope set to `read_registry` and `write_registry`, or to `api`.
|
||||
|
||||
Users accessing the Dependency Proxy with a personal access token or username and password must
|
||||
Users accessing the dependency proxy for container images with a personal access token or username and password must
|
||||
have at least the Guest role for the group they pull images from.
|
||||
|
||||
The Dependency Proxy follows the [Docker v2 token authentication flow](https://distribution.github.io/distribution/spec/auth/token/),
|
||||
The dependency proxy for container images follows the [Docker v2 token authentication flow](https://distribution.github.io/distribution/spec/auth/token/),
|
||||
issuing the client a JWT to use for the pull requests. The JWT issued as a result of authenticating
|
||||
expires after some time. When the token expires, most Docker clients store your credentials and
|
||||
automatically request a new token without further action.
|
||||
|
|
@ -106,17 +106,16 @@ On GitLab.com, the expiration time is 15 minutes.
|
|||
#### SAML SSO
|
||||
|
||||
When [SSO enforcement](../../group/saml_sso/index.md#sso-enforcement)
|
||||
is enabled, users must be signed-in through SSO before they can pull images through the Dependency
|
||||
Proxy.
|
||||
is enabled, users must be signed-in through SSO before they can pull images through the dependency proxy for container images.
|
||||
|
||||
SSO enforcement also affects [auto-merge](../../project/merge_requests/auto_merge.md).
|
||||
If an SSO session expires before the auto-merge triggers, the merge pipeline fails
|
||||
to pull images through the Dependency Proxy.
|
||||
to pull images through the dependency proxy.
|
||||
|
||||
#### Authenticate within CI/CD
|
||||
|
||||
Runners sign in to the Dependency Proxy automatically. To pull through
|
||||
the Dependency Proxy, use one of the [predefined variables](../../../ci/variables/predefined_variables.md):
|
||||
Runners sign in to the dependency proxy for container images automatically. To pull through
|
||||
the dependency proxy, use one of the [predefined variables](../../../ci/variables/predefined_variables.md):
|
||||
|
||||
- `CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX` pulls through the top-level group.
|
||||
- `CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX` pulls through the subgroup, or direct group the
|
||||
|
|
@ -131,9 +130,9 @@ image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest
|
|||
|
||||
There are other additional predefined CI/CD variables you can also use:
|
||||
|
||||
- `CI_DEPENDENCY_PROXY_USER`: A CI/CD user for logging in to the Dependency Proxy.
|
||||
- `CI_DEPENDENCY_PROXY_PASSWORD`: A CI/CD password for logging in to the Dependency Proxy.
|
||||
- `CI_DEPENDENCY_PROXY_SERVER`: The server for logging in to the Dependency Proxy.
|
||||
- `CI_DEPENDENCY_PROXY_USER`: A CI/CD user for logging in to the dependency proxy.
|
||||
- `CI_DEPENDENCY_PROXY_PASSWORD`: A CI/CD password for logging in to the dependency proxy
|
||||
- `CI_DEPENDENCY_PROXY_SERVER`: The server for logging in to the dependency proxy.
|
||||
- `CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX`: the image prefix for pulling images through the
|
||||
dependency proxy from the top-level group.
|
||||
- `CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX`: the image prefix for pulling images through the
|
||||
|
|
@ -141,15 +140,14 @@ There are other additional predefined CI/CD variables you can also use:
|
|||
|
||||
`CI_DEPENDENCY_PROXY_SERVER`, `CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX`, and
|
||||
`CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX`
|
||||
include the server port. If you explicitly include the Dependency Proxy
|
||||
path, the port must be included, unless you have logged into the Dependency
|
||||
Proxy manually without including the port:
|
||||
include the server port. If you explicitly include the dependency proxy
|
||||
path, the port must be included, unless you have logged into the dependency proxy manually without including the port:
|
||||
|
||||
```shell
|
||||
docker pull gitlab.example.com:443/my-group/dependency_proxy/containers/alpine:latest
|
||||
```
|
||||
|
||||
Example when using the Dependency Proxy to build an image:
|
||||
Example when using the dependency proxy to build an image:
|
||||
|
||||
```plaintext
|
||||
# Dockerfile
|
||||
|
|
@ -177,9 +175,9 @@ build:
|
|||
|
||||
You can also use [custom CI/CD variables](../../../ci/variables/index.md#for-a-project) to store and access your personal access token or deploy token.
|
||||
|
||||
### Store a Docker image in Dependency Proxy cache
|
||||
### Store a Docker image in dependency proxy cache
|
||||
|
||||
To store a Docker image in Dependency Proxy storage:
|
||||
To store a Docker image in dependency proxy storage:
|
||||
|
||||
1. On the left sidebar, select **Search or go to** and find your group.
|
||||
1. Select **Operate > Dependency Proxy**.
|
||||
|
|
@ -218,19 +216,19 @@ from the GitLab server.
|
|||
|
||||
## Reduce storage usage
|
||||
|
||||
For information on reducing your storage use on the Dependency Proxy, see
|
||||
[Reduce Dependency Proxy storage use](reduce_dependency_proxy_storage.md).
|
||||
For information on reducing your storage use on the dependency proxy for container images, see
|
||||
[Reduce dependency proxy storage use](reduce_dependency_proxy_storage.md).
|
||||
|
||||
## Docker Hub rate limits and the Dependency Proxy
|
||||
## Docker Hub rate limits and the dependency proxy
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
Watch how to [use the Dependency Proxy to help avoid Docker Hub rate limits](https://youtu.be/Nc4nUo7Pq08).
|
||||
Watch how to [use the dependency proxy to help avoid Docker Hub rate limits](https://youtu.be/Nc4nUo7Pq08).
|
||||
|
||||
In November 2020, Docker introduced
|
||||
[rate limits on pull requests from Docker Hub](https://docs.docker.com/docker-hub/download-rate-limit/).
|
||||
If your GitLab [CI/CD configuration](../../../ci/index.md) uses
|
||||
an image from Docker Hub, each time a job runs, it may count as a pull request.
|
||||
To help get around this limit, you can pull your image from the Dependency Proxy cache instead.
|
||||
To help get around this limit, you can pull your image from the dependency proxy cache instead.
|
||||
|
||||
When you pull an image (by using a command like `docker pull` or, in a `.gitlab-ci.yml`
|
||||
file, `image: foo:latest`), the Docker client makes a collection of requests:
|
||||
|
|
@ -240,7 +238,7 @@ file, `image: foo:latest`), the Docker client makes a collection of requests:
|
|||
1. Using the manifest, the Docker client requests a collection of layers, also
|
||||
known as blobs, one at a time.
|
||||
|
||||
The Docker Hub rate limit is based on the number of GET requests for the manifest. The Dependency Proxy
|
||||
The Docker Hub rate limit is based on the number of GET requests for the manifest. The dependency proxy
|
||||
caches both the manifest and blobs for a given image, so when you request it again,
|
||||
Docker Hub does not have to be contacted.
|
||||
|
||||
|
|
@ -248,18 +246,18 @@ Docker Hub does not have to be contacted.
|
|||
|
||||
If you are using an image tag like `alpine:latest`, the image changes
|
||||
over time. Each time it changes, the manifest contains different information about which
|
||||
blobs to request. The Dependency Proxy does not pull a new image each time the
|
||||
blobs to request. The dependency proxy does not pull a new image each time the
|
||||
manifest changes; it checks only when the manifest becomes stale.
|
||||
|
||||
Docker does not count HEAD requests for the image manifest towards the rate limit.
|
||||
You can make a HEAD request for `alpine:latest`, view the digest (checksum)
|
||||
value returned in the header, and determine if a manifest has changed.
|
||||
|
||||
The Dependency Proxy starts all requests with a HEAD request. If the manifest
|
||||
The dependency proxy starts all requests with a HEAD request. If the manifest
|
||||
has become stale, only then is a new image pulled.
|
||||
|
||||
For example, if your pipeline pulls `node:latest` every five
|
||||
minutes, the Dependency Proxy caches the entire image and only updates it if
|
||||
minutes, the dependency proxy caches the entire image and only updates it if
|
||||
`node:latest` changes. So instead of having 360 requests for the image in six hours
|
||||
(which exceeds the Docker Hub rate limit), you only have one pull request, unless
|
||||
the manifest changed during that time.
|
||||
|
|
@ -305,9 +303,9 @@ hub_docker_quota_check:
|
|||
|
||||
### Authentication error: "HTTP Basic: Access Denied"
|
||||
|
||||
If you receive an `HTTP Basic: Access denied` error when authenticating against the Dependency Proxy, refer to the [two-factor authentication troubleshooting guide](../../profile/account/two_factor_authentication_troubleshooting.md).
|
||||
If you receive an `HTTP Basic: Access denied` error when authenticating against the dependency proxy, refer to the [two-factor authentication troubleshooting guide](../../profile/account/two_factor_authentication_troubleshooting.md).
|
||||
|
||||
### Dependency Proxy Connection Failure
|
||||
### Dependency proxy connection failure
|
||||
|
||||
If a service alias is not set the `docker:20.10.16` image is unable to find the
|
||||
`dind` service, and an error like the following is thrown:
|
||||
|
|
@ -324,13 +322,13 @@ services:
|
|||
alias: docker
|
||||
```
|
||||
|
||||
### Issues when authenticating to the Dependency Proxy from CI/CD jobs
|
||||
### Issues when authenticating to the dependency proxy from CI/CD jobs
|
||||
|
||||
GitLab Runner authenticates automatically to the Dependency Proxy. However, the underlying Docker engine is still subject to its [authorization resolving process](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#precedence-of-docker-authorization-resolving).
|
||||
GitLab Runner authenticates automatically to the dependency proxy. However, the underlying Docker engine is still subject to its [authorization resolving process](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#precedence-of-docker-authorization-resolving).
|
||||
|
||||
Misconfigurations in the authentication mechanism may cause `HTTP Basic: Access denied` and `403: Access forbidden` errors.
|
||||
|
||||
You can use the job logs to view the authentication mechanism used to authenticate against the Dependency Proxy:
|
||||
You can use the job logs to view the authentication mechanism used to authenticate against the dependency proxy:
|
||||
|
||||
```plaintext
|
||||
Authenticating with credentials from $DOCKER_AUTH_CONFIG
|
||||
|
|
@ -349,7 +347,7 @@ Make sure you are using the expected authentication mechanism.
|
|||
### `Not Found` or `404` error when pulling image
|
||||
|
||||
Errors like these might indicate that the user running the job doesn't have
|
||||
a minimum of the Guest role for the Dependency Proxy group:
|
||||
a minimum of the Guest role for the dependency proxy group:
|
||||
|
||||
- ```plaintext
|
||||
ERROR: gitlab.example.com:443/group1/dependency_proxy/containers/alpine:latest: not found
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ group: Container Registry
|
|||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
# Reduce Dependency Proxy Storage
|
||||
# Reduce dependency proxy storage for container images
|
||||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
|
|
@ -13,14 +13,14 @@ DETAILS:
|
|||
There's no automatic removal process for blobs. Unless you delete them manually, they're stored
|
||||
indefinitely. This page covers several options for clearing unused items from the cache.
|
||||
|
||||
## Check Dependency Proxy Storage Use
|
||||
## Check dependency proxy storage use
|
||||
|
||||
The [**Usage Quotas**](../../storage_usage_quotas.md) page displays storage usage for the dependency proxy.
|
||||
The [**Usage Quotas**](../../storage_usage_quotas.md) page displays storage usage for the dependency proxy for container images.
|
||||
|
||||
## Use the API to clear the cache
|
||||
|
||||
To reclaim disk space used by image blobs that are no longer needed, use the
|
||||
[Dependency Proxy API](../../../api/dependency_proxy.md)
|
||||
[dependency proxy API](../../../api/dependency_proxy.md)
|
||||
to clear the entire cache. If you clear the cache, the next time a pipeline runs it must pull an
|
||||
image or tag from Docker Hub.
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ image or tag from Docker Hub.
|
|||
|
||||
### Enable cleanup policies from within GitLab
|
||||
|
||||
You can enable an automatic time-to-live (TTL) policy for the Dependency Proxy from the user
|
||||
You can enable an automatic time-to-live (TTL) policy for the dependency proxy for container images from the user
|
||||
interface. To do this, go to your group's **Settings > Packages and registries > Dependency Proxy**
|
||||
and enable the setting to automatically clear items from the cache after 90 days.
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ Instead you can authenticate:
|
|||
- For Git requests over HTTP(S), a PAT with `read_repository` or `write_repository` scope is required.
|
||||
- For [GitLab container registry](../../packages/container_registry/authenticate_with_container_registry.md) requests, a PAT
|
||||
with `read_registry` or `write_registry` scope is required.
|
||||
- For [Dependency Proxy](../../packages/dependency_proxy/index.md#authenticate-with-the-dependency-proxy) requests, a PAT with
|
||||
- For [dependency proxy](../../packages/dependency_proxy/index.md#authenticate-with-the-dependency-proxy-for-container-images) requests, a PAT with
|
||||
`read_registry` and `write_registry` scopes is required.
|
||||
- If you have configured LDAP, using an [LDAP password](../../../administration/auth/ldap/index.md)
|
||||
- Using an [OAuth credential helper](../../profile/account/two_factor_authentication.md#oauth-credential-helpers).
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments"
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
description: Project visibility, search, badges, layout.
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: 'To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments'
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments"
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments"
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
stage: Data Stores
|
||||
group: Tenant Scale
|
||||
stage: Tenant Scale
|
||||
group: Organizations
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,7 @@ module Gitlab
|
|||
module Issues
|
||||
module TypeAssociationGetter
|
||||
def self.call
|
||||
if Feature.enabled?(:issues_use_correct_work_item_type_id, :instance)
|
||||
:correct_work_item_type
|
||||
else
|
||||
:work_item_type
|
||||
end
|
||||
:correct_work_item_type
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ module Gitlab
|
|||
end
|
||||
|
||||
def execute
|
||||
attributes = {
|
||||
{
|
||||
iid: params[:iid],
|
||||
project_id: project.id,
|
||||
namespace_id: project.project_namespace_id,
|
||||
|
|
@ -26,16 +26,9 @@ module Gitlab
|
|||
created_at: jira_issue.created,
|
||||
author_id: reporter,
|
||||
assignee_ids: assignees,
|
||||
label_ids: label_ids
|
||||
label_ids: label_ids,
|
||||
correct_work_item_type_id: @work_item_type.correct_id
|
||||
}
|
||||
|
||||
if Feature.enabled?(:issues_set_correct_work_item_type_id, :instance)
|
||||
attributes[:correct_work_item_type_id] = @work_item_type.correct_id
|
||||
else
|
||||
attributes[:work_item_type_id] = @work_item_type.id
|
||||
end
|
||||
|
||||
attributes
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
|
|
@ -356,8 +356,8 @@ class ApplicationSettingsAnalysis
|
|||
|
||||
DOC_PAGE_HEADERS = [
|
||||
"---",
|
||||
"stage: Data Stores",
|
||||
"group: Tenant Scale",
|
||||
"stage: Tenant Scale",
|
||||
"group: Cells Infrastructure",
|
||||
"info: Analysis of Application Settings for Cells 1.0.",
|
||||
"---",
|
||||
"# Application Settings analysis\n",
|
||||
|
|
|
|||
|
|
@ -119,20 +119,4 @@ RSpec.describe 'Profile > Active Sessions', :clean_gitlab_redis_shared_state, fe
|
|||
expect(page).to have_content('You need to sign in or sign up before continuing.')
|
||||
end
|
||||
end
|
||||
|
||||
it 'load_raw_session does load known attributes only' do
|
||||
new_session = ActiveSession.send(:load_raw_session,
|
||||
'v2:{"ip_address": "127.0.0.1", "browser": "Firefox", "os": "Debian",' \
|
||||
'"device_type": "desktop", "session_id": "8f62cc7383c",' \
|
||||
'"new_attribute": "unknown attribute"}'
|
||||
)
|
||||
|
||||
expect(new_session).to have_attributes(
|
||||
ip_address: "127.0.0.1",
|
||||
browser: "Firefox",
|
||||
os: "Debian",
|
||||
device_type: "desktop",
|
||||
session_id: "8f62cc7383c"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -61,9 +61,7 @@ describe('content/components/wrappers/table_cell_base', () => {
|
|||
|
||||
expect(findDropdown().props()).toMatchObject({
|
||||
category: 'tertiary',
|
||||
icon: 'chevron-down',
|
||||
size: 'small',
|
||||
noCaret: true,
|
||||
});
|
||||
expect(findDropdown().attributes()).toMatchObject({
|
||||
boundary: 'viewport',
|
||||
|
|
|
|||
|
|
@ -7,13 +7,5 @@ RSpec.describe Gitlab::Issues::TypeAssociationGetter, feature_category: :team_pl
|
|||
subject { described_class.call }
|
||||
|
||||
it { is_expected.to eq(:correct_work_item_type) }
|
||||
|
||||
context 'when issues_use_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_use_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it { is_expected.to eq(:work_item_type) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -88,29 +88,6 @@ RSpec.describe Gitlab::JiraImport::IssueSerializer do
|
|||
)
|
||||
end
|
||||
|
||||
context 'when the issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it 'sets work_item_type_id' do
|
||||
expect(subject).to include(
|
||||
iid: iid,
|
||||
project_id: project.id,
|
||||
namespace_id: project.project_namespace_id,
|
||||
description: expected_description.strip,
|
||||
title: "[#{key}] #{summary}",
|
||||
state_id: 1,
|
||||
updated_at: updated_at,
|
||||
created_at: created_at,
|
||||
author_id: current_user.id,
|
||||
assignee_ids: nil,
|
||||
label_ids: [project_label.id, group_label.id] + Label.reorder(id: :asc).last(2).pluck(:id),
|
||||
work_item_type_id: issue_type.id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
it 'creates a hash for valid issue' do
|
||||
expect(Issue.new(subject)).to be_valid
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,21 +6,14 @@ require_migration!
|
|||
RSpec.describe QueueBackfillSeatAssignmentsTable, migration: :gitlab_main, feature_category: :seat_cost_management do
|
||||
let!(:batched_migration) { described_class::MIGRATION }
|
||||
|
||||
it 'schedules a new batched migration' do
|
||||
it 'does nothing' do
|
||||
reversible_migration do |migration|
|
||||
migration.before -> {
|
||||
expect(batched_migration).not_to have_scheduled_batched_migration
|
||||
}
|
||||
|
||||
migration.after -> {
|
||||
expect(batched_migration).to have_scheduled_batched_migration(
|
||||
gitlab_schema: :gitlab_main,
|
||||
table_name: :members,
|
||||
column_name: :id,
|
||||
interval: described_class::DELAY_INTERVAL,
|
||||
batch_size: described_class::BATCH_SIZE,
|
||||
sub_batch_size: described_class::SUB_BATCH_SIZE
|
||||
)
|
||||
expect(batched_migration).not_to have_scheduled_batched_migration
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
require_migration!
|
||||
|
||||
RSpec.describe QueueRequeueBackfillSeatAssignmentsTable, migration: :gitlab_main, feature_category: :seat_cost_management do
|
||||
let!(:batched_migration) { described_class::MIGRATION }
|
||||
|
||||
it 'schedules a new batched migration' do
|
||||
reversible_migration do |migration|
|
||||
migration.before -> {
|
||||
expect(batched_migration).not_to have_scheduled_batched_migration
|
||||
}
|
||||
|
||||
migration.after -> {
|
||||
expect(batched_migration).to have_scheduled_batched_migration(
|
||||
gitlab_schema: :gitlab_main,
|
||||
table_name: :members,
|
||||
column_name: :id,
|
||||
interval: described_class::DELAY_INTERVAL,
|
||||
batch_size: described_class::BATCH_SIZE,
|
||||
sub_batch_size: described_class::SUB_BATCH_SIZE
|
||||
)
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe ActiveSession, :clean_gitlab_redis_sessions do
|
||||
RSpec.describe ActiveSession, :clean_gitlab_redis_sessions, feature_category: :system_access do
|
||||
let(:lookup_key) { described_class.lookup_key_name(user.id) }
|
||||
let(:user) do
|
||||
create(:user).tap do |user|
|
||||
|
|
@ -79,6 +79,10 @@ RSpec.describe ActiveSession, :clean_gitlab_redis_sessions do
|
|||
)
|
||||
end
|
||||
|
||||
it 'returns an empty array if the user does not have any active session' do
|
||||
expect(described_class.list(user)).to be_empty
|
||||
end
|
||||
|
||||
shared_examples 'ignoring obsolete entries' do
|
||||
let(:session_id) { '6919a6f1bb119dd7396fadc38fd18d0d' }
|
||||
let(:session) { described_class.new(session_id: 'a') }
|
||||
|
|
@ -116,10 +120,34 @@ RSpec.describe ActiveSession, :clean_gitlab_redis_sessions do
|
|||
let(:serialized_session) { session.dump }
|
||||
|
||||
it_behaves_like 'ignoring obsolete entries'
|
||||
end
|
||||
|
||||
it 'returns an empty array if the user does not have any active session' do
|
||||
expect(described_class.list(user)).to be_empty
|
||||
context 'when the current session contains unknown attributes' do
|
||||
let(:session_id) { '8f62cc7383c' }
|
||||
let(:session_key) { described_class.key_name(user.id, session_id) }
|
||||
let(:serialized_session) do
|
||||
"v2:{\"ip_address\": \"127.0.0.1\", \"browser\": \"Firefox\", \"os\": \"Debian\", " \
|
||||
"\"device_type\": \"desktop\", \"session_id\": \"#{session_id}\", " \
|
||||
"\"new_attribute\": \"unknown attribute\"}"
|
||||
end
|
||||
|
||||
it 'loads known attributes only' do
|
||||
Gitlab::Redis::Sessions.with do |redis|
|
||||
redis.set(session_key, serialized_session)
|
||||
redis.sadd(lookup_key, [session_id])
|
||||
end
|
||||
|
||||
expect(described_class.list(user)).to contain_exactly(
|
||||
have_attributes(
|
||||
ip_address: "127.0.0.1",
|
||||
browser: "Firefox",
|
||||
os: "Debian",
|
||||
device_type: "desktop",
|
||||
session_id: session_id.to_s
|
||||
)
|
||||
)
|
||||
expect(described_class.list(user).first).not_to respond_to :new_attribute
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -565,23 +565,6 @@ RSpec.describe Issue, feature_category: :team_planning do
|
|||
}x
|
||||
)
|
||||
end
|
||||
|
||||
context 'when issues_use_correct_work_item_type_id FF is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_use_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it 'joins the work_item_types table for filtering with issues.work_item_type_id column' do
|
||||
expect do
|
||||
described_class.with_issue_type([:issue, :incident]).to_a
|
||||
end.to make_queries_matching(
|
||||
%r{
|
||||
INNER\sJOIN\s"work_item_types"\sON\s"work_item_types"\."id"\s=\s"issues"\."work_item_type_id"
|
||||
\sWHERE\s"work_item_types"\."base_type"\sIN\s\(0,\s1\)
|
||||
}x
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when a single issue_type is provided' do
|
||||
|
|
@ -597,24 +580,6 @@ RSpec.describe Issue, feature_category: :team_planning do
|
|||
}x
|
||||
)
|
||||
end
|
||||
|
||||
context 'when issues_use_correct_work_item_type_id FF is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_use_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it 'uses an optimized query for a single work item type using issues.work_item_type_id column' do
|
||||
expect do
|
||||
described_class.with_issue_type([:incident]).to_a
|
||||
end.to make_queries_matching(
|
||||
%r{
|
||||
WHERE\s\("issues"\."work_item_type_id"\s=
|
||||
\s\(SELECT\s"work_item_types"\."id"\sFROM\s"work_item_types"\sWHERE\s"work_item_types"\."base_type"\s=\s1
|
||||
\sLIMIT\s1\)\)
|
||||
}x
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when no types are provided' do
|
||||
|
|
@ -649,23 +614,6 @@ RSpec.describe Issue, feature_category: :team_planning do
|
|||
}x
|
||||
)
|
||||
end
|
||||
|
||||
context 'when issues_use_correct_work_item_type_id FF is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_use_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it 'uses the work_item_types table and issues.work_item_type_id for filtering' do
|
||||
expect do
|
||||
described_class.without_issue_type(:issue).to_a
|
||||
end.to make_queries_matching(
|
||||
%r{
|
||||
INNER\sJOIN\s"work_item_types"\sON\s"work_item_types"\."id"\s=\s"issues"\."work_item_type_id"
|
||||
\sWHERE\s"work_item_types"\."base_type"\s!=\s0
|
||||
}x
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '.order_severity' do
|
||||
|
|
@ -2649,18 +2597,6 @@ RSpec.describe Issue, feature_category: :team_planning do
|
|||
issue.work_item_type
|
||||
end.to make_queries_matching(/FROM "work_item_types" WHERE "work_item_types"\."correct_id" =/)
|
||||
end
|
||||
|
||||
context 'when the issues_use_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_use_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it 'uses the work_item_type_id column to fetch the associated type' do
|
||||
expect do
|
||||
issue.work_item_type
|
||||
end.to make_queries_matching(/FROM "work_item_types" WHERE "work_item_types"\."id" =/)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#work_item_type_id=', :aggregate_failures do
|
||||
|
|
@ -2708,36 +2644,6 @@ RSpec.describe Issue, feature_category: :team_planning do
|
|||
expect(issue.correct_work_item_type_id).to eq(type1.correct_id)
|
||||
end
|
||||
|
||||
context 'when issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it 'does not find the type by correct_id' do
|
||||
issue = build(:issue, project: reusable_project, work_item_type: nil)
|
||||
|
||||
expect(issue.work_item_type_id).to be_nil
|
||||
expect(issue.correct_work_item_type_id).to be_nil
|
||||
|
||||
issue.work_item_type_id = type1.correct_id
|
||||
|
||||
expect(issue.work_item_type_id).to be_nil
|
||||
expect(issue.correct_work_item_type_id).to be_nil
|
||||
end
|
||||
|
||||
it 'also sets correct_work_item_type_id when setting id' do
|
||||
issue = build(:issue, project: reusable_project, work_item_type: nil)
|
||||
|
||||
expect(issue.work_item_type_id).to be_nil
|
||||
expect(issue.correct_work_item_type_id).to be_nil
|
||||
|
||||
issue.work_item_type_id = type1.id
|
||||
|
||||
expect(issue.work_item_type_id).to eq(type1.id)
|
||||
expect(issue.correct_work_item_type_id).to eq(type1.correct_id)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when work_item_type_id does not exist in the DB' do
|
||||
it 'does not set type id values' do
|
||||
issue = build(:issue, project: reusable_project, work_item_type: nil)
|
||||
|
|
|
|||
|
|
@ -9,18 +9,6 @@ RSpec.describe WorkItems::Type, feature_category: :team_planning do
|
|||
GlobalID.new(type.public_send(gid_method).to_s).model_id.to_i
|
||||
).to eq(type.attributes['correct_id'])
|
||||
end
|
||||
|
||||
context 'when issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it 'uses the id column for global ids' do
|
||||
expect(
|
||||
GlobalID.new(type.public_send(gid_method).to_s).model_id.to_i
|
||||
).to eq(type.attributes['id'])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'modules' do
|
||||
|
|
@ -134,42 +122,18 @@ RSpec.describe WorkItems::Type, feature_category: :team_planning do
|
|||
let(:ids_for_scope) { nil }
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
|
||||
context 'when issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when ids are empty array' do
|
||||
let(:ids_for_scope) { [] }
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
|
||||
context 'when issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when using old ids' do
|
||||
let(:ids_for_scope) { [type1, type2].map(&:old_id) }
|
||||
|
||||
it { is_expected.to contain_exactly(type1, type2) }
|
||||
|
||||
context 'when issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when using correct ids' do
|
||||
|
|
@ -177,42 +141,18 @@ RSpec.describe WorkItems::Type, feature_category: :team_planning do
|
|||
|
||||
# type3 only gets matched because it's old_id matches type2.correct_id
|
||||
it { is_expected.to contain_exactly(type1, type2, type3) }
|
||||
|
||||
context 'when issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when using correct ids but another type has the same old_id value' do
|
||||
let(:ids_for_scope) { [type2].map(&:correct_id) }
|
||||
|
||||
it { is_expected.to contain_exactly(type2, type3) }
|
||||
|
||||
context 'when issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when using ids' do
|
||||
let(:ids_for_scope) { [type1, type2].map(&:id) }
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
|
||||
context 'when issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it { is_expected.to contain_exactly(type1, type2) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe 'Merge Request Creations diffs stream', feature_category: :code_review_workflow do
|
||||
let_it_be(:project) { create(:project, :public, :repository) }
|
||||
let_it_be(:user) { create(:user, maintainer_of: project) }
|
||||
let_it_be(:source_branch) { 'fix' }
|
||||
let_it_be(:target_branch) { 'master' }
|
||||
|
||||
let_it_be(:compare) do
|
||||
CompareService.new(
|
||||
project,
|
||||
source_branch
|
||||
).execute(
|
||||
project,
|
||||
target_branch
|
||||
)
|
||||
end
|
||||
|
||||
let_it_be(:offset) { 0 }
|
||||
let_it_be(:diff_files) { compare.diffs.diff_files }
|
||||
|
||||
before do
|
||||
sign_in(user)
|
||||
end
|
||||
|
||||
describe 'GET diffs_stream' do
|
||||
def send_request(**extra_params)
|
||||
params = {
|
||||
namespace_id: project.namespace,
|
||||
project_id: project,
|
||||
offset: offset,
|
||||
merge_request: {
|
||||
source_branch: source_branch,
|
||||
target_branch: target_branch
|
||||
}
|
||||
}
|
||||
|
||||
get namespace_project_new_merge_request_diffs_stream_path(params.merge(extra_params))
|
||||
end
|
||||
|
||||
it 'includes all diffs' do
|
||||
send_request
|
||||
|
||||
streamed_content = response.body
|
||||
|
||||
diff_files.each do |diff_file|
|
||||
expect(streamed_content).to include(diff_file.new_path)
|
||||
end
|
||||
end
|
||||
|
||||
include_examples 'diffs stream tests'
|
||||
|
||||
context 'when user does not access to create merge request' do
|
||||
let(:user) { create(:user) }
|
||||
|
||||
it 'returns a 404 status' do
|
||||
send_request
|
||||
|
||||
expect(response).to have_gitlab_http_status(:not_found)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when merge request cannot be created' do
|
||||
before do
|
||||
allow_next_instance_of(MergeRequest) do |instance|
|
||||
allow(instance).to receive(:can_be_created).and_return(false)
|
||||
end
|
||||
end
|
||||
|
||||
it 'no diffs are streamed' do
|
||||
send_request
|
||||
|
||||
expect(response.body).to be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -39,18 +39,6 @@ RSpec.shared_examples 'graphql work item type list request spec' do |context_nam
|
|||
expect(ids_from_response).to match_array(WorkItems::Type.pluck(:correct_id))
|
||||
end
|
||||
|
||||
context 'when issues_set_correct_work_item_type_id feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(issues_set_correct_work_item_type_id: false)
|
||||
end
|
||||
|
||||
it 'exposes id in the API through the id field' do
|
||||
post_graphql(query, current_user: current_user)
|
||||
|
||||
expect(ids_from_response).to match_array(WorkItems::Type.pluck(:id))
|
||||
end
|
||||
end
|
||||
|
||||
it 'prevents N+1 queries' do
|
||||
# Destroy 2 existing types
|
||||
WorkItems::Type.by_type([:issue, :task]).delete_all
|
||||
|
|
|
|||
|
|
@ -4,21 +4,21 @@ require 'spec_helper'
|
|||
|
||||
RSpec.describe 'projects/pipelines/show', feature_category: :pipeline_composition do
|
||||
include Devise::Test::ControllerHelpers
|
||||
|
||||
let_it_be(:project) { create(:project, :repository) }
|
||||
let_it_be(:user) { create(:user) }
|
||||
|
||||
let(:pipeline) { create(:ci_pipeline, project: project) }
|
||||
let(:presented_pipeline) { pipeline.present(current_user: user) }
|
||||
|
||||
before do
|
||||
allow(view).to receive(:current_user) { user }
|
||||
assign(:project, project)
|
||||
assign(:pipeline, presented_pipeline)
|
||||
allow(view).to receive(:current_user) { user }
|
||||
end
|
||||
|
||||
context 'when pipeline has errors' do
|
||||
before do
|
||||
allow(pipeline).to receive(:yaml_errors).and_return('some errors')
|
||||
create(:ci_pipeline_message, pipeline: pipeline, content: 'some errors', severity: :error)
|
||||
end
|
||||
|
||||
it 'shows errors' do
|
||||
|
|
@ -51,7 +51,7 @@ RSpec.describe 'projects/pipelines/show', feature_category: :pipeline_compositio
|
|||
end
|
||||
end
|
||||
|
||||
context 'when pipeline is valid' do
|
||||
context 'when pipeline does not have errors' do
|
||||
it 'does not show errors' do
|
||||
render
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue