[Feature flag] Cleanup FF_USE_WINDOWS_LEGACY_PROCESS_STRATEGY
Summary
Remove the FF_USE_WINDOWS_LEGACY_PROCESS_STRATEGY feature flag and the code path it selects.
The flag selects the process setup the runner used on Windows before 16.10. Its default has been false since !4659 (merged) (2024-02-26), with no reverts. It was kept because the current setup could not terminate a job gracefully when the runner runs as a Windows service, so the flag was the only workaround. That defect is fixed and released in 19.4.
Deprecated in !7351 (merged), scheduled for removal in 19.8.
Owners
- Team: GitLab Runner
- Most appropriate Slack channel to reach out to:
#g_runner
What to remove
- The flag entry in
helpers/featureflags/flags.go, and theUseWindowsLegacyProcessStrategyconstant. - The legacy branch in
helpers/process/killer_windows.go. - The legacy short-circuit in
setProcessGroupinhelpers/process/job_windows.go. UseWindowsLegacyProcessStrategyinCommandOptions(helpers/process/commander.go), and its plumbing throughexecutors/shell/shell.goandexecutors/custom/custom.go.- The legacy cases in
helpers/process/killer_windows_test.goandhelpers/process/killer_no_console_integration_test.go. - Regenerate
docs/configuration/feature-flags.mdwithmake update_feature_flags_docs. Do not hand-edit it; the sync is checked in CI.
Grep for the literal FF_USE_WINDOWS_LEGACY_PROCESS_STRATEGY string as well as the Go identifier. Some flags are read through struct tags rather than the featureflags package, so the identifier alone can understate the usage. This flag has no struct-tag consumers, checked on 2026-09-11.
What might happen if this goes wrong
Anyone still setting the flag loses the legacy process setup. Cancelling a job on Windows would then always use the current setup. The fixes in 19.4 cover the case that made the legacy setup necessary, so the risk is that some other Windows configuration still depends on it and has not been reported.
Roll back by reverting the removal MR.
Related
- #39684 (closed) — the deprecation
- #39297 (closed) — the defect that blocked removal
- #39720 (closed) — the force-kill defect
- #39721 (closed) — the coverage that was missing
- gitlab-org#23127 — feature flag lifecycle epic