Commit bfa78994 authored by Tiger Watson's avatar Tiger Watson

Merge branch 'deprecate-agent-token-removal' into 'master'

Deprecate agent token deletion mutation

See merge request gitlab-org/gitlab!77837
parents 645e82d0 fd655755
......@@ -5,7 +5,8 @@ module Types
extend ActiveSupport::Concern
prepended do
# placeholder for any FOSS mutations to be deprecated
mount_mutation Mutations::Clusters::AgentTokens::Delete,
deprecated: { reason: 'Tokens must be revoked with ClusterAgentTokenRevoke', milestone: '14.7' }
end
end
end
......@@ -35,7 +35,6 @@ module Types
mount_mutation Mutations::Clusters::Agents::Create
mount_mutation Mutations::Clusters::Agents::Delete
mount_mutation Mutations::Clusters::AgentTokens::Create
mount_mutation Mutations::Clusters::AgentTokens::Delete
mount_mutation Mutations::Clusters::AgentTokens::Revoke
mount_mutation Mutations::Commits::Create, calls_gitaly: true
mount_mutation Mutations::CustomEmoji::Create, feature_flag: :custom_emoji
......
......@@ -954,6 +954,10 @@ Input type: `ClusterAgentTokenCreateInput`
### `Mutation.clusterAgentTokenDelete`
WARNING:
**Deprecated** in 14.7.
Tokens must be revoked with ClusterAgentTokenRevoke.
Input type: `ClusterAgentTokenDeleteInput`
#### Arguments
......@@ -7,6 +7,14 @@ RSpec.describe Types::MutationType do
expect(described_class).to have_graphql_mutation(Mutations::MergeRequests::SetDraft)
end
describe 'deprecated mutations' do
describe 'clusterAgentTokenDelete' do
let(:field) { get_field('clusterAgentTokenDelete') }
it { expect(field.deprecation_reason).to eq('Tokens must be revoked with ClusterAgentTokenRevoke. Deprecated in 14.7.') }
end
end
def get_field(name)
described_class.fields[GraphqlHelpers.fieldnamerize(name)]
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment