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:
authorJustin Tobler <jtobler@gitlab.com>2023-11-15 02:03:59 +0300
committerJustin Tobler <jtobler@gitlab.com>2023-11-15 02:03:59 +0300
commitb257ea019f104a0a396c8508bed3a3fd6dca2e38 (patch)
tree76a77450ffe13b636f897d3905725cc3ba09885f
parent3dc612b6741b132d13b54b8516e5666142f02e63 (diff)
featureflag: Remove `TransactionalLinkRepository`
The `TransactionalLinkRepository` feature flag, when enabled, makes the `LinkRepositoryToObjectPool` RPC transactional. Remove the feature flag so that the RPC is always transactional for clients.
-rw-r--r--internal/featureflag/ff_transactional_link_repository.go10
-rw-r--r--internal/gitaly/service/objectpool/link_test.go22
-rw-r--r--internal/gitaly/service/repository/objects_size_test.go7
-rw-r--r--internal/gitaly/service/repository/replicate_test.go1
-rw-r--r--internal/gitaly/service/repository/size_test.go6
-rw-r--r--internal/gitaly/service/smarthttp/inforefs_test.go5
-rw-r--r--internal/gitaly/service/ssh/receive_pack_test.go5
-rw-r--r--internal/praefect/coordinator.go2
-rw-r--r--internal/praefect/coordinator_test.go5
9 files changed, 10 insertions, 53 deletions
diff --git a/internal/featureflag/ff_transactional_link_repository.go b/internal/featureflag/ff_transactional_link_repository.go
deleted file mode 100644
index 69edd81ba..000000000
--- a/internal/featureflag/ff_transactional_link_repository.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package featureflag
-
-// TransactionalLinkRepository enables transactions to be used when linking a repository to an
-// object pool via the `LinkRepositoryToObjectPool` RPC.
-var TransactionalLinkRepository = NewFeatureFlag(
- "transactional_link_repository",
- "v16.4.0",
- "https://gitlab.com/gitlab-org/gitaly/-/issues/5587",
- true,
-)
diff --git a/internal/gitaly/service/objectpool/link_test.go b/internal/gitaly/service/objectpool/link_test.go
index b497f9c23..cf38812da 100644
--- a/internal/gitaly/service/objectpool/link_test.go
+++ b/internal/gitaly/service/objectpool/link_test.go
@@ -1,13 +1,11 @@
package objectpool
import (
- "context"
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/require"
- "gitlab.com/gitlab-org/gitaly/v16/internal/featureflag"
"gitlab.com/gitlab-org/gitaly/v16/internal/git"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/localrepo"
@@ -21,11 +19,8 @@ import (
func TestLink(t *testing.T) {
t.Parallel()
- testhelper.NewFeatureSets(featureflag.TransactionalLinkRepository).Run(t, testLink)
-}
-func testLink(t *testing.T, ctx context.Context) {
- t.Parallel()
+ ctx := testhelper.Context(t)
cfg, repo, _, _, client := setup(t, ctx, testserver.WithDisablePraefect())
@@ -83,11 +78,8 @@ func testLink(t *testing.T, ctx context.Context) {
func TestLink_idempotent(t *testing.T) {
t.Parallel()
- testhelper.NewFeatureSets(featureflag.TransactionalLinkRepository).Run(t, testLinkIdempotent)
-}
-func testLinkIdempotent(t *testing.T, ctx context.Context) {
- t.Parallel()
+ ctx := testhelper.Context(t)
cfg, repoProto, _, _, client := setup(t, ctx)
@@ -107,11 +99,8 @@ func testLinkIdempotent(t *testing.T, ctx context.Context) {
func TestLink_noClobber(t *testing.T) {
t.Parallel()
- testhelper.NewFeatureSets(featureflag.TransactionalLinkRepository).Run(t, testLinkNoClobber)
-}
-func testLinkNoClobber(t *testing.T, ctx context.Context) {
- t.Parallel()
+ ctx := testhelper.Context(t)
cfg, repoProto, repoPath, _, client := setup(t, ctx)
poolProto, _, _ := createObjectPool(t, ctx, cfg, repoProto)
@@ -136,11 +125,8 @@ func testLinkNoClobber(t *testing.T, ctx context.Context) {
func TestLink_noPool(t *testing.T) {
t.Parallel()
- testhelper.NewFeatureSets(featureflag.TransactionalLinkRepository).Run(t, testLinkNoPool)
-}
-func testLinkNoPool(t *testing.T, ctx context.Context) {
- t.Parallel()
+ ctx := testhelper.Context(t)
cfg, repo, _, _, client := setup(t, ctx)
diff --git a/internal/gitaly/service/repository/objects_size_test.go b/internal/gitaly/service/repository/objects_size_test.go
index 6a441985e..90f798245 100644
--- a/internal/gitaly/service/repository/objects_size_test.go
+++ b/internal/gitaly/service/repository/objects_size_test.go
@@ -1,13 +1,11 @@
package repository
import (
- "context"
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/require"
- "gitlab.com/gitlab-org/gitaly/v16/internal/featureflag"
"gitlab.com/gitlab-org/gitaly/v16/internal/git"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/storage"
@@ -18,11 +16,8 @@ import (
func TestObjectsSize(t *testing.T) {
t.Parallel()
- testhelper.NewFeatureSets(featureflag.TransactionalLinkRepository).Run(t, testObjectsSize)
-}
-func testObjectsSize(t *testing.T, ctx context.Context) {
- t.Parallel()
+ ctx := testhelper.Context(t)
cfg, client := setupRepositoryService(t)
diff --git a/internal/gitaly/service/repository/replicate_test.go b/internal/gitaly/service/repository/replicate_test.go
index fde02ce8e..701e01496 100644
--- a/internal/gitaly/service/repository/replicate_test.go
+++ b/internal/gitaly/service/repository/replicate_test.go
@@ -52,7 +52,6 @@ attributes from HEAD.`)
featureflag.ReplicateRepositoryObjectPool,
featureflag.InterceptReplicateRepository,
featureflag.TransactionalAlternatesDisconnect,
- featureflag.TransactionalLinkRepository,
).Run(t, testReplicateRepository)
}
diff --git a/internal/gitaly/service/repository/size_test.go b/internal/gitaly/service/repository/size_test.go
index 0ed9b7516..0e0ef55d4 100644
--- a/internal/gitaly/service/repository/size_test.go
+++ b/internal/gitaly/service/repository/size_test.go
@@ -8,7 +8,6 @@ import (
"testing"
"github.com/stretchr/testify/require"
- "gitlab.com/gitlab-org/gitaly/v16/internal/featureflag"
"gitlab.com/gitlab-org/gitaly/v16/internal/git"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/quarantine"
@@ -26,11 +25,8 @@ func TestRepositorySize_poolMember(t *testing.T) {
Object pools are not yet supported with transaction management.`)
t.Parallel()
- testhelper.NewFeatureSets(featureflag.TransactionalLinkRepository).Run(t, testRepositorySizePoolMember)
-}
-func testRepositorySizePoolMember(t *testing.T, ctx context.Context) {
- t.Parallel()
+ ctx := testhelper.Context(t)
cfg, client := setupRepositoryService(t)
diff --git a/internal/gitaly/service/smarthttp/inforefs_test.go b/internal/gitaly/service/smarthttp/inforefs_test.go
index a7a096247..ba458bac9 100644
--- a/internal/gitaly/service/smarthttp/inforefs_test.go
+++ b/internal/gitaly/service/smarthttp/inforefs_test.go
@@ -322,10 +322,7 @@ func TestInfoRefsReceivePack_hiddenRefs(t *testing.T) {
Object pools are not yet support with WAL. This test is testing with a pooled repository.`)
t.Parallel()
- testhelper.NewFeatureSets(
- featureflag.TransactionalLinkRepository,
- featureflag.UploadPackBoundaryBitmapTraversal,
- ).Run(t, testInfoRefsReceivePackHiddenRefs)
+ testhelper.NewFeatureSets(featureflag.UploadPackBoundaryBitmapTraversal).Run(t, testInfoRefsReceivePackHiddenRefs)
}
func testInfoRefsReceivePackHiddenRefs(t *testing.T, ctx context.Context) {
diff --git a/internal/gitaly/service/ssh/receive_pack_test.go b/internal/gitaly/service/ssh/receive_pack_test.go
index 923b5d2e2..1cfa2fcd5 100644
--- a/internal/gitaly/service/ssh/receive_pack_test.go
+++ b/internal/gitaly/service/ssh/receive_pack_test.go
@@ -425,11 +425,8 @@ func TestReceivePack_hidesObjectPoolReferences(t *testing.T) {
Object pools are not yet support with WAL. This test is testing with a pooled repository.`)
t.Parallel()
- testhelper.NewFeatureSets(featureflag.TransactionalLinkRepository).Run(t, testReceivePackHidesObjectPoolReferences)
-}
-func testReceivePackHidesObjectPoolReferences(t *testing.T, ctx context.Context) {
- t.Parallel()
+ ctx := testhelper.Context(t)
cfg := testcfg.Build(t)
cfg.SocketPath = runSSHServer(t, cfg)
diff --git a/internal/praefect/coordinator.go b/internal/praefect/coordinator.go
index ac1d554f3..60a7882ec 100644
--- a/internal/praefect/coordinator.go
+++ b/internal/praefect/coordinator.go
@@ -53,7 +53,7 @@ var transactionRPCs = map[string]transactionsCondition{
"/gitaly.ConflictsService/ResolveConflicts": transactionsEnabled,
"/gitaly.ObjectPoolService/DisconnectGitAlternates": transactionsFlag(featureflag.TransactionalAlternatesDisconnect),
"/gitaly.ObjectPoolService/FetchIntoObjectPool": transactionsEnabled,
- "/gitaly.ObjectPoolService/LinkRepositoryToObjectPool": transactionsFlag(featureflag.TransactionalLinkRepository),
+ "/gitaly.ObjectPoolService/LinkRepositoryToObjectPool": transactionsEnabled,
"/gitaly.OperationService/UserApplyPatch": transactionsEnabled,
"/gitaly.OperationService/UserCherryPick": transactionsEnabled,
"/gitaly.OperationService/UserCommitFiles": transactionsEnabled,
diff --git a/internal/praefect/coordinator_test.go b/internal/praefect/coordinator_test.go
index 8f781ed01..61b731721 100644
--- a/internal/praefect/coordinator_test.go
+++ b/internal/praefect/coordinator_test.go
@@ -2053,10 +2053,7 @@ func TestStreamDirectorStorageScopeError(t *testing.T) {
func TestDisabledTransactionsWithFeatureFlag(t *testing.T) {
t.Parallel()
- testhelper.NewFeatureSets(
- featureflag.TransactionalAlternatesDisconnect,
- featureflag.TransactionalLinkRepository,
- ).Run(t, testDisabledTransactionsWithFeatureFlag)
+ testhelper.NewFeatureSets(featureflag.TransactionalAlternatesDisconnect).Run(t, testDisabledTransactionsWithFeatureFlag)
}
func testDisabledTransactionsWithFeatureFlag(t *testing.T, ctx context.Context) {