Add files from RemoteDevelopment module for migration
Issue: Add a background DB migration to populate the w... (#538360 - closed)
What does this MR do and why?
Add files from RemoteDevelopment module for migration
These files will be required to do migration. Read more here: #538360 (closed)
How to set up and validate locally
This is a little tricky. All of the files in the diff are copied from ee/lib/remote_development
and then prepended with Bm
to avoid ruby loading the application logic files.
Since the application logic is already reviewed and tested at this commit 0f56c73e. Ensuring that there is nothing in the diff of the corresponding file present in lib/gitlab/background_migration/remote_development/
should be enough.
This can be in rails console.
-
Type
rails c
in terminal. -
Run the file in the console.
workspaces = RemoteDevelopment::Workspace.all workspaces.map do |w| Gitlab::BackgroundMigration::RemoteDevelopment::BmCreateDesiredConfig.create_and_save(workspace_id: w.id, dry_run: true) end
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.