Clone closest group MR approval settings when creating project and group
Why are we doing this work
To ensure new project and group inherits the correct merge request approval settings from parent namespace.
Non-functional requirements
-
Documentation: Update doc on project and group creation to state these additional behaviours -
Feature flag: group_merge_request_approval_settings_feature_flag -
Performance: Avoid adding unnecessary latency to project and group creation -
Testing:
Implementation plan
-
backend (if feature flag enabled) Update the Projects::CreateServiceandGroups::CreateServiceto update newly created projects and sub-groups with the closest parent group settings.
Technical notes
Recursively lookup group hierarchy could be expensive. Should we just use settings on project.root_namespace and namespace.root_ancestor as the first iteration?
# pseudo code
when creating new project
do nothing if feature flag is disabled
do nothing if license is disabled
do nothing if no closest group setting
otherwise, copy from the closest group setting
Edited by Tan Le