Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-01-08 06:07:15 +00:00
parent e7dc35bfd6
commit 80abbcbeaf
20 changed files with 924 additions and 74 deletions

View File

@ -0,0 +1,11 @@
# frozen_string_literal: true
module Namespaces
class Descendants < ApplicationRecord
self.table_name = :namespace_descendants
belongs_to :namespace
validates :namespace_id, uniqueness: true
end
end

View File

@ -303,6 +303,10 @@ class User < MainClusterwide::ApplicationRecord
# Validations
#
# Note: devise :validatable above adds validations for :email and :password
validates :username,
presence: true,
exclusion: { in: Gitlab::PathRegex::TOP_LEVEL_ROUTES, message: N_('%{value} is a reserved name') }
validates :username, uniqueness: true, unless: :namespace
validates :name, presence: true, length: { maximum: 255 }
validates :first_name, length: { maximum: 127 }
validates :last_name, length: { maximum: 127 }
@ -313,7 +317,6 @@ class User < MainClusterwide::ApplicationRecord
validates :projects_limit,
presence: true,
numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: Gitlab::Database::MAX_INT_VALUE }
validates :username, presence: true
validate :check_password_weakness, if: :encrypted_password_changed?
validates :namespace, presence: true, unless: :optional_namespace?
@ -1643,6 +1646,9 @@ class User < MainClusterwide::ApplicationRecord
self.errors.add(:base, :username_exists_as_a_different_namespace)
else
namespace_path_errors.each do |msg|
# Already handled by username validation.
next if msg.ends_with?('is a reserved name')
self.errors.add(:username, msg)
end
end

View File

@ -0,0 +1,12 @@
---
table_name: namespace_descendants
classes:
- Namespaces::Descendants
feature_categories:
- groups_and_projects
description: Storing de-normalized descendant ids for Namespace records
introduced_by_url:
milestone: '16.8'
gitlab_schema: gitlab_main_cell
sharding_key:
namespace_id: namespaces

View File

@ -0,0 +1,35 @@
# frozen_string_literal: true
class CreateNamespaceDescendantsTable < Gitlab::Database::Migration[2.2]
include Gitlab::Database::PartitioningMigrationHelpers::TableManagementHelpers
milestone '16.8'
def up
execute <<~SQL
CREATE TABLE namespace_descendants (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] NOT NULL DEFAULT ARRAY[]::bigint[],
all_project_ids bigint[] NOT NULL DEFAULT ARRAY[]::bigint[],
traversal_ids bigint[] NOT NULL DEFAULT ARRAY[]::bigint[],
outdated_at timestamp with time zone,
calculated_at timestamp with time zone,
PRIMARY KEY(namespace_id)
)
PARTITION BY HASH (namespace_id);
SQL
execute <<~SQL
CREATE INDEX
index_on_namespace_descendants_outdated
ON namespace_descendants (namespace_id)
WHERE outdated_at IS NOT NULL
SQL
create_hash_partitions(:namespace_descendants, 32)
end
def down
drop_table :namespace_descendants
end
end

View File

@ -0,0 +1 @@
b03eee7eff8f7402f3c590b6ae2010c6c278aaa433db52d444a60357bbd8b582

View File

@ -2526,6 +2526,304 @@ CREATE TABLE gitlab_partitions_static.issue_search_data_63 (
namespace_id bigint
);
CREATE TABLE namespace_descendants (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
)
PARTITION BY HASH (namespace_id);
CREATE TABLE gitlab_partitions_static.namespace_descendants_00 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_01 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_02 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_03 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_04 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_05 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_06 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_07 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_08 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_09 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_10 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_11 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_12 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_13 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_14 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_15 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_16 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_17 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_18 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_19 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_20 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_21 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_22 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_23 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_24 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_25 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_26 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_27 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_28 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_29 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_30 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE gitlab_partitions_static.namespace_descendants_31 (
namespace_id bigint NOT NULL,
self_and_descendant_group_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
all_project_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
traversal_ids bigint[] DEFAULT ARRAY[]::bigint[] NOT NULL,
outdated_at timestamp with time zone,
calculated_at timestamp with time zone
);
CREATE TABLE product_analytics_events_experimental (
id bigint NOT NULL,
project_id integer NOT NULL,
@ -26223,6 +26521,70 @@ ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.iss
ALTER TABLE ONLY issue_search_data ATTACH PARTITION gitlab_partitions_static.issue_search_data_63 FOR VALUES WITH (modulus 64, remainder 63);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_00 FOR VALUES WITH (modulus 32, remainder 0);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_01 FOR VALUES WITH (modulus 32, remainder 1);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_02 FOR VALUES WITH (modulus 32, remainder 2);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_03 FOR VALUES WITH (modulus 32, remainder 3);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_04 FOR VALUES WITH (modulus 32, remainder 4);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_05 FOR VALUES WITH (modulus 32, remainder 5);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_06 FOR VALUES WITH (modulus 32, remainder 6);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_07 FOR VALUES WITH (modulus 32, remainder 7);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_08 FOR VALUES WITH (modulus 32, remainder 8);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_09 FOR VALUES WITH (modulus 32, remainder 9);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_10 FOR VALUES WITH (modulus 32, remainder 10);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_11 FOR VALUES WITH (modulus 32, remainder 11);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_12 FOR VALUES WITH (modulus 32, remainder 12);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_13 FOR VALUES WITH (modulus 32, remainder 13);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_14 FOR VALUES WITH (modulus 32, remainder 14);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_15 FOR VALUES WITH (modulus 32, remainder 15);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_16 FOR VALUES WITH (modulus 32, remainder 16);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_17 FOR VALUES WITH (modulus 32, remainder 17);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_18 FOR VALUES WITH (modulus 32, remainder 18);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_19 FOR VALUES WITH (modulus 32, remainder 19);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_20 FOR VALUES WITH (modulus 32, remainder 20);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_21 FOR VALUES WITH (modulus 32, remainder 21);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_22 FOR VALUES WITH (modulus 32, remainder 22);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_23 FOR VALUES WITH (modulus 32, remainder 23);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_24 FOR VALUES WITH (modulus 32, remainder 24);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_25 FOR VALUES WITH (modulus 32, remainder 25);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_26 FOR VALUES WITH (modulus 32, remainder 26);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_27 FOR VALUES WITH (modulus 32, remainder 27);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_28 FOR VALUES WITH (modulus 32, remainder 28);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_29 FOR VALUES WITH (modulus 32, remainder 29);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_30 FOR VALUES WITH (modulus 32, remainder 30);
ALTER TABLE ONLY namespace_descendants ATTACH PARTITION gitlab_partitions_static.namespace_descendants_31 FOR VALUES WITH (modulus 32, remainder 31);
ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_00 FOR VALUES WITH (modulus 64, remainder 0);
ALTER TABLE ONLY product_analytics_events_experimental ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_01 FOR VALUES WITH (modulus 64, remainder 1);
@ -27956,6 +28318,105 @@ ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_62
ALTER TABLE ONLY gitlab_partitions_static.issue_search_data_63
ADD CONSTRAINT issue_search_data_63_pkey PRIMARY KEY (project_id, issue_id);
ALTER TABLE ONLY namespace_descendants
ADD CONSTRAINT namespace_descendants_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_00
ADD CONSTRAINT namespace_descendants_00_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_01
ADD CONSTRAINT namespace_descendants_01_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_02
ADD CONSTRAINT namespace_descendants_02_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_03
ADD CONSTRAINT namespace_descendants_03_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_04
ADD CONSTRAINT namespace_descendants_04_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_05
ADD CONSTRAINT namespace_descendants_05_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_06
ADD CONSTRAINT namespace_descendants_06_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_07
ADD CONSTRAINT namespace_descendants_07_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_08
ADD CONSTRAINT namespace_descendants_08_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_09
ADD CONSTRAINT namespace_descendants_09_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_10
ADD CONSTRAINT namespace_descendants_10_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_11
ADD CONSTRAINT namespace_descendants_11_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_12
ADD CONSTRAINT namespace_descendants_12_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_13
ADD CONSTRAINT namespace_descendants_13_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_14
ADD CONSTRAINT namespace_descendants_14_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_15
ADD CONSTRAINT namespace_descendants_15_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_16
ADD CONSTRAINT namespace_descendants_16_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_17
ADD CONSTRAINT namespace_descendants_17_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_18
ADD CONSTRAINT namespace_descendants_18_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_19
ADD CONSTRAINT namespace_descendants_19_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_20
ADD CONSTRAINT namespace_descendants_20_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_21
ADD CONSTRAINT namespace_descendants_21_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_22
ADD CONSTRAINT namespace_descendants_22_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_23
ADD CONSTRAINT namespace_descendants_23_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_24
ADD CONSTRAINT namespace_descendants_24_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_25
ADD CONSTRAINT namespace_descendants_25_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_26
ADD CONSTRAINT namespace_descendants_26_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_27
ADD CONSTRAINT namespace_descendants_27_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_28
ADD CONSTRAINT namespace_descendants_28_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_29
ADD CONSTRAINT namespace_descendants_29_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_30
ADD CONSTRAINT namespace_descendants_30_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY gitlab_partitions_static.namespace_descendants_31
ADD CONSTRAINT namespace_descendants_31_pkey PRIMARY KEY (namespace_id);
ALTER TABLE ONLY product_analytics_events_experimental
ADD CONSTRAINT product_analytics_events_experimental_pkey PRIMARY KEY (id, project_id);
@ -31337,6 +31798,72 @@ CREATE INDEX issue_search_data_63_issue_id_idx ON gitlab_partitions_static.issue
CREATE INDEX issue_search_data_63_search_vector_idx ON gitlab_partitions_static.issue_search_data_63 USING gin (search_vector);
CREATE INDEX index_on_namespace_descendants_outdated ON ONLY namespace_descendants USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_00_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_00 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_01_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_01 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_02_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_02 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_03_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_03 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_04_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_04 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_05_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_05 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_06_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_06 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_07_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_07 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_08_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_08 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_09_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_09 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_10_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_10 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_11_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_11 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_12_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_12 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_13_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_13 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_14_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_14 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_15_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_15 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_16_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_16 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_17_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_17 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_18_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_18 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_19_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_19 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_20_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_20 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_21_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_21 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_22_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_22 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_23_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_23 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_24_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_24 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_25_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_25 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_26_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_26 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_27_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_27 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_28_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_28 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_29_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_29 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_30_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_30 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX namespace_descendants_31_namespace_id_idx ON gitlab_partitions_static.namespace_descendants_31 USING btree (namespace_id) WHERE (outdated_at IS NOT NULL);
CREATE INDEX index_product_analytics_events_experimental_project_and_time ON ONLY product_analytics_events_experimental USING btree (project_id, collector_tstamp);
CREATE INDEX product_analytics_events_expe_project_id_collector_tstamp_idx10 ON gitlab_partitions_static.product_analytics_events_experimental_10 USING btree (project_id, collector_tstamp);
@ -36917,6 +37444,134 @@ ALTER INDEX issue_search_data_pkey ATTACH PARTITION gitlab_partitions_static.iss
ALTER INDEX index_issue_search_data_on_search_vector ATTACH PARTITION gitlab_partitions_static.issue_search_data_63_search_vector_idx;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_00_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_00_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_01_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_01_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_02_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_02_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_03_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_03_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_04_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_04_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_05_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_05_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_06_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_06_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_07_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_07_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_08_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_08_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_09_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_09_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_10_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_10_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_11_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_11_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_12_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_12_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_13_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_13_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_14_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_14_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_15_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_15_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_16_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_16_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_17_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_17_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_18_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_18_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_19_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_19_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_20_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_20_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_21_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_21_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_22_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_22_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_23_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_23_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_24_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_24_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_25_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_25_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_26_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_26_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_27_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_27_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_28_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_28_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_29_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_29_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_30_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_30_pkey;
ALTER INDEX index_on_namespace_descendants_outdated ATTACH PARTITION gitlab_partitions_static.namespace_descendants_31_namespace_id_idx;
ALTER INDEX namespace_descendants_pkey ATTACH PARTITION gitlab_partitions_static.namespace_descendants_31_pkey;
ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx10;
ALTER INDEX index_product_analytics_events_experimental_project_and_time ATTACH PARTITION gitlab_partitions_static.product_analytics_events_expe_project_id_collector_tstamp_idx11;

View File

@ -32,6 +32,8 @@ To create a new GitLab Dedicated environment for your organization, provide the
- Email addresses of the users who are responsible to complete the onboarding and create your GitLab Dedicated instance using [Switchboard](https://about.gitlab.com/direction/saas-platforms/switchboard/).
If you've been granted access to Switchboard, you receive an email invitation with temporary credentials to sign in.
Your invitation to Switchboard is valid for seven days. If you are having issues accessing
Switchboard, or if your invitation has expired, please [submit a support ticket](https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=4414917877650).
NOTE:
The credentials for Switchboard are separate from any other GitLab credentials you may already have to sign in to a GitLab self-managed or GitLab.com instance.

View File

@ -181,10 +181,9 @@ Therefore, a different setup is required from the [SaaS-only AI features](#test-
1. Ensure that the following environment variables are set in the `.env` file:
```shell
AUTH_BYPASS_EXTERNAL=true
ANTHROPIC_API_KEY="[REDACTED]" # IMPORTANT: Ensure you use Corp account. See https://gitlab.com/gitlab-org/gitlab/-/issues/435911#note_1701762954.
PALM_TEXT_MODEL_NAME=text-bison
PALM_TEXT_PROJECT="[REDACTED]"
AIGW_AUTH__BYPASS_EXTERNAL=true
ANTHROPIC_API_KEY="[REDACTED]" # IMPORTANT: Ensure you use Corp account. See https://gitlab.com/gitlab-org/gitlab/-/issues/435911#note_1701762954.
AIGW_VERTEX_TEXT_MODEL__PROJECT="[REDACTED]"
```
1. Run `poetry run ai_gateway`.
@ -215,7 +214,7 @@ Therefore, a different setup is required from the [SaaS-only AI features](#test-
1. Create a dummy access token via `gdk rails console` OR skip this step and setup GitLab or Customer Dot as OIDC provider (See the following section):
```ruby
# Creating dummy token, and this will work as long as `AUTH_BYPASS_EXTERNAL=true` in AI Gateway.
# Creating dummy token, and this will work as long as `AIGW_AUTH__BYPASS_EXTERNAL=true` in AI Gateway.
::Ai::ServiceAccessToken.create!(token: 'dummy', expires_at: 1.month.from_now)
```
@ -272,9 +271,9 @@ Therefore, a different setup is required from the [SaaS-only AI features](#test-
1. Additionally, ensure that the following environment variables are set in the `.env` file:
```shell
GITLAB_URL="http://gdk.test:3000/"
GITLAB_API_URL="http://gdk.test:3000/api/v4/"
AUTH_BYPASS_EXTERNAL=False
AIGW_GITLAB_URL="http://gdk.test:3000/"
AIGW_GITLAB_API_URL="http://gdk.test:3000/api/v4/"
AIGW_AUTH__BYPASS_EXTERNAL=False
```
1. Restart AI Gateway.
@ -290,7 +289,7 @@ Therefore, a different setup is required from the [SaaS-only AI features](#test-
### Use Customer Dot as OIDC provider in AI Gateway
1. AI Gateway:
1. Ensure `CUSTOMER_PORTAL_BASE_URL` in the `.env` file points to your Customer Dot URL.
1. Ensure `AIGW_CUSTOMER_PORTAL_BASE_URL` in the `.env` file points to your Customer Dot URL.
1. Restart
## Experimental REST API

View File

@ -12,7 +12,7 @@ The recommended setup for locally developing and debugging Code Suggestions is t
- IDE Extension (e.g. VS Code Extension)
- Main application configured correctly
- [Model gateway](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist)
- [AI Gateway](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist)
This should enable everyone to see locally any change in an IDE being sent to the main application transformed to a prompt which is then sent to the respective model.
@ -29,21 +29,21 @@ This should enable everyone to see locally any change in an IDE being sent to th
1. Run `bundle exec rails c` to start a Rails console
1. Call `Feature.enable(:code_suggestions_tokens_api)` from the console
1. Run the GDK with ```export CODE_SUGGESTIONS_BASE_URL=http://localhost:5052```
1. [Setup Model Gateway](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#how-to-run-the-server-locally)
1. [Setup AI Gateway](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#how-to-run-the-server-locally)
1. Build tree sitter libraries ```poetry run scripts/build-tree-sitter-lib.py```
1. Extra .env Changes for all debugging insights
1. LOG_LEVEL=DEBUG
1. LOG_FORMAT_JSON=false
1. LOG_TO_FILE=true
1. Extra .env changes for all debugging insights
1. `AIGW_LOGGING__LEVEL=DEBUG`
1. `AIGW_LOGGING__FORMAT_JSON=false`
1. `AIGW_LOGGING__TO_FILE=true`
1. Watch the new log file ```modelgateway_debug.log``` , e.g. ```tail -f modelgateway_debug.log | fblog -a prefix -a suffix -a current_file_name -a suggestion -a language -a input -a parameters -a score -a exception```
### Setup instructions to use staging Model Gateway
### Setup instructions to use staging AI Gateway
When testing interactions with the Model Gateway, you might want to integrate your local GDK
with the deployed staging Model Gateway. To do this:
When testing interactions with the AI Gateway, you might want to integrate your local GDK
with the deployed staging AI Gateway. To do this:
1. You need a [cloud staging license](../../user/project/repository/code_suggestions/self_managed.md#upgrade-gitlab) that has the Code Suggestions add-on, because add-ons are enabled on staging. Drop a note in the `#s_fulfillment` internal Slack channel to request an add-on to your license. See this [handbook page](https://about.gitlab.com/handbook/developer-onboarding/#working-on-gitlab-ee-developer-licenses) for how to request a license for local development.
1. Set environment variables to point customers-dot to staging, and the Model Gateway to staging:
1. Set environment variables to point customers-dot to staging, and the AI Gateway to staging:
```shell
export GITLAB_LICENSE_MODE=test

View File

@ -1339,6 +1339,9 @@ msgstr ""
msgid "%{user} users menu"
msgstr ""
msgid "%{value} is a reserved name"
msgstr ""
msgid "%{value} is not included in the list"
msgstr ""

View File

@ -87,6 +87,7 @@ RSpec.describe 'Database schema', feature_category: :database do
merge_request_diffs: %w[project_id],
merge_request_diff_commits: %w[commit_author_id committer_id],
namespaces: %w[owner_id parent_id],
namespace_descendants: %w[namespace_id],
notes: %w[author_id commit_id noteable_id updated_by_id resolved_by_id confirmed_by_id discussion_id namespace_id],
notification_settings: %w[source_id],
oauth_access_grants: %w[resource_owner_id application_id],

View File

@ -0,0 +1,12 @@
# frozen_string_literal: true
FactoryBot.define do
factory :namespace_descendants, class: 'Namespaces::Descendants' do
namespace { association(:group) }
self_and_descendant_group_ids { namespace.self_and_descendant_ids.pluck(:id).sort }
all_project_ids { namespace.all_projects.pluck(:id).sort }
traversal_ids { namespace.traversal_ids }
outdated_at { nil }
calculated_at { Time.current }
end
end

View File

@ -660,12 +660,13 @@ RSpec.describe Ci::RunnersFinder, feature_category: :fleet_visibility do
end
context 'by creator' do
let_it_be(:runner_creator_1) { create(:ci_runner, creator_id: '1') }
let_it_be(:creator) { create(:user) }
let_it_be(:runner_with_creator) { create(:ci_runner, creator: creator) }
let(:extra_params) { { creator_id: '1' } }
let(:extra_params) { { creator_id: creator.id } }
it 'returns correct runners' do
is_expected.to contain_exactly(runner_creator_1)
is_expected.to contain_exactly(runner_with_creator)
end
end

View File

@ -1,24 +1,23 @@
import { mount, shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import { shallowMount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui';
import WalkthroughPopover from '~/ci/pipeline_editor/components/popovers/walkthrough_popover.vue';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
Vue.config.ignoredElements = ['gl-emoji'];
describe('WalkthroughPopover component', () => {
let wrapper;
const createComponent = (mountFn = shallowMount) => {
return extendedWrapper(mountFn(WalkthroughPopover));
const createComponent = () => {
wrapper = shallowMount(WalkthroughPopover, {
components: {
GlEmoji: { template: '<img/>' },
},
});
};
describe('CTA button clicked', () => {
beforeEach(async () => {
wrapper = createComponent(mount);
await wrapper.findByTestId('ctaBtn').trigger('click');
});
it('emits "walkthrough-popover-cta-clicked" event', () => {
createComponent(shallowMount);
wrapper.findComponent(GlButton).vm.$emit('click');
expect(wrapper.emitted()['walkthrough-popover-cta-clicked']).toHaveLength(1);
});
});

View File

@ -18,6 +18,9 @@ describe('Pipelines CI Templates', () => {
showJenkinsCiPrompt: false,
...propsData,
},
components: {
GlEmoji: { template: '<img/>' },
},
stubs,
});
};

View File

@ -24,7 +24,7 @@ const createComponent = (
) => {
return mountExtended(GroupItem, {
propsData,
components: { GroupFolder },
components: { GroupFolder, GroupItem },
provide,
});
};
@ -261,10 +261,9 @@ describe('GroupItemComponent', () => {
});
it.each`
attr | value
${'itemscope'} | ${'itemscope'}
${'itemtype'} | ${'https://schema.org/Organization'}
${'itemprop'} | ${'subOrganization'}
attr | value
${'itemtype'} | ${'https://schema.org/Organization'}
${'itemprop'} | ${'subOrganization'}
`('does set correct $attr', ({ attr, value } = {}) => {
expect(wrapper.attributes(attr)).toBe(value);
});
@ -281,7 +280,7 @@ describe('GroupItemComponent', () => {
});
describe('visibility warning popover', () => {
const findPopover = () => extendedWrapper(wrapper.findComponent(GlPopover));
const findPopover = () => wrapper.findComponent(GlPopover);
const itDoesNotRenderVisibilityWarningPopover = () => {
it('does not render visibility warning popover', () => {
@ -343,9 +342,10 @@ describe('GroupItemComponent', () => {
if (isPopoverShown) {
it('renders visibility warning popover with `Learn more` link', () => {
const popover = findPopover();
const popover = extendedWrapper(findPopover());
expect(popover.exists()).toBe(true);
expect(
popover.findByRole('link', { name: GroupItem.i18n.learnMore }).attributes('href'),
).toBe(

View File

@ -27,7 +27,8 @@ RSpec.describe 'new tables missing sharding_key', feature_category: :cell do
let(:allowed_to_be_missing_foreign_key) do
[
'p_catalog_resource_sync_events.project_id',
'zoekt_indices.namespace_id'
'zoekt_indices.namespace_id',
'namespace_descendants.namespace_id'
]
end

View File

@ -0,0 +1,43 @@
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Namespaces::Descendants, feature_category: :database do
describe 'associations' do
it { is_expected.to belong_to(:namespace) }
end
describe 'validations' do
subject(:namespace_descendants) { create(:namespace_descendants) }
it { is_expected.to validate_uniqueness_of(:namespace_id) }
end
describe 'factory' do
let_it_be(:group) { create(:group) }
let_it_be(:subgroup) { create(:group, parent: group) }
let_it_be(:project1) { create(:project, group: subgroup) }
let_it_be(:project2) { create(:project, group: group) }
it 'up to date descendant record for a group' do
descendants = create(:namespace_descendants, namespace: group)
expect(descendants).to have_attributes(
self_and_descendant_group_ids: [group.id, subgroup.id],
all_project_ids: [project1.id, project2.id],
traversal_ids: [group.id]
)
end
it 'creates up-to-date descendant record for a subgroup' do
descendants = create(:namespace_descendants, namespace: subgroup)
expect(descendants).to have_attributes(
self_and_descendant_group_ids: [subgroup.id],
all_project_ids: [project1.id],
traversal_ids: [group.id, subgroup.id]
)
end
end
end

View File

@ -626,38 +626,33 @@ RSpec.describe User, feature_category: :user_profile do
end
end
describe 'username' do
shared_examples 'username validations' do
it 'validates presence' do
expect(subject).to validate_presence_of(:username)
end
it 'rejects denied names' do
user = build(:user, username: 'dashboard')
context 'when username is reserved' do
let(:username) { 'dashboard' }
expect(user).not_to be_valid
expect(user.errors.messages[:username]).to eq ['dashboard is a reserved name']
it 'rejects denied names' do
expect(user).not_to be_valid
expect(user.errors.messages[:username]).to eq ['dashboard is a reserved name']
end
end
it 'allows child names' do
user = build(:user, username: 'avatar')
context 'when username is a child' do
let(:username) { 'avatar' }
expect(user).to be_valid
it 'allows child names' do
expect(user).to be_valid
end
end
it 'allows wildcard names' do
user = build(:user, username: 'blob')
context 'when username is a wildcard' do
let(:username) { 'blob' }
expect(user).to be_valid
end
context 'when username is changed' do
let(:user) { build_stubbed(:user, username: 'old_path', namespace: build_stubbed(:user_namespace)) }
it 'validates move_dir is allowed for the namespace' do
expect(user.namespace).to receive(:any_project_has_container_registry_tags?).and_return(true)
user.username = 'new_path'
expect(user).to be_invalid
expect(user.errors.messages[:username].first).to eq(_('cannot be changed if a personal project has container registry tags.'))
it 'allows wildcard names' do
expect(user).to be_valid
end
end
@ -666,25 +661,59 @@ RSpec.describe User, feature_category: :user_profile do
let!(:other_user) { create(:user, username: username) }
it 'is invalid' do
user = build(:user, username: username)
expect(user).not_to be_valid
expect(user.errors.full_messages).to eq(['Username has already been taken'])
end
end
it 'validates format' do
Mime::EXTENSION_LOOKUP.keys.each do |type|
user = build(:user, username: "test.#{type}")
Mime::EXTENSION_LOOKUP.keys.each do |type|
context 'with extension format' do
let(:username) { "test.#{type}" }
expect(user).not_to be_valid
expect(user.errors.full_messages).to include('Username ending with a reserved file extension is not allowed.')
expect(build(:user, username: "test#{type}")).to be_valid
it do
expect(user).not_to be_valid
expect(user.errors.full_messages).to include('Username ending with a reserved file extension is not allowed.')
end
end
context 'when suffixed by extension type' do
let(:username) { "test#{type}" }
it do
expect(user).to be_valid
end
end
end
end
it 'validates format on updated record' do
expect(create(:user).update(username: 'profile.html')).to be_falsey
context 'when creating user' do
let(:user) { build(:user, username: username) }
include_examples 'username validations'
end
context 'when updating user' do
let(:user) { create(:user) }
before do
user.username = username if defined?(username)
end
include_examples 'username validations'
context 'when personal project has container registry tags' do
let(:user) { build_stubbed(:user, username: 'old_path', namespace: build_stubbed(:user_namespace)) }
before do
expect(user.namespace).to receive(:any_project_has_container_registry_tags?).and_return(true)
end
it 'validates move_dir is allowed for the namespace' do
user.username = 'new_path'
expect(user).to be_invalid
expect(user.errors.messages[:username].first).to eq(_('cannot be changed if a personal project has container registry tags.'))
end
end
end

View File

@ -165,6 +165,43 @@ RSpec.describe 'Query.runners', feature_category: :fleet_visibility do
end
end
end
context 'when filtered by creator' do
let_it_be(:user) { create(:user) }
let_it_be(:runner_created_by_user) { create(:ci_runner, :project, creator: user) }
let(:query) do
%(
query {
runners(creatorId: "#{creator.to_global_id}") {
#{fields}
}
}
)
end
context 'when existing user id given' do
let(:creator) { user }
before do
create(:ci_runner, :project, creator: create(:user)) # Should not be returned
end
it_behaves_like 'a working graphql query returning expected runners' do
let(:expected_runners) { runner_created_by_user }
end
end
context 'when non existent user id given' do
let(:creator) { User.new(id: non_existing_record_id) }
it 'does not return any runners' do
post_graphql(query, current_user: current_user)
expect(graphql_data_at(:runners, :nodes)).to be_empty
end
end
end
end
end