From cbb6bcb6b262e4480e2ccf27fd00419da3d6b97a Mon Sep 17 00:00:00 2001 From: Suraj Tripathi <stripathi@gitlab.com> Date: Mon, 7 Oct 2024 19:16:03 +0000 Subject: [PATCH] Changed feature flag type from wip to beta Also changed the default value of the feature flag EE: true Changelog: added --- .../settings/sign_up_restrictions.md | 4 ++-- doc/api/invitations.md | 8 +++----- doc/api/members.md | 16 ++++++---------- .../member_promotion_management.yml | 4 ++-- ee/lib/ee/gitlab/event_store.rb | 2 +- .../gitlab_subscriptions/billable_users_utils.rb | 2 +- .../promotion_management_utils.rb | 2 +- 7 files changed, 16 insertions(+), 22 deletions(-) rename ee/config/feature_flags/{wip => beta}/member_promotion_management.yml (90%) diff --git a/doc/administration/settings/sign_up_restrictions.md b/doc/administration/settings/sign_up_restrictions.md index 78258502dae2..c4a9bf1df4f2 100644 --- a/doc/administration/settings/sign_up_restrictions.md +++ b/doc/administration/settings/sign_up_restrictions.md @@ -258,13 +258,13 @@ See the [documentation on setting up an LDAP user filter](../auth/ldap/index.md# DETAILS: **Tier:** Ultimate **Offering:** Self-managed, GitLab Dedicated +**Status:** Beta > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/433166) in GitLab 16.9 [with a flag](../feature_flags.md) named `member_promotion_management`. +> - Feature flag `member_promotion_management` [changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/167757/) from `wip` to `beta` and enabled by default in GitLab 17.5. FLAG: The availability of this feature is controlled by a feature flag. -For more information, see the history. -This feature is available for testing, but not ready for production use. In the **Ultimate** tier, [non billable roles](../../subscriptions/gitlab_com/index.md#billable-users), can be promoted to a billable role in any Project or Group, resulting in the increase of billable seats, without admins having any control on this promotion. To prevent existing users of the subscription from being promoted to a billable role, you can enable role promotion approval. diff --git a/doc/api/invitations.md b/doc/api/invitations.md index 9f5b07291a0d..45b559816e39 100644 --- a/doc/api/invitations.md +++ b/doc/api/invitations.md @@ -74,12 +74,10 @@ When there was any error sending the email: ``` NOTE: -When the setting **Manage non-billable promotions** is enabled, new invited members with billable roles must be approved by an administrator. +When the setting **[Manage non-billable promotions](../administration/settings/sign_up_restrictions.md#enable-role-promotion-approval)** is enabled, new invited members with billable roles must be approved by an administrator. -To enable **Manage non-billable promotions**: - -1. Enable the `enable_member_promotion_management` application setting. -1. Enable the `member_promotion_management` feature flag. +To enable **Manage non-billable promotions**, +you must first enable the `enable_member_promotion_management` application setting. Example response: diff --git a/doc/api/members.md b/doc/api/members.md index ddcc149e86b4..c88148ba1985 100644 --- a/doc/api/members.md +++ b/doc/api/members.md @@ -627,12 +627,10 @@ Example response: ``` NOTE: -When the setting **Manage non-billable promotions** is enabled, new invited members with billable roles must be approved by an administrator. +When the setting **[Manage non-billable promotions](../administration/settings/sign_up_restrictions.md#enable-role-promotion-approval)** is enabled, new invited members with billable roles must be approved by an administrator. -To enable **Manage Non-Billable Promotions**: - -1. Enable the `enable_member_promotion_management` application setting. -1. Enable the `member_promotion_management` feature flag. +To enable **Manage Non-Billable Promotions**, +you must first enable the `enable_member_promotion_management` application setting. Example of queueing a single user: @@ -719,12 +717,10 @@ Example response: ``` NOTE: -When the setting **Manage non-billable promotions** is enabled, new invited users with billable roles must be approved by an administrator. - -To enable **Manage non-billable promotions**: +When the setting **[Manage non-billable promotions](../administration/settings/sign_up_restrictions.md#enable-role-promotion-approval)** is enabled, new invited users with billable roles must be approved by an administrator. -1. Enable the `enable_member_promotion_management` application setting. -1. Enable the `member_promotion_management` feature flag. +To enable **Manage non-billable promotions**, +you must first enable the `enable_member_promotion_management` application setting. Example response: diff --git a/ee/config/feature_flags/wip/member_promotion_management.yml b/ee/config/feature_flags/beta/member_promotion_management.yml similarity index 90% rename from ee/config/feature_flags/wip/member_promotion_management.yml rename to ee/config/feature_flags/beta/member_promotion_management.yml index f2f5868a1603..e09bee1b9af4 100644 --- a/ee/config/feature_flags/wip/member_promotion_management.yml +++ b/ee/config/feature_flags/beta/member_promotion_management.yml @@ -5,5 +5,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/141965 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/439113 milestone: '16.9' group: group::utilization -type: wip -default_enabled: false +type: beta +default_enabled: true diff --git a/ee/lib/ee/gitlab/event_store.rb b/ee/lib/ee/gitlab/event_store.rb index 4ca773f22921..b7dbbe45dc87 100644 --- a/ee/lib/ee/gitlab/event_store.rb +++ b/ee/lib/ee/gitlab/event_store.rb @@ -70,7 +70,7 @@ def configure!(store) to: ::Members::MembershipModifiedByAdminEvent, if: ->(_) { ::Gitlab::CurrentSettings.enable_member_promotion_management? && - ::Feature.enabled?(:member_promotion_management, :instance, type: :wip) + ::Feature.enabled?(:member_promotion_management, :instance, type: :beta) } register_threat_insights_subscribers(store) diff --git a/ee/lib/gitlab_subscriptions/billable_users_utils.rb b/ee/lib/gitlab_subscriptions/billable_users_utils.rb index 5a2ed6c210e3..6798669ce085 100644 --- a/ee/lib/gitlab_subscriptions/billable_users_utils.rb +++ b/ee/lib/gitlab_subscriptions/billable_users_utils.rb @@ -52,7 +52,7 @@ def saas_billable_role_change?(target_namespace:, role:, member_role_id: nil) private def ensure_feature_enabled! - return if ::Feature.enabled?(:member_promotion_management, type: :wip) + return if ::Feature.enabled?(:member_promotion_management, type: :beta) raise "Attempted to use a WIP feature that is not enabled!" end diff --git a/ee/lib/gitlab_subscriptions/member_management/promotion_management_utils.rb b/ee/lib/gitlab_subscriptions/member_management/promotion_management_utils.rb index 81c4e9963e5b..1f146957a8ff 100644 --- a/ee/lib/gitlab_subscriptions/member_management/promotion_management_utils.rb +++ b/ee/lib/gitlab_subscriptions/member_management/promotion_management_utils.rb @@ -30,7 +30,7 @@ def promotion_management_required_for_role?(new_access_level:, member_role_id: n private def promotion_management_feature_enabled? - ::Feature.enabled?(:member_promotion_management, type: :wip) + ::Feature.enabled?(:member_promotion_management, type: :beta) end def promotion_management_active? -- GitLab