Allow users to save pipeline execution policy
What does this MR do and why?
Allow users to save pipeline execution policy
- add flags for loading and removing
- add code for network calls
- add tests
- standardize tests for network calls to allow for easier abstraction in the future
What does this MR not do and why?
- the backend isn't ready, so this sets up the ability to save/edit/remove a pipeline execution policy on the frontend only following well defined patterns from other policies
- this is the not final iteration of the design, so I am not going to ask for UX review yet
- as seen from the code, the code added is similar to the other editor components (1, 2); I would like to investigate abstracting out the code now that there are three instances, but given the importance of making the major milestone, I would prefer to do that in a follow-up
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Upload a GitLab Ultimate license
- Enable feature flag
echo "Feature.enable(:pipeline_execution_policy_type)" | rails c
- Navigate to http://gdk.test:3443/gitlab-org/gitlab-test/-/security/policies/new?type=pipeline_execution_policy
- Verify the
Update via merge request
button is disabled by default - Change the name
- Verify the
Update via merge request
button is enables - Update any of the properties
- Click the
Update via merge request
button - Verify the
Update via merge request
button shows a loading state - Verify an error alert shows up at the top with a bunch of errors unrelated to this policy type because the schema on the backend hasn't been updated yet
Related to #454281 (closed)
Edited by Alexander Turinske