From 67a284bd3da2fdd8e08a918da59b66ff4d33e4a1 Mon Sep 17 00:00:00 2001 From: Daniyal Arshad Date: Mon, 8 Sep 2025 16:43:12 -0400 Subject: [PATCH 1/2] Remove feature flag workspaces_shallow_clone_project - The FF was enabled globally on Gitlab.com in 18.3 - No issues detected, so we will remove this FF and keep the new code Changelog: added --- doc/user/workspace/_index.md | 2 ++ .../beta/workspaces_shallow_clone_project.yml | 9 -------- .../internal_poststart_commands_inserter.rb | 10 +-------- ...ternal_poststart_commands_inserter_spec.rb | 21 ------------------- 4 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 ee/config/feature_flags/beta/workspaces_shallow_clone_project.yml diff --git a/doc/user/workspace/_index.md b/doc/user/workspace/_index.md index d521523da5d751..0b5811b818fd1d 100644 --- a/doc/user/workspace/_index.md +++ b/doc/user/workspace/_index.md @@ -577,6 +577,8 @@ when you stop and restart a workspace. {{< history >}} - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/543982) in GitLab 18.2 [with a flag](../../administration/feature_flags/_index.md) named `workspaces_shallow_clone_project`. Disabled by default. +- [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/550330) in GitLab 18.3. +- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/558154) in GitLab 18.4. Feature flag `workspaces_shallow_clone_project` removed. {{< /history >}} diff --git a/ee/config/feature_flags/beta/workspaces_shallow_clone_project.yml b/ee/config/feature_flags/beta/workspaces_shallow_clone_project.yml deleted file mode 100644 index d8e96cb15d02c5..00000000000000 --- a/ee/config/feature_flags/beta/workspaces_shallow_clone_project.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: workspaces_shallow_clone_project -feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/543982 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/194906 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/550330 -milestone: '18.2' -group: group::remote development -type: beta -default_enabled: false diff --git a/ee/lib/remote_development/workspace_operations/create/internal_poststart_commands_inserter.rb b/ee/lib/remote_development/workspace_operations/create/internal_poststart_commands_inserter.rb index 241926795b699f..c6dfc08a2a441c 100644 --- a/ee/lib/remote_development/workspace_operations/create/internal_poststart_commands_inserter.rb +++ b/ee/lib/remote_development/workspace_operations/create/internal_poststart_commands_inserter.rb @@ -37,7 +37,7 @@ def self.insert(context) clone_dir = "#{volume_path}/#{project.path}" project_url = project.http_url_to_repo - clone_depth_option = workspaces_shallow_clone_project_feature_enabled?(project) ? CLONE_DEPTH_OPTION : "" + clone_depth_option = CLONE_DEPTH_OPTION # Add the clone_project event clone_project_command_id = "gl-clone-project-command" @@ -155,14 +155,6 @@ def self.insert(context) context end - - # @param [Project] project - # @return [TrueClass, FalseClass] - def self.workspaces_shallow_clone_project_feature_enabled?(project) - Feature.enabled?(:workspaces_shallow_clone_project, project) - end - - private_class_method :workspaces_shallow_clone_project_feature_enabled? end end end diff --git a/ee/spec/lib/remote_development/workspace_operations/create/internal_poststart_commands_inserter_spec.rb b/ee/spec/lib/remote_development/workspace_operations/create/internal_poststart_commands_inserter_spec.rb index dc8df8225250d8..8e2767b7c81767 100644 --- a/ee/spec/lib/remote_development/workspace_operations/create/internal_poststart_commands_inserter_spec.rb +++ b/ee/spec/lib/remote_development/workspace_operations/create/internal_poststart_commands_inserter_spec.rb @@ -47,18 +47,10 @@ end end - let(:workspaces_shallow_clone_project_feature_enabled) { true } - subject(:returned_value) do described_class.insert(context) end - before do - expect(described_class) # rubocop:disable RSpec/ExpectInHook -- We are intentionally doing an expect here, so we will be forced to remove this code when we remove the feature flag - .to receive(:workspaces_shallow_clone_project_feature_enabled?) - .and_return(workspaces_shallow_clone_project_feature_enabled) - end - it "updates the devfile" do expect(returned_value[:processed_devfile]).to eq(expected_processed_devfile) end @@ -75,17 +67,4 @@ expect(command_line).to include("clone-unshallow.log") expect(command_line).to include("git rev-parse --is-shallow-repository") end - - context "when workspaces_shallow_clone_project feature option is disabled" do - let(:workspaces_shallow_clone_project_feature_enabled) { false } - - it "does not include depth option in clone command" do - expect(clone_command).not_to be_nil - expect(clone_command[:exec][:commandLine]).not_to include("--depth") - end - - it "does not add clone unshallow command" do - expect(clone_unshallow_command).to be_nil - end - end end -- GitLab From 0f6bebcdf8777f2f98c3c93d06af4a073e8cfb00 Mon Sep 17 00:00:00 2001 From: Daniyal Arshad Date: Tue, 9 Sep 2025 10:57:17 -0400 Subject: [PATCH 2/2] remove alert in workspacee docs --- doc/user/workspace/_index.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/doc/user/workspace/_index.md b/doc/user/workspace/_index.md index 0b5811b818fd1d..6220604ba55547 100644 --- a/doc/user/workspace/_index.md +++ b/doc/user/workspace/_index.md @@ -582,14 +582,6 @@ when you stop and restart a workspace. {{< /history >}} -{{< alert type="flag" >}} - -The availability of this feature is controlled by a feature flag. -For more information, see the history. -This feature is available for testing, but not ready for production use. - -{{< /alert >}} - When you create a workspace, GitLab uses shallow cloning to improve performance. A shallow clone downloads only the latest commit history instead of the complete Git history, which significantly reduces the initial clone time for large repositories. -- GitLab