Commit 9a903bc1 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'use-symbols-for-feature-flags' into 'master'

Prefer to use symbols for feature flag names

See merge request gitlab-org/gitlab!34258
parents eec08c87 3ad89725
...@@ -45,7 +45,7 @@ module Ci ...@@ -45,7 +45,7 @@ module Ci
end end
def valid_local? def valid_local?
return true if Feature.enabled?('ci_disable_validates_dependencies') return true if Feature.enabled?(:ci_disable_validates_dependencies)
local.all?(&:valid_dependency?) local.all?(&:valid_dependency?)
end end
......
...@@ -351,7 +351,7 @@ you can flip the feature flag from a Rails console. ...@@ -351,7 +351,7 @@ you can flip the feature flag from a Rails console.
1. Flip the switch and disable it: 1. Flip the switch and disable it:
```ruby ```ruby
Feature.enable('ci_disable_validates_dependencies') Feature.enable(:ci_disable_validates_dependencies)
``` ```
**In installations from source:** **In installations from source:**
...@@ -366,7 +366,7 @@ you can flip the feature flag from a Rails console. ...@@ -366,7 +366,7 @@ you can flip the feature flag from a Rails console.
1. Flip the switch and disable it: 1. Flip the switch and disable it:
```ruby ```ruby
Feature.enable('ci_disable_validates_dependencies') Feature.enable(:ci_disable_validates_dependencies)
``` ```
## Set the maximum file size of the artifacts ## Set the maximum file size of the artifacts
......
...@@ -128,13 +128,13 @@ sudo -u git -H bin/rails console -e production ...@@ -128,13 +128,13 @@ sudo -u git -H bin/rails console -e production
**To check if incremental logging (trace) is enabled:** **To check if incremental logging (trace) is enabled:**
```ruby ```ruby
Feature.enabled?('ci_enable_live_trace') Feature.enabled?(:ci_enable_live_trace)
``` ```
**To enable incremental logging (trace):** **To enable incremental logging (trace):**
```ruby ```ruby
Feature.enable('ci_enable_live_trace') Feature.enable(:ci_enable_live_trace)
``` ```
NOTE: **Note:** NOTE: **Note:**
......
...@@ -128,7 +128,7 @@ module Gitlab ...@@ -128,7 +128,7 @@ module Gitlab
end end
def self.repository_verification_enabled? def self.repository_verification_enabled?
Feature.enabled?('geo_repository_verification', default_enabled: true) Feature.enabled?(:geo_repository_verification, default_enabled: true)
end end
def self.allowed_ip?(ip) def self.allowed_ip?(ip)
......
...@@ -147,7 +147,7 @@ module Gitlab ...@@ -147,7 +147,7 @@ module Gitlab
raise AlreadyArchivedError, 'Could not write to the archived trace' raise AlreadyArchivedError, 'Could not write to the archived trace'
elsif current_path elsif current_path
File.open(current_path, mode) File.open(current_path, mode)
elsif Feature.enabled?('ci_enable_live_trace', job.project) elsif Feature.enabled?(:ci_enable_live_trace, job.project)
Gitlab::Ci::Trace::ChunkedIO.new(job) Gitlab::Ci::Trace::ChunkedIO.new(job)
else else
File.open(ensure_path, mode) File.open(ensure_path, mode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment