Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Hiltunen <shiltunen@gitlab.com>2022-06-23 12:38:21 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2022-06-23 12:38:21 +0300
commitf8c0438541950ab8a554240b38dc61b006607d74 (patch)
tree2352ec2c6054e7ada2b510b13550e25e1c765336
parent742dba9dbd39bc012760dc6838167536c8c5a5a0 (diff)
parent892415d6fb660d866f6625821994128fc5491bb8 (diff)
Merge branch 'pks-get-archive-remove-filter-process-ff' into 'master'
repository: Always use long-running LFS filter process in GetArchive Closes #4282 See merge request gitlab-org/gitaly!4661
-rw-r--r--internal/gitaly/service/repository/archive.go7
-rw-r--r--internal/gitaly/service/repository/archive_test.go20
-rw-r--r--internal/metadata/featureflag/ff_get_archive_lfs_filter_process.go5
3 files changed, 5 insertions, 27 deletions
diff --git a/internal/gitaly/service/repository/archive.go b/internal/gitaly/service/repository/archive.go
index fd2497ac2..86250e29b 100644
--- a/internal/gitaly/service/repository/archive.go
+++ b/internal/gitaly/service/repository/archive.go
@@ -18,7 +18,6 @@ import (
"gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/storage"
"gitlab.com/gitlab-org/gitaly/v15/internal/helper"
"gitlab.com/gitlab-org/gitaly/v15/internal/log"
- "gitlab.com/gitlab-org/gitaly/v15/internal/metadata/featureflag"
"gitlab.com/gitlab-org/gitaly/v15/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/v15/streamio"
"google.golang.org/protobuf/proto"
@@ -199,11 +198,7 @@ func (s *server) handleArchive(ctx context.Context, p archiveParams) error {
GlRepository: p.in.GetRepository().GetGlRepository(),
Gitlab: s.cfg.Gitlab,
TLS: s.cfg.TLS,
- DriverType: smudge.DriverTypeFilter,
- }
-
- if featureflag.GetArchiveLfsFilterProcess.IsEnabled(ctx) {
- smudgeCfg.DriverType = smudge.DriverTypeProcess
+ DriverType: smudge.DriverTypeProcess,
}
smudgeEnv, err := smudgeCfg.Environment()
diff --git a/internal/gitaly/service/repository/archive_test.go b/internal/gitaly/service/repository/archive_test.go
index caa64a00b..cdb347617 100644
--- a/internal/gitaly/service/repository/archive_test.go
+++ b/internal/gitaly/service/repository/archive_test.go
@@ -3,7 +3,6 @@ package repository
import (
"archive/zip"
"bytes"
- "context"
"fmt"
"io"
"os"
@@ -18,7 +17,6 @@ import (
"gitlab.com/gitlab-org/gitaly/v15/internal/gitaly/config"
"gitlab.com/gitlab-org/gitaly/v15/internal/gitlab"
"gitlab.com/gitlab-org/gitaly/v15/internal/helper/text"
- "gitlab.com/gitlab-org/gitaly/v15/internal/metadata/featureflag"
"gitlab.com/gitlab-org/gitaly/v15/internal/testhelper"
"gitlab.com/gitlab-org/gitaly/v15/internal/testhelper/testcfg"
"gitlab.com/gitlab-org/gitaly/v15/internal/testhelper/testserver"
@@ -172,11 +170,9 @@ func TestGetArchiveSuccess(t *testing.T) {
func TestGetArchive_includeLfsBlobs(t *testing.T) {
t.Parallel()
- testhelper.NewFeatureSets(featureflag.GetArchiveLfsFilterProcess).Run(t, testGetArchiveIncludeLfsBlobs)
-}
-func testGetArchiveIncludeLfsBlobs(t *testing.T, ctx context.Context) {
- t.Parallel()
+ ctx := testhelper.Context(t)
+
defaultOptions := gitlab.TestServerOptions{
SecretToken: secretToken,
LfsBody: lfsBody,
@@ -478,14 +474,10 @@ func TestGetArchivePathInjection(t *testing.T) {
func TestGetArchive_environment(t *testing.T) {
t.Parallel()
- testhelper.NewFeatureSets(featureflag.GetArchiveLfsFilterProcess).Run(t, testGetArchiveEnvironment)
-}
-func testGetArchiveEnvironment(t *testing.T, ctx context.Context) {
testhelper.SkipWithPraefect(t, "It's not possible to create repositories through the API with the git command overwritten by the script.")
- t.Parallel()
-
+ ctx := testhelper.Context(t)
cfg := testcfg.Build(t)
gitCmdFactory := gittest.NewInterceptingCommandFactory(ctx, t, cfg, func(git.ExecutionEnvironment) string {
@@ -512,11 +504,7 @@ func testGetArchiveEnvironment(t *testing.T, ctx context.Context) {
GlRepository: gittest.GlRepository,
Gitlab: cfg.Gitlab,
TLS: cfg.TLS,
- DriverType: smudge.DriverTypeFilter,
- }
-
- if featureflag.GetArchiveLfsFilterProcess.IsEnabled(ctx) {
- smudgeCfg.DriverType = smudge.DriverTypeProcess
+ DriverType: smudge.DriverTypeProcess,
}
smudgeEnv, err := smudgeCfg.Environment()
diff --git a/internal/metadata/featureflag/ff_get_archive_lfs_filter_process.go b/internal/metadata/featureflag/ff_get_archive_lfs_filter_process.go
deleted file mode 100644
index 489f42f3a..000000000
--- a/internal/metadata/featureflag/ff_get_archive_lfs_filter_process.go
+++ /dev/null
@@ -1,5 +0,0 @@
-package featureflag
-
-// GetArchiveLfsFilterProcess enables the use of a long-running filter process to smudge LFS
-// pointers to their contents.
-var GetArchiveLfsFilterProcess = NewFeatureFlag("get_archive_lfs_filter_process", false)