ChatOps Feature command doesn't work with Namespace objects
Problem
The ChatOps command to set a feature flag for a specific actor doesn't work (internal link) if the target is the full path of a user namespace. It works as expected when a group full path is passed in as option:
-
/chatops run feature set --group=fabiopitino <feature_flag> true
does not update anything. -
/chatops run feature set --group=gitlab-org <feature_flag> true
update the FF correctly for the target group.
While it seems to work as expected, because a UserNamespace
is not a Group
, we allow a namespace to be used as actor in the code, as per our documentation.
# This is accepted
Feature.enabled?(:my_feature_flag, namespace, default_enabled: :yaml)
Solution
-
Allow the features API to take in input a namespace
actor which is more generic thangroup
and can cover bothUserNamespace
andGroup
- !79555 (merged) -
Allow ChatOps to support --namespace=
option when setting the actor. - gitlab-com/chatops!289 (merged) -
Document the changes for the API and ChatOps !88443 (merged)
Edited by Fabio Pitino