VSA settings: [BE] Value Stream inheritance within the group hierarchy
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
Organizations want to streamline their development processes. To do so, they will likely define the same value streams and value stream stages for subgroups and projects.
Currently, to have the same value stream (with stages) for subgroups and projects, the user will need to create them manually on each namespace resource (Group, ProjectNamespace). This can create significant admin overhead; automation is currently not possible because we don't provide an API for creating value streams and stages.
Idea: allow selecting value streams from parent groups
Example:
- Top level group:
gitlab-org- Defines the standard workflow stages in the "Main" value stream, based on the `workflow´ labels.
- Project:
gitlab-org/gitlab- Defines a custom value stream based on the
database::reviewedanddatabase::approvedlabels to measure the DB review process (custom process for this specific project)
- Defines a custom value stream based on the
When the user navigates to the gitlab-org/gitlab project, the user would see both value streams. The value streams would be already filtered down to the current project.
Implementation
-
The value stream and stage services (list, find) would need to be extended to also look for records defined for the parent group record. This would be a quite fast database query because looking up the ancestor groups is limited (we allow maximum 19 ancestors which is rarely the case).
-
Additionally, we should provide the possibility to disable the inheritance, so let's add a setting to the
namespace_settingsandproject_settingtables that will control this behavior. -
Value streams rate limits: Limit is applied on the group/project level. In case you have 40 value streams on the top-level and another 40 in a sub-group, we would render 80 value streams when opening the subgroup or a project in the subgroup.
-
Restrict the option to modified from a lower-level the a top-level value stream.
-
Some frontend work might be needed to update the value stream dropdown. It would be nice to show the name of the value stream with the group name where it was inherited from. We could even add some sort of separator where we show the direct value streams on top and below them we would list the inherited value streams. This is related to VSA settings: [FE] Add selected projects per va... (#381006).
Benefits
- Overall, less value stream and stage records are created.
- Reduced admin work for defining value streams and stages.