Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
df2ab6ed
Commit
df2ab6ed
authored
Jan 31, 2022
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove extract_mr_diff_commit_deletions FF
Changelog: added
parent
1436b533
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
32 deletions
+6
-32
app/services/projects/destroy_service.rb
app/services/projects/destroy_service.rb
+1
-4
config/feature_flags/development/extract_mr_diff_commit_deletions.yml
...re_flags/development/extract_mr_diff_commit_deletions.yml
+0
-8
spec/services/projects/destroy_service_spec.rb
spec/services/projects/destroy_service_spec.rb
+5
-20
No files found.
app/services/projects/destroy_service.rb
View file @
df2ab6ed
...
...
@@ -139,10 +139,7 @@ module Projects
destroy_web_hooks!
destroy_project_bots!
destroy_ci_records!
if
::
Feature
.
enabled?
(
:extract_mr_diff_commit_deletions
,
default_enabled: :yaml
)
destroy_mr_diff_commits!
end
destroy_mr_diff_commits!
# Rails attempts to load all related records into memory before
# destroying: https://github.com/rails/rails/issues/22510
...
...
config/feature_flags/development/extract_mr_diff_commit_deletions.yml
deleted
100644 → 0
View file @
1436b533
---
name
:
extract_mr_diff_commit_deletions
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75963
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/347073
milestone
:
'
14.6'
type
:
development
group
:
group::code review
default_enabled
:
false
spec/services/projects/destroy_service_spec.rb
View file @
df2ab6ed
...
...
@@ -97,9 +97,13 @@ RSpec.describe Projects::DestroyService, :aggregate_failures do
end
end
shared_examples_for
"deleting a project with merge requests"
do
context
"deleting a project with merge requests"
do
let!
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
before
do
allow
(
project
).
to
receive
(
:destroy!
).
and_return
(
true
)
end
it
"deletes merge request and related records"
do
merge_request_diffs
=
merge_request
.
merge_request_diffs
expect
(
merge_request_diffs
.
size
).
to
eq
(
1
)
...
...
@@ -119,25 +123,6 @@ RSpec.describe Projects::DestroyService, :aggregate_failures do
destroy_project
(
project
,
user
,
{})
end
context
"extract_mr_diff_commit_deletions feature flag"
do
context
"with flag enabled"
do
before
do
stub_feature_flags
(
extract_mr_diff_commit_deletions:
true
)
allow
(
project
).
to
receive
(
:destroy!
).
and_return
(
true
)
end
it_behaves_like
"deleting a project with merge requests"
end
context
"with flag disabled"
do
before
do
stub_feature_flags
(
extract_mr_diff_commit_deletions:
false
)
end
it_behaves_like
"deleting a project with merge requests"
end
end
context
'with running pipelines'
do
let!
(
:pipelines
)
{
create_list
(
:ci_pipeline
,
3
,
:running
,
project:
project
)
}
let
(
:destroy_pipeline_service
)
{
double
(
'DestroyPipelineService'
,
execute:
nil
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment