Make GL_VSCODE_HOST configurable in workspace VS Code startup

What does this MR do and why?

This MR makes GL_VSCODE_HOST configurable by applying the same if [ -z ... ] defaulting pattern as GL_VSCODE_PORT and GL_VSCODE_LOG_LEVEL, so an explicitly provided value is respected while the default remains 0.0.0.0 when unset. GL_VSCODE_HOST was being unconditionally set to 0.0.0.0, silently discarding any value provided via the workspace's devfile. This prevented the editor server from being reachable in IPv6-only or dual-stack environments, where binding to :: is required.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

To test this locally, run the spec that executes the script and checks its output:

bundle exec rspec ee/spec/lib/remote_development/workspace_operations/create/main_component_updater_start_vscode_script_spec.rb

It covers both cases: the host defaults to 0.0.0.0 when unset, and a value like :: is respected when set. The second check fails without this change and passes with it. This tests the shell logic. It doesn't test real IPv6 networking end to end, which would need an actual IPv6-only cluster.

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.

Related to #606511

Edited by Sushrut Hundikar

Merge request reports

Loading
Loading