diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /scripts/used-feature-flags | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'scripts/used-feature-flags')
-rwxr-xr-x | scripts/used-feature-flags | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/used-feature-flags b/scripts/used-feature-flags index e6a8149da71..7d81e4b2cb2 100755 --- a/scripts/used-feature-flags +++ b/scripts/used-feature-flags @@ -27,7 +27,8 @@ flags_paths = [ ] # For EE additionally process `ee/` feature flags -if File.exist?('ee/app/models/license.rb') && !%w[true 1].include?(ENV['FOSS_ONLY'].to_s) +is_ee = File.exist?('ee/app/models/license.rb') && !%w[true 1].include?(ENV['FOSS_ONLY'].to_s) +if is_ee flags_paths << 'ee/config/feature_flags/**/*.yml' # Geo feature flags are constructed dynamically and there's no explicit checks in the codebase so we mark all @@ -41,6 +42,19 @@ if File.exist?('ee/app/models/license.rb') && !%w[true 1].include?(ENV['FOSS_ONL end end +# For JH additionally process `jh/` feature flags +is_jh = is_ee && Dir.exist?('jh') && !%w[true 1].include?(ENV['EE_ONLY'].to_s) +if is_jh + flags_paths << 'jh/config/feature_flags/**/*.yml' + + Dir.glob('jh/app/replicators/geo/*_replicator.rb').each_with_object(Set.new) do |path, memo| + replicator_name = File.basename(path, '.rb') + feature_flag_name = "geo_#{replicator_name.delete_suffix('_replicator')}_replication" + + FileUtils.touch(File.join('tmp', 'feature_flags', "#{feature_flag_name}.used")) + end +end + all_flags = {} additional_flags = Set.new |