[go: up one dir, main page]

Remove feature flag workspaces_shallow_clone_project

Issue: FF Cleanup: workspaces_shallow_clone_project (#558154 - closed)

What does this MR do and why?

This change removes a feature flag called workspaces_shallow_clone_project and makes the shallow clone functionality permanently enabled for GitLab workspaces.

Previously, this feature was controlled by a toggle that could be turned on or off - when enabled, it would clone only recent project history instead of the entire repository history, making the process faster.

The code has been simplified by removing all the conditional logic that checked whether the feature flag was enabled, and now shallow cloning will always be used when creating workspaces.

The documentation was also updated to reflect that this feature progressed from being disabled by default in version 18.2, to enabled on GitLab.com in 18.3, and finally became generally available (always on) in version 18.4.

All related test code that verified the feature flag behavior has been removed since it's no longer needed.

Changelog: added

References

Related to: FF Cleanup: workspaces_shallow_clone_project (#558154 - closed)

Screenshots or screen recordings

This MR does not contain any UI changes

How to set up and validate locally

  • Setup workspaces locally following this guide
  • Checkout this branch, then go to http://gdk.test:3000/-/remote_development/workspaces and create a new workspace.
  • (Optional but preferable) Select a large project like Gitlab FOSS or gitlab for the workspace.
  • Open the workspace and check the log file from the terminal:
cat /projects/workspace-logs/poststart-stdout.log

It should look something like this:

2025-09-08T18:24:10+00:00: ----------------------------------------
2025-09-08T18:24:10+00:00: Running poststart commands for workspace...
2025-09-08T18:24:10+00:00: ----------------------------------------
2025-09-08T18:24:10+00:00: Running internal blocking poststart commands script...
2025-09-08T18:24:10+00:00: ----------------------------------------
2025-09-08T18:24:10+00:00: Running /workspace-scripts/gl-clone-project-command...
2025-09-08T18:24:10+00:00: ----------------------------------------
2025-09-08T18:24:10+00:00: Cloning project if necessary...
2025-09-08T18:24:10+00:00: Cloning project with "--depth 10" option
2025-09-08T18:24:11+00:00: Project cloning successful
2025-09-08T18:24:11+00:00: Updated '/projects/.gl_project_cloning_successful' file to indicate successful project cloning
2025-09-08T18:24:12+00:00: Successfully finished cloning project.
2025-09-08T18:24:12+00:00: ----------------------------------------
2025-09-08T18:24:12+00:00: Finished running /workspace-scripts/gl-clone-project-command.
2025-09-08T18:24:12+00:00: ----------------------------------------
2025-09-08T18:24:12+00:00: Running /workspace-scripts/gl-clone-unshallow-command...
2025-09-08T18:24:12+00:00: ----------------------------------------
  • If the repo was large enough and it was indeed shallow cloned then there will be a follow up unshallow process that gets executed. This can be confirmed by looking at the log file that gets created here: /projects/workspace-logs/clone-unshallow.log

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 Daniyal Arshad

Merge request reports

Loading