Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2025-07-08 03:12:46 +00:00
parent 40c6ddc98e
commit 35292771f5
30 changed files with 267 additions and 5 deletions

View File

@ -10,4 +10,5 @@ milestone: '17.9'
gitlab_schema: gitlab_main_cell
sharding_key:
project_id: projects
namespace_id: namespaces
table_size: small

View File

@ -10,4 +10,5 @@ milestone: '17.2'
gitlab_schema: gitlab_main_cell
sharding_key:
project_id: projects
namespace_id: namespaces
table_size: medium

View File

@ -10,4 +10,5 @@ milestone: '17.5'
gitlab_schema: gitlab_main_cell
sharding_key:
project_id: projects
namespace_id: namespaces
table_size: small

View File

@ -10,4 +10,5 @@ milestone: '17.2'
gitlab_schema: gitlab_main_cell
sharding_key:
project_id: projects
namespace_id: namespaces
table_size: small

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class AddProjectOrNamespaceConstraintToDuoWorkflowsWorkflows < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.2'
def up
add_multi_column_not_null_constraint(:duo_workflows_workflows, :project_id, :namespace_id)
end
def down
remove_multi_column_not_null_constraint(:duo_workflows_workflows, :project_id, :namespace_id)
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class RemoveNotNullConstraintFromDuoWorkflowsWorkflowsProjectId < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.2'
def up
change_column_null :duo_workflows_workflows, :project_id, true
end
def down
change_column_null :duo_workflows_workflows, :project_id, false
end
end

View File

@ -0,0 +1,30 @@
# frozen_string_literal: true
class CleanupRecordsWithNullProjectIdsFromDuoWorkflowsWorkflows < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
milestone '18.2'
BATCH_SIZE = 1000
class Workflow < MigrationRecord
include EachBatch
self.table_name = 'duo_workflows_workflows'
end
def up
# no-op - this migration is required to allow a rollback of
# `RemoveNotNullConstraintFromDuoWorkflowsWorkflowsProjectId`
end
def down
Workflow.each_batch(of: BATCH_SIZE) do |relation|
relation
.where(project_id: nil)
.delete_all
end
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class AddProjectOrNamespaceConstraintToDuoWorkflowsCheckpoints < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.2'
def up
add_multi_column_not_null_constraint(:duo_workflows_checkpoints, :project_id, :namespace_id)
end
def down
remove_multi_column_not_null_constraint(:duo_workflows_checkpoints, :project_id, :namespace_id)
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class RemoveNotNullConstraintFromDuoWorkflowsCheckpointsProjectId < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.2'
def up
change_column_null :duo_workflows_checkpoints, :project_id, true
end
def down
change_column_null :duo_workflows_checkpoints, :project_id, false
end
end

View File

@ -0,0 +1,30 @@
# frozen_string_literal: true
class CleanupRecordsWithNullProjectIdsFromDuoWorkflowsCheckpoints < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
milestone '18.2'
BATCH_SIZE = 1000
class WorkflowCheckpoint < MigrationRecord
include EachBatch
self.table_name = 'duo_workflows_checkpoints'
end
def up
# no-op - this migration is required to allow a rollback of
# `AddProjectOrNamespaceConstraintToDuoWorkflowsCheckpoints`
end
def down
WorkflowCheckpoint.each_batch(of: BATCH_SIZE) do |relation|
relation
.where(project_id: nil)
.delete_all
end
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class AddProjectOrNamespaceConstraintToDuoWorkflowsEvents < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.2'
def up
add_multi_column_not_null_constraint(:duo_workflows_events, :project_id, :namespace_id)
end
def down
remove_multi_column_not_null_constraint(:duo_workflows_events, :project_id, :namespace_id)
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class RemoveNotNullConstraintFromDuoWorkflowsEventsProjectId < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.2'
def up
change_column_null :duo_workflows_events, :project_id, true
end
def down
change_column_null :duo_workflows_events, :project_id, false
end
end

View File

@ -0,0 +1,29 @@
# frozen_string_literal: true
class CleanupRecordsWithNullProjectIdsFromDuoWorkflowsEvents < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
milestone '18.2'
BATCH_SIZE = 1000
class WorkflowEvent < MigrationRecord
include EachBatch
self.table_name = 'duo_workflows_events'
end
def up
# no-op - this migration is required to allow a rollback of `RemoveNotNullConstraintFromDuoWorkflowsEventsProjectId`
end
def down
WorkflowEvent.each_batch(of: BATCH_SIZE) do |relation|
relation
.where(project_id: nil)
.delete_all
end
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class AddProjectOrNamespaceConstraintToDuoWorkflowsCheckpointWrites < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.2'
def up
add_multi_column_not_null_constraint(:duo_workflows_checkpoint_writes, :project_id, :namespace_id)
end
def down
remove_multi_column_not_null_constraint(:duo_workflows_checkpoint_writes, :project_id, :namespace_id)
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class RemoveNotNullConstraintFromDuoWorkflowsCheckpointWritesProjectId < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.2'
def up
change_column_null :duo_workflows_checkpoint_writes, :project_id, true
end
def down
change_column_null :duo_workflows_checkpoint_writes, :project_id, false
end
end

View File

@ -0,0 +1,30 @@
# frozen_string_literal: true
class CleanupRecordsWithNullProjectIdsFromDuoWorkflowsCheckpointWrites < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
restrict_gitlab_migration gitlab_schema: :gitlab_main
milestone '18.2'
BATCH_SIZE = 1000
class WorkflowCheckPointWrite < MigrationRecord
include EachBatch
self.table_name = 'duo_workflows_checkpoint_writes'
end
def up
# no-op - this migration is required to allow a rollback of
# `RemoveNotNullConstraintFromDuoWorkflowsCheckpointWritesProjectId`
end
def down
WorkflowCheckPointWrite.each_batch(of: BATCH_SIZE) do |relation|
relation
.where(project_id: nil)
.delete_all
end
end
end

View File

@ -0,0 +1 @@
142099780029cd6becea865ffee8920a9ca03fa65090af567a530e37b8fa2d86

View File

@ -0,0 +1 @@
4cc366bdfa4bb881cd5cb3ed1093e2022ffb8dc18d72428c31aec067a4b1e9d2

View File

@ -0,0 +1 @@
b48fa652ec41ed3540e858275e6447863c17ccbb9c8caab2ff3ac138ef1819b0

View File

@ -0,0 +1 @@
c064b787cf4ad31326c11817069ec54a7bdfbbb702521894a1274a82d65f009c

View File

@ -0,0 +1 @@
e3011cb75f7b533c3a1b09046857cb0ce81c37be396849cd74692a8e09547da9

View File

@ -0,0 +1 @@
f524b4d60b0bf69ccdb66104cb1a1cc57d1f22555d530b7c11e3f80cc410962b

View File

@ -0,0 +1 @@
03b23d923e3a43afd8c1f9fb2add645be48c16c9da76d5f7d6806e176d95637b

View File

@ -0,0 +1 @@
1ac2e8f3c3c3ccf33e6d66622ebca638f778d5b0dff2370106141d923889d410

View File

@ -0,0 +1 @@
19fa463a438e6fb77d85577b24f1575f75aca16541655e9816437316076664aa

View File

@ -0,0 +1 @@
bb3dfee2da2d7575f13a1929666eeb4784c0ebe1d7a37161576a1b10505fe5d2

View File

@ -0,0 +1 @@
c825a4b5ebf4b8a48d9b886ceb25e684b7240fdb2db339713e50c42df2636dc3

View File

@ -0,0 +1 @@
06341854dd545f8a3fa161961e778c9d435e8c51c33a7afc2e19ac9a13021298

View File

@ -14295,7 +14295,7 @@ ALTER SEQUENCE draft_notes_id_seq OWNED BY draft_notes.id;
CREATE TABLE duo_workflows_checkpoint_writes (
id bigint NOT NULL,
workflow_id bigint NOT NULL,
project_id bigint NOT NULL,
project_id bigint,
idx integer NOT NULL,
thread_ts text NOT NULL,
task text NOT NULL,
@ -14304,6 +14304,7 @@ CREATE TABLE duo_workflows_checkpoint_writes (
data text NOT NULL,
namespace_id bigint,
CONSTRAINT check_38dc205bb2 CHECK ((char_length(data) <= 10000)),
CONSTRAINT check_3d119c06ee CHECK ((num_nonnulls(namespace_id, project_id) = 1)),
CONSTRAINT check_c64af76670 CHECK ((char_length(write_type) <= 255)),
CONSTRAINT check_d66d09c813 CHECK ((char_length(task) <= 255)),
CONSTRAINT check_ddb83bc2d5 CHECK ((char_length(channel) <= 255)),
@ -14322,7 +14323,7 @@ ALTER SEQUENCE duo_workflows_checkpoint_writes_id_seq OWNED BY duo_workflows_che
CREATE TABLE duo_workflows_checkpoints (
id bigint NOT NULL,
workflow_id bigint NOT NULL,
project_id bigint NOT NULL,
project_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
thread_ts text NOT NULL,
@ -14331,6 +14332,7 @@ CREATE TABLE duo_workflows_checkpoints (
metadata jsonb NOT NULL,
namespace_id bigint,
CONSTRAINT check_3dcc551d16 CHECK ((char_length(parent_ts) <= 255)),
CONSTRAINT check_4b59da71b6 CHECK ((num_nonnulls(namespace_id, project_id) = 1)),
CONSTRAINT check_5d3139b983 CHECK ((char_length(thread_ts) <= 255))
);
@ -14346,7 +14348,7 @@ ALTER SEQUENCE duo_workflows_checkpoints_id_seq OWNED BY duo_workflows_checkpoin
CREATE TABLE duo_workflows_events (
id bigint NOT NULL,
workflow_id bigint NOT NULL,
project_id bigint NOT NULL,
project_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
event_type smallint NOT NULL,
@ -14355,7 +14357,8 @@ CREATE TABLE duo_workflows_events (
correlation_id_value text,
namespace_id bigint,
CONSTRAINT check_125840165c CHECK ((char_length(message) <= 16384)),
CONSTRAINT check_5e35596b00 CHECK ((char_length(correlation_id_value) <= 128))
CONSTRAINT check_5e35596b00 CHECK ((char_length(correlation_id_value) <= 128)),
CONSTRAINT check_9014d33202 CHECK ((num_nonnulls(namespace_id, project_id) = 1))
);
CREATE SEQUENCE duo_workflows_events_id_seq
@ -14370,7 +14373,7 @@ ALTER SEQUENCE duo_workflows_events_id_seq OWNED BY duo_workflows_events.id;
CREATE TABLE duo_workflows_workflows (
id bigint NOT NULL,
user_id bigint NOT NULL,
project_id bigint NOT NULL,
project_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
status smallint DEFAULT 0 NOT NULL,
@ -14384,6 +14387,7 @@ CREATE TABLE duo_workflows_workflows (
namespace_id bigint,
CONSTRAINT check_30ca07a4ef CHECK ((char_length(goal) <= 16384)),
CONSTRAINT check_3a9162f1ae CHECK ((char_length(image) <= 2048)),
CONSTRAINT check_73884a5839 CHECK ((num_nonnulls(namespace_id, project_id) = 1)),
CONSTRAINT check_ec723e2a1a CHECK ((char_length(workflow_definition) <= 255))
);

View File

@ -56059,6 +56059,9 @@ msgstr ""
msgid "SecurityOrchestration|All projects in this group except:"
msgstr ""
msgid "SecurityOrchestration|All projects in this instance except:"
msgstr ""
msgid "SecurityOrchestration|All projects linked to security policy project."
msgstr ""