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:
-rw-r--r--changelogs/unreleased/pks-go-user-merge-to-ref-remove-ff.yml5
-rw-r--r--internal/gitaly/service/operations/merge.go4
-rw-r--r--internal/gitaly/service/operations/merge_test.go20
-rw-r--r--internal/metadata/featureflag/feature_flags.go3
4 files changed, 16 insertions, 16 deletions
diff --git a/changelogs/unreleased/pks-go-user-merge-to-ref-remove-ff.yml b/changelogs/unreleased/pks-go-user-merge-to-ref-remove-ff.yml
new file mode 100644
index 000000000..321d2ee7b
--- /dev/null
+++ b/changelogs/unreleased/pks-go-user-merge-to-ref-remove-ff.yml
@@ -0,0 +1,5 @@
+---
+title: 'operations: Remove GoUserMergeToRef feature flag'
+merge_request: 2879
+author:
+type: added
diff --git a/internal/gitaly/service/operations/merge.go b/internal/gitaly/service/operations/merge.go
index 3cbd0a465..f4c729bb8 100644
--- a/internal/gitaly/service/operations/merge.go
+++ b/internal/gitaly/service/operations/merge.go
@@ -350,7 +350,9 @@ func (s *Server) UserMergeToRef(ctx context.Context, in *gitalypb.UserMergeToRef
return nil, helper.ErrInvalidArgument(err)
}
- if featureflag.IsEnabled(ctx, featureflag.GoUserMergeToRef) && !in.AllowConflicts {
+ // Ruby has grown a new feature since being ported to Go, and we don't
+ // handle that yet.
+ if !in.AllowConflicts {
return s.userMergeToRef(ctx, in)
}
diff --git a/internal/gitaly/service/operations/merge_test.go b/internal/gitaly/service/operations/merge_test.go
index c9b467fb1..1f3ec0240 100644
--- a/internal/gitaly/service/operations/merge_test.go
+++ b/internal/gitaly/service/operations/merge_test.go
@@ -494,10 +494,9 @@ func TestFailedUserFFBranchDueToHooks(t *testing.T) {
}
func TestSuccessfulUserMergeToRefRequest(t *testing.T) {
- testWithFeature(t, featureflag.GoUserMergeToRef, testSuccessfulUserMergeToRefRequest)
-}
+ ctx, cleanup := testhelper.Context()
+ defer cleanup()
-func testSuccessfulUserMergeToRefRequest(t *testing.T, ctx context.Context) {
serverSocketPath, stop := runOperationServiceServer(t)
defer stop()
@@ -604,10 +603,9 @@ func testSuccessfulUserMergeToRefRequest(t *testing.T, ctx context.Context) {
}
func TestConflictsOnUserMergeToRefRequest(t *testing.T) {
- testWithFeature(t, featureflag.GoUserMergeToRef, testConflictsOnUserMergeToRefRequest)
-}
+ ctx, cleanup := testhelper.Context()
+ defer cleanup()
-func testConflictsOnUserMergeToRefRequest(t *testing.T, ctx context.Context) {
serverSocketPath, stop := runOperationServiceServer(t)
defer stop()
@@ -655,10 +653,9 @@ func testConflictsOnUserMergeToRefRequest(t *testing.T, ctx context.Context) {
}
func TestFailedUserMergeToRefRequest(t *testing.T) {
- testWithFeature(t, featureflag.GoUserMergeToRef, testFailedUserMergeToRefRequest)
-}
+ ctx, cleanup := testhelper.Context()
+ defer cleanup()
-func testFailedUserMergeToRefRequest(t *testing.T, ctx context.Context) {
serverSocketPath, stop := runOperationServiceServer(t)
defer stop()
@@ -758,10 +755,9 @@ func testFailedUserMergeToRefRequest(t *testing.T, ctx context.Context) {
}
func TestUserMergeToRefIgnoreHooksRequest(t *testing.T) {
- testWithFeature(t, featureflag.GoUserMergeToRef, testUserMergeToRefIgnoreHooksRequest)
-}
+ ctx, cleanup := testhelper.Context()
+ defer cleanup()
-func testUserMergeToRefIgnoreHooksRequest(t *testing.T, ctx context.Context) {
serverSocketPath, stop := runOperationServiceServer(t)
defer stop()
diff --git a/internal/metadata/featureflag/feature_flags.go b/internal/metadata/featureflag/feature_flags.go
index 18fd4f58e..ad184ab3f 100644
--- a/internal/metadata/featureflag/feature_flags.go
+++ b/internal/metadata/featureflag/feature_flags.go
@@ -20,8 +20,6 @@ var (
LogCommandStats = FeatureFlag{Name: "log_command_stats", OnByDefault: false}
// GoUserMergeBranch enables the Go implementation of UserMergeBranch
GoUserMergeBranch = FeatureFlag{Name: "go_user_merge_branch", OnByDefault: false}
- // GoUserMergeToRef enable the Go implementation of UserMergeToRef
- GoUserMergeToRef = FeatureFlag{Name: "go_user_merge_to_ref", OnByDefault: true}
// GoUserFFBranch enables the Go implementation of UserFFBranch
GoUserFFBranch = FeatureFlag{Name: "go_user_ff_branch", OnByDefault: false}
// GoUserCreateBranch enables the Go implementation of UserCreateBranch
@@ -54,7 +52,6 @@ var All = []FeatureFlag{
RubyReferenceTransactionHook,
LogCommandStats,
GoUserMergeBranch,
- GoUserMergeToRef,
GoUserFFBranch,
GoUserCreateBranch,
GoUserDeleteBranch,