GraphQL: Add NamespaceCiCdSettingsUpdate mutation
What does this MR do and why?
Describe in detail what your merge request does and why.
This MR adds a NamespaceCiCdSettingsUpdate
GraphQL mutation so that we can set the namespace_ci_cd_settings.allow_stale_runner_pruning
value (EE-only) for a given namespace. It is inspired from the existing CiCdSettingsUpdate
mutation (which works on projects). I'm handling the renaming of CiCdSettingsUpdate
to ProjectCiCdSettingsUpdate
in a follow-up deprecation MR.
Part of Implement worker to remove stale runners from G... (#361112 - closed)
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
![](/-/project/278964/uploads/a7579f2bb2b51f869b9b65ff3b7c6ddf/image.png)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Query
mutation namespaceCiCdSettingsUpdate($input: NamespaceCiCdSettingsUpdateInput!) {
namespaceCiCdSettingsUpdate(input: $input) {
ciCdSettings {
allowStaleRunnerPruning
}
errors
}
}
Variables
{
"input": {
"fullPath": "flightjs",
"allowStaleRunnerPruning": true
}
}
Results
{
"data": {
"namespaceCiCdSettingsUpdate": {
"ciCdSettings": {
"allowStaleRunnerPruning": true
},
"errors": []
}
}
}
After running the query, you should be able to run the following command in the GDK console to check that the GraphQL mutation had the intended effect:
> Group.find_by_full_path('flightjs').allow_stale_runner_pruning?
=> true
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.