4 Commits

Author SHA1 Message Date
Kazunori Kimura
b3b09c619c fix indent in script configure_feature_flags.rb 2024-08-14 00:51:49 +09:00
Kazunori Kimura
dabfd42eac fix script to configure feature flags that cannot enable flags
When generating the list of flags that would actually be enabled,
the value specified in the option was ANDed with the list of flags that actually existed.
At this time, I mistakenly performed a logical AND with the list
of "values ​​to invalidate" specified in the option.
This mistake caused a problem in which some flags could not be enabled.
This commit fixes this to AND with the list of values ​​you want to enable.
2024-08-14 00:50:24 +09:00
Kazunori Kimura
351711c4cc Simplify message on feature flag target specified as reviewed
like below:

````
Configuring gitlab::feature_flags...
- Launching rails runner to set feature flags. This will take some time....
- Specified feature flags  to be disabled:
--- "auto_devops_banner_disabled"
--- "invalid_flag_name"
- Specified feature flags  to be enabled
--- "git_push_create_all_pipelines"
--- "another_invalid_flag_name"
- Following flags are probably invalid and have been ignored
--- invalid_flag_name
--- another_invalid_flag_name
- Apply user defined feature flags:
--- auto_devops_banner_disabled : off
--- git_push_create_all_pipelines : on
````

- Do not `puts` parsed options (formatted by ruby's `.to_s`),
  `puts` each specified target with three hyphens instead
- `puts` each ignored target on each line with three hyphens instead of single line csv
2024-03-24 19:17:25 +09:00
Kazunori Kimura
05794a2b47 Allow setting feature flags via configuration parameter
- It requires database is set up because
  feature flags are stored to DB (table `application_settings`)
- Add configuration parameter GITLAB_FEATURE_FLAGS_ENABLE_TARGETS
  and GITLAB_FEATURE_FLAGS_DISABLE_TARGETS
- Add ruby script to configure feature flags from command line
  and invoke runtime (from configure_gitlab())
2024-03-24 18:43:51 +09:00