diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-06-22 13:48:52 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2022-06-22 13:48:52 +0300 |
commit | 892415d6fb660d866f6625821994128fc5491bb8 (patch) | |
tree | 811c62ec1fbef7d08d08f7b765acd1dc635cfebe | |
parent | 632244d99c5a0080ff31ece43c0831a9ab192967 (diff) |
repository: Always use long-running LFS filter process in GetArchivepks-get-archive-remove-filter-process-ff
In 0603c758d (repository: Use long-running filter process for converting
LFS pointers, 2022-05-31), we have introduced support for the long-lived
process protocol so that we only require a single `gitaly-lfs-smudge`
to convert multiple LFS pointers instead of one per pointer. This has
been wired up for `GetArchive()` to speed up this RPC in large repos
with many pointers.
This change was rolled out on June 13th without any issues having been
observed so far. So let's remove the feature flag so that we always use
the long-running filter process protocol.
-rw-r--r-- | internal/gitaly/service/repository/archive.go | 7 | ||||
-rw-r--r-- | internal/gitaly/service/repository/archive_test.go | 20 | ||||
-rw-r--r-- | internal/metadata/featureflag/ff_get_archive_lfs_filter_process.go | 5 |
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) |