Skip to content

Add DB migration to add workspaces proxy options in agentk configuration for remote_development

What does this MR do and why?

Add DB migration to add workspaces proxy options in agentk configuration for remote_development .

Currently, a workspace is accessed through GitLab Workspaces Proxy for both HTTP and SSH traffic. As we work on Simplify Workspaces setup by removing GitLab Wo... (&16785) , we need a flag to determine the traffic flow. These new database columns represent those flags. The default is set to true because that is the current network flow and we want this new flow being built in Simplify Workspaces setup by removing GitLab Wo... (&16785) to be an opt-in as we roll it out. See &16785 (comment 2715030411) for further discussion on this.

References

DB migration output

Up

➜ scripts/database/migrate.rb        
$ bin/rails db:migrate:up:ci db:migrate:up:main VERSION=20250910043105
ci: == [advisory_lock_connection] object_id: 154060, pg_backend_pid: 44833
ci: == 20250910043105 AddWorkspacesProxyOptionsInAgentConfig: migrating ===========
ci: -- add_column(:workspaces_agent_configs, :gitlab_workspaces_proxy_http_enabled, :boolean, {:null=>false, :default=>true, :if_not_exists=>true})
ci:    -> 0.0249s
ci: -- add_column(:workspaces_agent_configs, :gitlab_workspaces_proxy_ssh_enabled, :boolean, {:null=>false, :default=>true, :if_not_exists=>true})
ci:    -> 0.0027s
ci: == 20250910043105 AddWorkspacesProxyOptionsInAgentConfig: migrated (0.0503s) ==

ci: == [advisory_lock_connection] object_id: 154060, pg_backend_pid: 44833
main: == [advisory_lock_connection] object_id: 154060, pg_backend_pid: 44933
main: == 20250910043105 AddWorkspacesProxyOptionsInAgentConfig: migrating ===========
main: -- add_column(:workspaces_agent_configs, :gitlab_workspaces_proxy_http_enabled, :boolean, {:null=>false, :default=>true, :if_not_exists=>true})
main:    -> 0.0056s
main: -- add_column(:workspaces_agent_configs, :gitlab_workspaces_proxy_ssh_enabled, :boolean, {:null=>false, :default=>true, :if_not_exists=>true})
main:    -> 0.0068s
main: == 20250910043105 AddWorkspacesProxyOptionsInAgentConfig: migrated (0.0161s) ==

main: == [advisory_lock_connection] object_id: 154060, pg_backend_pid: 44933

Down

➜ scripts/database/migrate.rb -t down
$ bin/rails db:migrate:down:ci db:migrate:down:main VERSION=20250910043105
ci: == [advisory_lock_connection] object_id: 154060, pg_backend_pid: 43213
ci: == 20250910043105 AddWorkspacesProxyOptionsInAgentConfig: reverting ===========
ci: -- remove_column(:workspaces_agent_configs, :gitlab_workspaces_proxy_http_enabled, {:if_exists=>true})
ci:    -> 0.0238s
ci: -- remove_column(:workspaces_agent_configs, :gitlab_workspaces_proxy_ssh_enabled, {:if_exists=>true})
ci:    -> 0.0039s
ci: == 20250910043105 AddWorkspacesProxyOptionsInAgentConfig: reverted (0.0364s) ==

ci: == [advisory_lock_connection] object_id: 154060, pg_backend_pid: 43213
main: == [advisory_lock_connection] object_id: 154060, pg_backend_pid: 43963
main: == 20250910043105 AddWorkspacesProxyOptionsInAgentConfig: reverting ===========
main: -- remove_column(:workspaces_agent_configs, :gitlab_workspaces_proxy_http_enabled, {:if_exists=>true})
main:    -> 0.0042s
main: -- remove_column(:workspaces_agent_configs, :gitlab_workspaces_proxy_ssh_enabled, {:if_exists=>true})
main:    -> 0.0022s
main: == 20250910043105 AddWorkspacesProxyOptionsInAgentConfig: reverted (0.0100s) ==

main: == [advisory_lock_connection] object_id: 154060, pg_backend_pid: 43963

Screenshots or screen recordings

N.A.

How to set up and validate locally

N.A.

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.

Edited by Vishal Tak

Merge request reports

Loading