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
b3c1a789
Commit
b3c1a789
authored
Feb 09, 2022
by
John Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature flag toggle for elastic migration worker
Changelog: changed EE: true
parent
33c3e20e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
config/feature_flags/ops/elastic_migration_worker.yml
config/feature_flags/ops/elastic_migration_worker.yml
+8
-0
ee/app/workers/elastic/migration_worker.rb
ee/app/workers/elastic/migration_worker.rb
+1
-0
ee/spec/workers/elastic/migration_worker_spec.rb
ee/spec/workers/elastic/migration_worker_spec.rb
+12
-0
No files found.
config/feature_flags/ops/elastic_migration_worker.yml
0 → 100644
View file @
b3c1a789
---
name
:
elastic_migration_worker
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/80310
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/352424
milestone
:
'
14.8'
type
:
ops
group
:
group::global search
default_enabled
:
true
ee/app/workers/elastic/migration_worker.rb
View file @
b3c1a789
...
...
@@ -17,6 +17,7 @@ module Elastic
urgency
:throttled
def
perform
return
false
if
Feature
.
disabled?
(
:elastic_migration_worker
,
type: :ops
,
default_enabled: :yaml
)
return
false
unless
Gitlab
::
CurrentSettings
.
elasticsearch_indexing?
return
false
unless
helper
.
alias_exists?
...
...
ee/spec/workers/elastic/migration_worker_spec.rb
View file @
b3c1a789
...
...
@@ -6,6 +6,18 @@ RSpec.describe Elastic::MigrationWorker, :elastic do
subject
{
described_class
.
new
}
describe
'#perform'
do
context
'Feature Flag `elastic_migration_worker` is disabled'
do
before
do
stub_feature_flags
(
elastic_migration_worker:
false
)
stub_ee_application_setting
(
elasticsearch_indexing:
true
)
end
it
'returns with no execution'
do
expect
(
subject
).
not_to
receive
(
:execute_migration
)
expect
(
subject
.
perform
).
to
be_falsey
end
end
context
'indexing is disabled'
do
before
do
stub_ee_application_setting
(
elasticsearch_indexing:
false
)
...
...
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