From 02a031c1b40640fc50486e210d9cd1cea8a7af67 Mon Sep 17 00:00:00 2001 From: Justin Tobler Date: Thu, 31 Jul 2025 08:28:31 -0500 Subject: [PATCH 1/2] featureflag: Remove Git version 2.50 flag The Git version 2.50 feature flag was default enabled in the GitLab 18.2 release. Remove the feature flag. --- internal/featureflag/ff_git_v250.go | 9 --------- internal/git/gitcmd/execution_environment.go | 3 --- internal/testhelper/testhelper.go | 3 --- 3 files changed, 15 deletions(-) delete mode 100644 internal/featureflag/ff_git_v250.go diff --git a/internal/featureflag/ff_git_v250.go b/internal/featureflag/ff_git_v250.go deleted file mode 100644 index d9104944dad..00000000000 --- a/internal/featureflag/ff_git_v250.go +++ /dev/null @@ -1,9 +0,0 @@ -package featureflag - -// GitV250 enables the use Git v2.50. -var GitV250 = NewFeatureFlag( - "git_v250", - "v18.2.0", - "https://gitlab.com/gitlab-org/gitaly/-/issues/6827", - true, -) diff --git a/internal/git/gitcmd/execution_environment.go b/internal/git/gitcmd/execution_environment.go index 560a172ac2c..f2cf817a035 100644 --- a/internal/git/gitcmd/execution_environment.go +++ b/internal/git/gitcmd/execution_environment.go @@ -23,9 +23,6 @@ var ( BundledGitConstructors = []BundledGitEnvironmentConstructor{ { Suffix: "-v2.50", - FeatureFlags: []featureflag.FeatureFlag{ - featureflag.GitV250, - }, }, { Suffix: "-v2.49", diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go index c9d2bf1bef4..eb15352daf8 100644 --- a/internal/testhelper/testhelper.go +++ b/internal/testhelper/testhelper.go @@ -326,9 +326,6 @@ func ContextWithoutCancel(opts ...ContextOpt) context.Context { newRepoReftableEnabled := env.GetString("GIT_DEFAULT_REF_FORMAT", "files") ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.NewRepoReftableBackend, newRepoReftableEnabled == "reftable") - // Randomly enable either Git version 2.49 or 2.50. - ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.GitV250, rnd.Int()%2 == 0) - // Enable snapshot filter ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.SnapshotFilter, true) -- GitLab From 0d6eda3919aa01790210a57bd7b1b917855ea465 Mon Sep 17 00:00:00 2001 From: Justin Tobler Date: Thu, 31 Jul 2025 13:57:34 -0500 Subject: [PATCH 2/2] Makefile: Stop building Git version 2.49 Now that Git version 2.50 was been fully rolled out, stop building Git version 2.49 in the Gitaly Makefile. --- Makefile | 17 ++++------------- internal/git/gitcmd/execution_environment.go | 3 --- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 7eb9167c041..8706ec734c1 100644 --- a/Makefile +++ b/Makefile @@ -161,7 +161,6 @@ GIT_VERSION_PREV ?= e4ef0485fd78fcb05866ea78df35796b904e4a8e # GIT_VERSION_x_xx defines versions for each instance of bundled Git we ship. When a new # major version is added, be sure to update GIT_PACKED_EXECUTABLES, the *-bundled-git targets, # and add new targets under the "# These targets build specific releases of Git." section. -GIT_VERSION_2_49 ?= v2.49.0.gl2 GIT_VERSION_2_50 ?= v2.50.1.gl1 # # OVERRIDE_GIT_VERSION allows you to specify a custom semver value to be reported by the @@ -173,7 +172,7 @@ OVERRIDE_GIT_VERSION ?= ${GIT_VERSION} ifeq (${GIT_VERSION:default=},) # GIT_VERSION should be overridden to the default version of bundled Git. This is only # necessary until https://gitlab.com/gitlab-org/gitaly/-/issues/6195 is complete. - override GIT_VERSION := ${GIT_VERSION_2_49} + override GIT_VERSION := ${GIT_VERSION_2_50} # When GIT_VERSION is not explicitly set, we default to bundled Git. export WITH_BUNDLED_GIT = YesPlease else @@ -275,8 +274,7 @@ ifdef CI endif # Git binaries that are eventually embedded into the Gitaly binary. -GIT_PACKED_EXECUTABLES = $(addprefix ${BUILD_DIR}/bin/gitaly-, $(addsuffix -v2.49, ${GIT_EXECUTABLES})) \ - $(addprefix ${BUILD_DIR}/bin/gitaly-, $(addsuffix -v2.50, ${GIT_EXECUTABLES})) +GIT_PACKED_EXECUTABLES = $(addprefix ${BUILD_DIR}/bin/gitaly-, $(addsuffix -v2.50, ${GIT_EXECUTABLES})) # All executables provided by Gitaly. GITALY_EXECUTABLES = $(addprefix ${BUILD_DIR}/bin/,$(notdir $(shell find ${SOURCE_DIR}/cmd -mindepth 1 -maxdepth 1 -type d -print))) @@ -365,15 +363,13 @@ install: build .PHONY: build-bundled-git ## Build bundled Git binaries. -build-bundled-git: build-bundled-git-v2.49 build-bundled-git-v2.50 -build-bundled-git-v2.49: $(patsubst %,${BUILD_DIR}/bin/gitaly-%-v2.49,${GIT_EXECUTABLES}) +build-bundled-git: build-bundled-git-v2.50 build-bundled-git-v2.50: $(patsubst %,${BUILD_DIR}/bin/gitaly-%-v2.50,${GIT_EXECUTABLES}) .PHONY: install-bundled-git ## Install bundled Git binaries. The target directory can be modified by ## setting PREFIX and DESTDIR. -install-bundled-git: install-bundled-git-v2.49 install-bundled-git-v2.50 -install-bundled-git-v2.49: $(patsubst %,${INSTALL_DEST_DIR}/gitaly-%-v2.49,${GIT_EXECUTABLES}) +install-bundled-git: install-bundled-git-v2.50 install-bundled-git-v2.50: $(patsubst %,${INSTALL_DEST_DIR}/gitaly-%-v2.50,${GIT_EXECUTABLES}) ifdef WITH_BUNDLED_GIT @@ -695,17 +691,12 @@ ${DEPENDENCY_DIR}/git-distribution/build/git: ${DEPENDENCY_DIR}/git-distribution ${Q}touch $@ # These targets build specific releases of Git. -${BUILD_DIR}/bin/gitaly-%-v2.49: override GIT_VERSION = ${GIT_VERSION_2_49} ${BUILD_DIR}/bin/gitaly-%-v2.50: override GIT_VERSION = ${GIT_VERSION_2_50} ifdef USE_MESON -${BUILD_DIR}/bin/gitaly-%-v2.49: ${DEPENDENCY_DIR}/git-v2.49/build/% | ${BUILD_DIR}/bin - ${Q}install $< $@ ${BUILD_DIR}/bin/gitaly-%-v2.50: ${DEPENDENCY_DIR}/git-v2.50/build/% | ${BUILD_DIR}/bin ${Q}install $< $@ else -${BUILD_DIR}/bin/gitaly-%-v2.49: ${DEPENDENCY_DIR}/git-v2.49/% | ${BUILD_DIR}/bin - ${Q}install $< $@ ${BUILD_DIR}/bin/gitaly-%-v2.50: ${DEPENDENCY_DIR}/git-v2.50/% | ${BUILD_DIR}/bin ${Q}install $< $@ endif diff --git a/internal/git/gitcmd/execution_environment.go b/internal/git/gitcmd/execution_environment.go index f2cf817a035..ac6640cd7eb 100644 --- a/internal/git/gitcmd/execution_environment.go +++ b/internal/git/gitcmd/execution_environment.go @@ -24,9 +24,6 @@ var ( { Suffix: "-v2.50", }, - { - Suffix: "-v2.49", - }, } // defaultExecutionEnvironmentConstructors is the list of Git environments supported by the -- GitLab