Skip to content
Snippets Groups Projects
Commit 020a6c88 authored by drew stachon's avatar drew stachon :wave:
Browse files

Merge branch 'pedropombeiro/409379/remove-ff' into 'master'

GraphQL: Remove Mutation.ciCdSettingsUpdate mutation

See merge request !121419



Merged-by: default avatardrew stachon <730684-drew@users.noreply.gitlab.com>
Approved-by: Vladimir Shushlin's avatarVladimir Shushlin <vshushlin@gitlab.com>
Approved-by: default avatardrew stachon <730684-drew@users.noreply.gitlab.com>
Approved-by: default avatarCorinna Gogolok <cgogolok@gitlab.com>
Co-authored-by: default avatarPedro Pombeiro <noreply@pedro.pombei.ro>
parents 852c6118 f957615e
No related branches found
No related tags found
1 merge request!121419GraphQL: Remove Mutation.ciCdSettingsUpdate mutation
Pipeline #883713567 passed
# frozen_string_literal: true
module Mutations
module Ci
# TODO: Remove after 16.0, see https://gitlab.com/gitlab-org/gitlab/-/issues/361801#note_1373963840
class CiCdSettingsUpdate < ProjectCiCdSettingsUpdate
graphql_name 'CiCdSettingsUpdate'
def ready?(**args)
raise Gitlab::Graphql::Errors::ResourceNotAvailable, '`remove_cicd_settings_update` feature flag is enabled.' \
if Feature.enabled?(:remove_cicd_settings_update)
super
end
end
end
end
...@@ -142,11 +142,6 @@ class MutationType < BaseObject ...@@ -142,11 +142,6 @@ class MutationType < BaseObject
mount_mutation Mutations::Ci::PipelineSchedule::Play mount_mutation Mutations::Ci::PipelineSchedule::Play
mount_mutation Mutations::Ci::PipelineSchedule::Create mount_mutation Mutations::Ci::PipelineSchedule::Create
mount_mutation Mutations::Ci::PipelineSchedule::Update mount_mutation Mutations::Ci::PipelineSchedule::Update
mount_mutation Mutations::Ci::CiCdSettingsUpdate, deprecated: {
reason: :renamed,
replacement: 'ProjectCiCdSettingsUpdate',
milestone: '15.0'
}
mount_mutation Mutations::Ci::ProjectCiCdSettingsUpdate mount_mutation Mutations::Ci::ProjectCiCdSettingsUpdate
mount_mutation Mutations::Ci::Job::ArtifactsDestroy mount_mutation Mutations::Ci::Job::ArtifactsDestroy
mount_mutation Mutations::Ci::Job::Play mount_mutation Mutations::Ci::Job::Play
......
---
name: remove_cicd_settings_update
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119061
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/409379
milestone: '16.0'
type: development
group: group::runner
default_enabled: false
...@@ -1514,35 +1514,6 @@ Input type: `CiAiGenerateConfigInput` ...@@ -1514,35 +1514,6 @@ Input type: `CiAiGenerateConfigInput`
| <a id="mutationciaigenerateconfigerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. | | <a id="mutationciaigenerateconfigerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
| <a id="mutationciaigenerateconfigusermessage"></a>`userMessage` | [`AiMessageType`](#aimessagetype) | User chat message. | | <a id="mutationciaigenerateconfigusermessage"></a>`userMessage` | [`AiMessageType`](#aimessagetype) | User chat message. |
   
### `Mutation.ciCdSettingsUpdate`
WARNING:
**Deprecated** in 15.0.
This was renamed.
Use: `ProjectCiCdSettingsUpdate`.
Input type: `CiCdSettingsUpdateInput`
#### Arguments
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="mutationcicdsettingsupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
| <a id="mutationcicdsettingsupdatefullpath"></a>`fullPath` | [`ID!`](#id) | Full Path of the project the settings belong to. |
| <a id="mutationcicdsettingsupdateinboundjobtokenscopeenabled"></a>`inboundJobTokenScopeEnabled` | [`Boolean`](#boolean) | Indicates CI/CD job tokens generated in other projects have restricted access to this project. |
| <a id="mutationcicdsettingsupdatejobtokenscopeenabled"></a>`jobTokenScopeEnabled` **{warning-solid}** | [`Boolean`](#boolean) | **Deprecated:** Outbound job token scope is being removed. This field can now only be set to false. Deprecated in 16.0. |
| <a id="mutationcicdsettingsupdatekeeplatestartifact"></a>`keepLatestArtifact` | [`Boolean`](#boolean) | Indicates if the latest artifact should be kept for the project. |
| <a id="mutationcicdsettingsupdatemergepipelinesenabled"></a>`mergePipelinesEnabled` | [`Boolean`](#boolean) | Indicates if merge pipelines are enabled for the project. |
| <a id="mutationcicdsettingsupdatemergetrainsenabled"></a>`mergeTrainsEnabled` | [`Boolean`](#boolean) | Indicates if merge trains are enabled for the project. |
#### Fields
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="mutationcicdsettingsupdatecicdsettings"></a>`ciCdSettings` | [`ProjectCiCdSetting!`](#projectcicdsetting) | CI/CD settings after mutation. |
| <a id="mutationcicdsettingsupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
| <a id="mutationcicdsettingsupdateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
### `Mutation.ciJobTokenScopeAddProject` ### `Mutation.ciJobTokenScopeAddProject`
   
Input type: `CiJobTokenScopeAddProjectInput` Input type: `CiJobTokenScopeAddProjectInput`
...@@ -64,35 +64,6 @@ ...@@ -64,35 +64,6 @@
expect(project.keep_latest_artifact).to eq(false) expect(project.keep_latest_artifact).to eq(false)
end end
describe 'ci_cd_settings_update deprecated mutation' do
let(:mutation) { graphql_mutation(:ci_cd_settings_update, variables) }
it 'returns error' do
post_graphql_mutation(mutation, current_user: user)
expect(graphql_errors).to(
include(
hash_including('message' => '`remove_cicd_settings_update` feature flag is enabled.')
)
)
end
context 'when remove_cicd_settings_update FF is disabled' do
before do
stub_feature_flags(remove_cicd_settings_update: false)
end
it 'updates ci cd settings' do
post_graphql_mutation(mutation, current_user: user)
project.reload
expect(response).to have_gitlab_http_status(:success)
expect(project.keep_latest_artifact).to eq(false)
end
end
end
it 'allows setting job_token_scope_enabled to false' do it 'allows setting job_token_scope_enabled to false' do
post_graphql_mutation(mutation, current_user: user) post_graphql_mutation(mutation, current_user: user)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment