From 3e262864c8830120d83f35d029f88b03b1a9df03 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Fri, 19 Jan 2024 12:18:04 +0100 Subject: git: Use Git version 2.43 only Remove the feature flag to toggle the use of v2.43, enable it by default, and remove the use of v2.42. Label: maintenance::dependency --- internal/featureflag/ff_git_v243.go | 9 --------- internal/git/execution_environment.go | 6 ------ internal/testhelper/testhelper.go | 2 -- 3 files changed, 17 deletions(-) delete mode 100644 internal/featureflag/ff_git_v243.go diff --git a/internal/featureflag/ff_git_v243.go b/internal/featureflag/ff_git_v243.go deleted file mode 100644 index 313809990..000000000 --- a/internal/featureflag/ff_git_v243.go +++ /dev/null @@ -1,9 +0,0 @@ -package featureflag - -// GitV243 enables the use of Git version 2.43. -var GitV243 = NewFeatureFlag( - "git_v243", - "v16.7.0", - "https://gitlab.com/gitlab-org/gitaly/-/issues/5739", - false, -) diff --git a/internal/git/execution_environment.go b/internal/git/execution_environment.go index dd9cd0844..9f5fbf56f 100644 --- a/internal/git/execution_environment.go +++ b/internal/git/execution_environment.go @@ -26,12 +26,6 @@ var ( defaultExecutionEnvironmentConstructors = []ExecutionEnvironmentConstructor{ BundledGitEnvironmentConstructor{ Suffix: "-v2.43", - FeatureFlags: []featureflag.FeatureFlag{ - featureflag.GitV243, - }, - }, - BundledGitEnvironmentConstructor{ - Suffix: "-v2.42", }, DistributedGitEnvironmentConstructor{}, } diff --git a/internal/testhelper/testhelper.go b/internal/testhelper/testhelper.go index 39f371de3..452c5b000 100644 --- a/internal/testhelper/testhelper.go +++ b/internal/testhelper/testhelper.go @@ -260,8 +260,6 @@ func ContextWithoutCancel(opts ...ContextOpt) context.Context { ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.UseResizableSemaphoreInConcurrencyLimiter, rand.Int()%2 == 0) // Randomly enable ExecCommandDirectlyInCgroup. ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.ExecCommandDirectlyInCgroup, rand.Int()%2 == 0) - // Randomly enable newer Git version. - ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.GitV243, rand.Int()%2 == 0) // Disable LogGitTraces ctx = featureflag.ContextWithFeatureFlag(ctx, featureflag.LogGitTraces, false) -- cgit v1.2.3 From 2f955d375f1a58dcedfee56f7635507ef3fac565 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Fri, 19 Jan 2024 12:20:00 +0100 Subject: Makefile: Stop compiling and installing Git v2.42 In previous commit we've dropped all use of Git v2.42, so now we can stop building it. --- Makefile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index ba51a9acc..89c999e3c 100644 --- a/Makefile +++ b/Makefile @@ -126,8 +126,6 @@ GIT_EXECUTABLES += git-http-backend ## WITH_BUNDLED_GIT=YesPlease. Can be set to an arbitrary Git revision with ## tags, branches, and commit ids. GIT_VERSION ?= -## The Git version used for bundled Git v2.42. -GIT_VERSION_2_42 ?= v2.42.0 ## The Git version used for bundled Git v2.43. GIT_VERSION_2_43 ?= v2.43.0 @@ -139,7 +137,7 @@ SKIP_OVERRIDING_GIT_VERSION ?= # The default version is used in case the caller does not set the variable or # if it is either set to the empty string or "default". ifeq (${GIT_VERSION:default=},) - override GIT_VERSION := ${GIT_VERSION_2_42} + override GIT_VERSION := ${GIT_VERSION_2_43} else # Support both vX.Y.Z and X.Y.Z version patterns, since callers across GitLab # use both. @@ -284,15 +282,13 @@ install: build .PHONY: build-bundled-git ## Build bundled Git binaries. -build-bundled-git: build-bundled-git-v2.42 build-bundled-git-v2.43 -build-bundled-git-v2.42: $(patsubst %,${BUILD_DIR}/bin/gitaly-%-v2.42,${GIT_EXECUTABLES}) +build-bundled-git: build-bundled-git-v2.43 build-bundled-git-v2.43: $(patsubst %,${BUILD_DIR}/bin/gitaly-%-v2.43,${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.42 install-bundled-git-v2.43 -install-bundled-git-v2.42: $(patsubst %,${INSTALL_DEST_DIR}/gitaly-%-v2.42,${GIT_EXECUTABLES}) +install-bundled-git: install-bundled-git-v2.43 install-bundled-git-v2.43: $(patsubst %,${INSTALL_DEST_DIR}/gitaly-%-v2.43,${GIT_EXECUTABLES}) ifdef WITH_BUNDLED_GIT @@ -537,10 +533,6 @@ ${DEPENDENCY_DIR}/git-distribution/git: ${DEPENDENCY_DIR}/git-distribution/Makef ${Q}env -u PROFILE -u MAKEFLAGS -u GIT_VERSION ${MAKE} -C "$(