Allow adjusting the default process_mode for resource_groups - API only
Release notes
Problem to solve
The CI/CD resource_group feature always defaults to the unordered process mode for new resource groups.
For teams that uses one of the other process modes within their projects, they always need to use the API call to edit the process_mode attribute after new resource groups are created to change the mode value (i.e. oldest_first, newest_first).
Proposal
As a first iteration, we should have an API to set the default process mode at the project level for newly created resource groups.
- Add a
resource_group_default_process_modecolumn to theprojectstable- the default value is
null - the allowed values are
unordered|oldest_first|newest_first- the same as theResourceGroup.process_mode
- the default value is
- Update the Edit Project API to support updating of the
resource_group_default_process_mode- Projects API file: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/api/projects.rb#L556
- Projects API optional parameters: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/api/helpers/projects_helpers.rb#L11
- In the CI pipeline chain, update resource group creation to copy the
project.resource_group_default_process_modeif it is not yet set- resource group creation step:
Gitlab::Ci::Pipeline::Chain::EnsureResourceGroups - this is called in the
Ci::CreatePipelineService
- resource group creation step:
Intended users
Project Owners / Maintainers
Feature Usage Metrics
Edited by Pam Artiaga