From 3ae365bc045efc54d42d00ef7f8e2528d4bde8d1 Mon Sep 17 00:00:00 2001 From: Alper Akgun Date: Mon, 11 Sep 2023 18:32:19 +0300 Subject: [PATCH 1/6] Update config_version & force_full_reconciliation for stale workspaces Set config_version to 2 Set force_full_reconciliation to true for Changelog: added EE: true --- .../update_workspaces_config_version.yml | 5 + ..._queue_update_workspaces_config_version.rb | 26 +++++ db/schema_migrations/20230910120000 | 1 + .../update_workspaces_config_version.rb | 32 ++++++ .../update_workspaces_config_version_spec.rb | 102 ++++++++++++++++++ ...e_update_workspaces_config_version_spec.rb | 26 +++++ .../update_workspaces_config_version.rb | 13 +++ 7 files changed, 205 insertions(+) create mode 100644 db/docs/batched_background_migrations/update_workspaces_config_version.yml create mode 100644 db/post_migrate/20230910120000_queue_update_workspaces_config_version.rb create mode 100644 db/schema_migrations/20230910120000 create mode 100644 ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb create mode 100644 ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb create mode 100644 ee/spec/migrations/20230901120000_queue_update_workspaces_config_version_spec.rb create mode 100644 lib/gitlab/background_migration/update_workspaces_config_version.rb diff --git a/db/docs/batched_background_migrations/update_workspaces_config_version.yml b/db/docs/batched_background_migrations/update_workspaces_config_version.yml new file mode 100644 index 00000000000000..ffcc26ff835ac3 --- /dev/null +++ b/db/docs/batched_background_migrations/update_workspaces_config_version.yml @@ -0,0 +1,5 @@ +migration_job_name: UpdateWorkspacesConfigVersion +description: Update config_version to 2 and force_full_reconciliation to true for stale workspaces +feature_category: remote_development +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131402 +milestone: 16.4 diff --git a/db/post_migrate/20230910120000_queue_update_workspaces_config_version.rb b/db/post_migrate/20230910120000_queue_update_workspaces_config_version.rb new file mode 100644 index 00000000000000..499e5cec11c09e --- /dev/null +++ b/db/post_migrate/20230910120000_queue_update_workspaces_config_version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +class QueueUpdateWorkspacesConfigVersion < Gitlab::Database::Migration[2.1] + MIGRATION = "UpdateWorkspacesConfigVersion" + DELAY_INTERVAL = 2.minutes + BATCH_SIZE = 100 + SUB_BATCH_SIZE = 20 + + restrict_gitlab_migration gitlab_schema: :gitlab_main + disable_ddl_transaction! + + def up + queue_batched_background_migration( + MIGRATION, + :workspaces, + :id, + job_interval: DELAY_INTERVAL, + batch_size: BATCH_SIZE, + sub_batch_size: SUB_BATCH_SIZE + ) + end + + def down + delete_batched_background_migration(MIGRATION, :workspaces, :id, []) + end +end diff --git a/db/schema_migrations/20230910120000 b/db/schema_migrations/20230910120000 new file mode 100644 index 00000000000000..ffef50b3e9ef2d --- /dev/null +++ b/db/schema_migrations/20230910120000 @@ -0,0 +1 @@ +a57042e0086761ca054dd8272024f1f086ae3932930e57126c64033e7a688cbd \ No newline at end of file diff --git a/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb new file mode 100644 index 00000000000000..2e88faddfeff15 --- /dev/null +++ b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +module EE + module Gitlab + module BackgroundMigration + # This class is responsible for updating workspaces config_version and force_full_reconciliation. + module UpdateWorkspacesConfigVersion + extend ActiveSupport::Concern + extend ::Gitlab::Utils::Override + + prepended do + operation_name :update + scope_to ->(relation) { + relation.where(config_version: 1).where.not( + actual_state: [ + ::RemoteDevelopment::Workspaces::States::TERMINATED, + ::RemoteDevelopment::Workspaces::States::TERMINATING + ]) + } + feature_category :remote_development + end + + override :perform + def perform + each_sub_batch do |sub_batch| + sub_batch.update_all(config_version: 2, force_full_reconciliation: true) + end + end + end + end + end +end diff --git a/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb new file mode 100644 index 00000000000000..b6ad3e08c5d2c0 --- /dev/null +++ b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb @@ -0,0 +1,102 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Gitlab::BackgroundMigration::UpdateWorkspacesConfigVersion, feature_category: :remote_development do + describe "#perform" do + let(:workspace_attrs) do + { + user_id: user.id, + project_id: project.id, + cluster_agent_id: cluster_agent.id, + desired_state_updated_at: 2.seconds.ago, + max_hours_before_termination: 19, + namespace: 'ns', + desired_state: ::RemoteDevelopment::Workspaces::States::RUNNING, + editor: 'e', + devfile_ref: 'dfr', + devfile_path: 'dev/path', + url: 'https://www.example.org' + } + end + + let(:namespace) { table(:namespaces).create!(name: 'namespace', path: 'namespace') } + let(:project) do + table(:projects).create!(name: 'project', path: 'project', project_namespace_id: namespace.id, + namespace_id: namespace.id) + end + + let(:cluster_agent) { table(:cluster_agents).create!(name: 'cluster_agent', project_id: project.id) } + let(:user) { table(:users).create!(email: 'author@example.com', username: 'author', projects_limit: 10) } + let(:workspaces_table) { table(:workspaces) } + let!(:workspace_with_config_1_actual_state_terminated) do + workspaces_table.create!({ + name: 'workspace1', + config_version: 1, + actual_state: ::RemoteDevelopment::Workspaces::States::TERMINATED + }.merge!(workspace_attrs)) + end + + let!(:workspace_with_config_1_actual_state_running) do + workspaces_table.create!({ + name: 'workspace2', + config_version: 1, + actual_state: ::RemoteDevelopment::Workspaces::States::RUNNING + }.merge!(workspace_attrs)) + end + + let!(:workspace_with_config_2_actual_state_running) do + workspaces_table.create!({ + name: 'workspace3', + config_version: 2, + actual_state: ::RemoteDevelopment::Workspaces::States::RUNNING + }.merge!(workspace_attrs)) + end + + let!(:workspace_with_config_1_actual_state_terminating) do + workspaces_table.create!({ + name: 'workspace4', + config_version: 1, + actual_state: ::RemoteDevelopment::Workspaces::States::TERMINATING + }.merge!(workspace_attrs)) + end + + let(:migration) do + described_class.new( + start_id: workspace_with_config_1_actual_state_terminated.id, + end_id: workspace_with_config_1_actual_state_terminating.id, + batch_table: :workspaces, + batch_column: :id, + sub_batch_size: 2, + pause_ms: 0, + connection: ApplicationRecord.connection + ) + end + + it "updates config_version and force_full_reconciliation for stale workspaces" do + migration.perform + + workspace_with_config_1_actual_state_running.reload + + expect(workspace_with_config_1_actual_state_running.config_version).to eq(2) + expect(workspace_with_config_1_actual_state_running.force_full_reconciliation).to eq(true) + end + + it "does not update workspaces with different config_version or actual_state" do + migration.perform + + workspace_with_config_1_actual_state_terminated.reload + workspace_with_config_2_actual_state_running.reload + workspace_with_config_1_actual_state_terminating.reload + + expect(workspace_with_config_1_actual_state_terminated.config_version).to eq(1) + expect(workspace_with_config_1_actual_state_terminated.force_full_reconciliation).to eq(false) + + expect(workspace_with_config_2_actual_state_running.config_version).to eq(2) + expect(workspace_with_config_2_actual_state_running.force_full_reconciliation).to eq(false) + + expect(workspace_with_config_1_actual_state_terminating.config_version).to eq(1) + expect(workspace_with_config_1_actual_state_terminating.force_full_reconciliation).to eq(false) + end + end +end diff --git a/ee/spec/migrations/20230901120000_queue_update_workspaces_config_version_spec.rb b/ee/spec/migrations/20230901120000_queue_update_workspaces_config_version_spec.rb new file mode 100644 index 00000000000000..93b59bdacf14d1 --- /dev/null +++ b/ee/spec/migrations/20230901120000_queue_update_workspaces_config_version_spec.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe QueueUpdateWorkspacesConfigVersion, feature_category: :remote_development 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( + table_name: :workspaces, + column_name: :id, + interval: described_class::DELAY_INTERVAL.to_i, + batch_size: described_class::BATCH_SIZE, + sub_batch_size: described_class::SUB_BATCH_SIZE + ) + } + end + end +end diff --git a/lib/gitlab/background_migration/update_workspaces_config_version.rb b/lib/gitlab/background_migration/update_workspaces_config_version.rb new file mode 100644 index 00000000000000..77a7fc1bccaaa3 --- /dev/null +++ b/lib/gitlab/background_migration/update_workspaces_config_version.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Gitlab + module BackgroundMigration + # No op on ce + class UpdateWorkspacesConfigVersion < BatchedMigrationJob + feature_category :remote_development + def perform; end + end + end +end + +Gitlab::BackgroundMigration::UpdateWorkspacesConfigVersion.prepend_mod_with('Gitlab::BackgroundMigration::UpdateWorkspacesConfigVersion') # rubocop:disable Layout/LineLength -- GitLab From fdb21894d9da24f89ac5466c1178dc729c6d6360 Mon Sep 17 00:00:00 2001 From: Alper Akgun Date: Tue, 12 Sep 2023 09:16:17 +0300 Subject: [PATCH 2/6] Migrate only terminated workspaces --- .../update_workspaces_config_version.rb | 5 +---- .../update_workspaces_config_version_spec.rb | 14 +------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb index 2e88faddfeff15..09a230fc9e2322 100644 --- a/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb +++ b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb @@ -12,10 +12,7 @@ module UpdateWorkspacesConfigVersion operation_name :update scope_to ->(relation) { relation.where(config_version: 1).where.not( - actual_state: [ - ::RemoteDevelopment::Workspaces::States::TERMINATED, - ::RemoteDevelopment::Workspaces::States::TERMINATING - ]) + actual_state: ::RemoteDevelopment::Workspaces::States::TERMINATED) } feature_category :remote_development end diff --git a/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb index b6ad3e08c5d2c0..1516a21c5020fd 100644 --- a/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb +++ b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb @@ -53,18 +53,10 @@ }.merge!(workspace_attrs)) end - let!(:workspace_with_config_1_actual_state_terminating) do - workspaces_table.create!({ - name: 'workspace4', - config_version: 1, - actual_state: ::RemoteDevelopment::Workspaces::States::TERMINATING - }.merge!(workspace_attrs)) - end - let(:migration) do described_class.new( start_id: workspace_with_config_1_actual_state_terminated.id, - end_id: workspace_with_config_1_actual_state_terminating.id, + end_id: workspace_with_config_2_actual_state_running.id, batch_table: :workspaces, batch_column: :id, sub_batch_size: 2, @@ -87,16 +79,12 @@ workspace_with_config_1_actual_state_terminated.reload workspace_with_config_2_actual_state_running.reload - workspace_with_config_1_actual_state_terminating.reload expect(workspace_with_config_1_actual_state_terminated.config_version).to eq(1) expect(workspace_with_config_1_actual_state_terminated.force_full_reconciliation).to eq(false) expect(workspace_with_config_2_actual_state_running.config_version).to eq(2) expect(workspace_with_config_2_actual_state_running.force_full_reconciliation).to eq(false) - - expect(workspace_with_config_1_actual_state_terminating.config_version).to eq(1) - expect(workspace_with_config_1_actual_state_terminating.force_full_reconciliation).to eq(false) end end end -- GitLab From 6205763cd2649d6617351a8d6055edbf24a35ad1 Mon Sep 17 00:00:00 2001 From: Alper Akgun Date: Tue, 12 Sep 2023 11:59:16 +0300 Subject: [PATCH 3/6] Move versions to constants --- .../update_workspaces_config_version.rb | 7 ++++--- .../update_workspaces_config_version_spec.rb | 14 ++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb index 09a230fc9e2322..5f7ab9d30047e5 100644 --- a/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb +++ b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb @@ -11,8 +11,8 @@ module UpdateWorkspacesConfigVersion prepended do operation_name :update scope_to ->(relation) { - relation.where(config_version: 1).where.not( - actual_state: ::RemoteDevelopment::Workspaces::States::TERMINATED) + relation.where(config_version: RemoteDevelopment::Workspaces::ConfigVersion::VERSION_1) + .where.not(actual_state: ::RemoteDevelopment::Workspaces::States::TERMINATED) } feature_category :remote_development end @@ -20,7 +20,8 @@ module UpdateWorkspacesConfigVersion override :perform def perform each_sub_batch do |sub_batch| - sub_batch.update_all(config_version: 2, force_full_reconciliation: true) + sub_batch.update_all(config_version: RemoteDevelopment::Workspaces::ConfigVersion::VERSION_2, + force_full_reconciliation: true) end end end diff --git a/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb index 1516a21c5020fd..2fff9341f6eb58 100644 --- a/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb +++ b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb @@ -4,6 +4,8 @@ RSpec.describe Gitlab::BackgroundMigration::UpdateWorkspacesConfigVersion, feature_category: :remote_development do describe "#perform" do + let(:v1) { RemoteDevelopment::Workspaces::ConfigVersion::VERSION_1 } + let(:v2) { RemoteDevelopment::Workspaces::ConfigVersion::VERSION_2 } let(:workspace_attrs) do { user_id: user.id, @@ -32,7 +34,7 @@ let!(:workspace_with_config_1_actual_state_terminated) do workspaces_table.create!({ name: 'workspace1', - config_version: 1, + config_version: v1, actual_state: ::RemoteDevelopment::Workspaces::States::TERMINATED }.merge!(workspace_attrs)) end @@ -40,7 +42,7 @@ let!(:workspace_with_config_1_actual_state_running) do workspaces_table.create!({ name: 'workspace2', - config_version: 1, + config_version: v1, actual_state: ::RemoteDevelopment::Workspaces::States::RUNNING }.merge!(workspace_attrs)) end @@ -48,7 +50,7 @@ let!(:workspace_with_config_2_actual_state_running) do workspaces_table.create!({ name: 'workspace3', - config_version: 2, + config_version: v2, actual_state: ::RemoteDevelopment::Workspaces::States::RUNNING }.merge!(workspace_attrs)) end @@ -70,7 +72,7 @@ workspace_with_config_1_actual_state_running.reload - expect(workspace_with_config_1_actual_state_running.config_version).to eq(2) + expect(workspace_with_config_1_actual_state_running.config_version).to eq(v2) expect(workspace_with_config_1_actual_state_running.force_full_reconciliation).to eq(true) end @@ -80,10 +82,10 @@ workspace_with_config_1_actual_state_terminated.reload workspace_with_config_2_actual_state_running.reload - expect(workspace_with_config_1_actual_state_terminated.config_version).to eq(1) + expect(workspace_with_config_1_actual_state_terminated.config_version).to eq(v1) expect(workspace_with_config_1_actual_state_terminated.force_full_reconciliation).to eq(false) - expect(workspace_with_config_2_actual_state_running.config_version).to eq(2) + expect(workspace_with_config_2_actual_state_running.config_version).to eq(v2) expect(workspace_with_config_2_actual_state_running.force_full_reconciliation).to eq(false) end end -- GitLab From 58d51555c36198b2ff4d6c72e0f2d4fd525c80bf Mon Sep 17 00:00:00 2001 From: Alper Akgun Date: Fri, 15 Sep 2023 09:28:19 +0300 Subject: [PATCH 4/6] Move constants in migration --- .../update_workspaces_config_version.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb index 5f7ab9d30047e5..3fd45984b49216 100644 --- a/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb +++ b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb @@ -8,11 +8,15 @@ module UpdateWorkspacesConfigVersion extend ActiveSupport::Concern extend ::Gitlab::Utils::Override + VERSION_1 = 1 + VERSION_2 = 2 + STATE_TERMINATED = 'Terminated' + prepended do operation_name :update scope_to ->(relation) { - relation.where(config_version: RemoteDevelopment::Workspaces::ConfigVersion::VERSION_1) - .where.not(actual_state: ::RemoteDevelopment::Workspaces::States::TERMINATED) + relation.where(config_version: VERSION_1) + .where.not(actual_state: STATE_TERMINATED) } feature_category :remote_development end @@ -20,7 +24,7 @@ module UpdateWorkspacesConfigVersion override :perform def perform each_sub_batch do |sub_batch| - sub_batch.update_all(config_version: RemoteDevelopment::Workspaces::ConfigVersion::VERSION_2, + sub_batch.update_all(config_version: VERSION_2, force_full_reconciliation: true) end end -- GitLab From da7250069b936671c4810be7dc6375d6a1233a3e Mon Sep 17 00:00:00 2001 From: Alper Akgun Date: Tue, 26 Sep 2023 12:23:54 +0300 Subject: [PATCH 5/6] Rename the field name to force_include_all_resources --- .../update_workspaces_config_version.yml | 2 +- .../update_workspaces_config_version.rb | 4 ++-- .../update_workspaces_config_version_spec.rb | 15 +++++++++++---- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/db/docs/batched_background_migrations/update_workspaces_config_version.yml b/db/docs/batched_background_migrations/update_workspaces_config_version.yml index ffcc26ff835ac3..88bea85cf880ae 100644 --- a/db/docs/batched_background_migrations/update_workspaces_config_version.yml +++ b/db/docs/batched_background_migrations/update_workspaces_config_version.yml @@ -1,5 +1,5 @@ migration_job_name: UpdateWorkspacesConfigVersion -description: Update config_version to 2 and force_full_reconciliation to true for stale workspaces +description: Update config_version to 2 and force_include_all_resources to true for stale workspaces feature_category: remote_development introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131402 milestone: 16.4 diff --git a/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb index 3fd45984b49216..930b8866cc1788 100644 --- a/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb +++ b/ee/lib/ee/gitlab/background_migration/update_workspaces_config_version.rb @@ -3,7 +3,7 @@ module EE module Gitlab module BackgroundMigration - # This class is responsible for updating workspaces config_version and force_full_reconciliation. + # This class is responsible for updating workspaces config_version and force_include_all_resources. module UpdateWorkspacesConfigVersion extend ActiveSupport::Concern extend ::Gitlab::Utils::Override @@ -25,7 +25,7 @@ module UpdateWorkspacesConfigVersion def perform each_sub_batch do |sub_batch| sub_batch.update_all(config_version: VERSION_2, - force_full_reconciliation: true) + force_include_all_resources: true) end end end diff --git a/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb index 2fff9341f6eb58..54ddaff4d0e089 100644 --- a/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb +++ b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb @@ -6,11 +6,18 @@ describe "#perform" do let(:v1) { RemoteDevelopment::Workspaces::ConfigVersion::VERSION_1 } let(:v2) { RemoteDevelopment::Workspaces::ConfigVersion::VERSION_2 } + let(:personal_access_tokens_table) { table(:personal_access_tokens) } + let(:pat) do + personal_access_tokens_table.create!(name: 'workspace1', user_id: user.id, scopes: "---\n- api\n", + expires_at: 4.days.from_now) + end + let(:workspace_attrs) do { user_id: user.id, project_id: project.id, cluster_agent_id: cluster_agent.id, + personal_access_token_id: pat.id, desired_state_updated_at: 2.seconds.ago, max_hours_before_termination: 19, namespace: 'ns', @@ -67,13 +74,13 @@ ) end - it "updates config_version and force_full_reconciliation for stale workspaces" do + it "updates config_version and force_include_all_resources for stale workspaces" do migration.perform workspace_with_config_1_actual_state_running.reload expect(workspace_with_config_1_actual_state_running.config_version).to eq(v2) - expect(workspace_with_config_1_actual_state_running.force_full_reconciliation).to eq(true) + expect(workspace_with_config_1_actual_state_running.force_include_all_resources).to eq(true) end it "does not update workspaces with different config_version or actual_state" do @@ -83,10 +90,10 @@ workspace_with_config_2_actual_state_running.reload expect(workspace_with_config_1_actual_state_terminated.config_version).to eq(v1) - expect(workspace_with_config_1_actual_state_terminated.force_full_reconciliation).to eq(false) + expect(workspace_with_config_1_actual_state_terminated.force_include_all_resources).to eq(false) expect(workspace_with_config_2_actual_state_running.config_version).to eq(v2) - expect(workspace_with_config_2_actual_state_running.force_full_reconciliation).to eq(false) + expect(workspace_with_config_2_actual_state_running.force_include_all_resources).to eq(false) end end end -- GitLab From cc912211bb185a1ea57aed82de50bf0a7d6d71a7 Mon Sep 17 00:00:00 2001 From: Vishal Tak Date: Fri, 29 Sep 2023 09:40:24 +0000 Subject: [PATCH 6/6] Rename test spec names and change milestone --- .../update_workspaces_config_version.yml | 4 ++-- .../update_workspaces_config_version_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/docs/batched_background_migrations/update_workspaces_config_version.yml b/db/docs/batched_background_migrations/update_workspaces_config_version.yml index 88bea85cf880ae..50cdfe1f2e9243 100644 --- a/db/docs/batched_background_migrations/update_workspaces_config_version.yml +++ b/db/docs/batched_background_migrations/update_workspaces_config_version.yml @@ -1,5 +1,5 @@ migration_job_name: UpdateWorkspacesConfigVersion -description: Update config_version to 2 and force_include_all_resources to true for stale workspaces +description: Update config_version to 2 and force_include_all_resources to true for existing workspaces feature_category: remote_development introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131402 -milestone: 16.4 +milestone: 16.5 diff --git a/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb index 54ddaff4d0e089..c2351e69a331b8 100644 --- a/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb +++ b/ee/spec/lib/gitlab/background_migration/update_workspaces_config_version_spec.rb @@ -74,7 +74,7 @@ ) end - it "updates config_version and force_include_all_resources for stale workspaces" do + it "updates config_version and force_include_all_resources for existing non-terminated workspaces" do migration.perform workspace_with_config_1_actual_state_running.reload -- GitLab