diff options
Diffstat (limited to 'app/graphql/mutations/ci')
-rw-r--r-- | app/graphql/mutations/ci/pipeline/destroy.rb | 13 | ||||
-rw-r--r-- | app/graphql/mutations/ci/runner/update.rb | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/app/graphql/mutations/ci/pipeline/destroy.rb b/app/graphql/mutations/ci/pipeline/destroy.rb index 3f933818ce1..935cf45c4ab 100644 --- a/app/graphql/mutations/ci/pipeline/destroy.rb +++ b/app/graphql/mutations/ci/pipeline/destroy.rb @@ -12,12 +12,25 @@ module Mutations pipeline = authorized_find!(id: id) project = pipeline.project + return undergoing_refresh_error(project) if project.refreshing_build_artifacts_size? + result = ::Ci::DestroyPipelineService.new(project, current_user).execute(pipeline) { success: result.success?, errors: result.errors } end + + private + + def undergoing_refresh_error(project) + Gitlab::ProjectStatsRefreshConflictsLogger.warn_request_rejected_during_stats_refresh(project.id) + + { + success: false, + errors: ['Action temporarily disabled. The project this pipeline belongs to is undergoing stats refresh.'] + } + end end end end diff --git a/app/graphql/mutations/ci/runner/update.rb b/app/graphql/mutations/ci/runner/update.rb index faccd1273e5..b6d8c20c40b 100644 --- a/app/graphql/mutations/ci/runner/update.rb +++ b/app/graphql/mutations/ci/runner/update.rb @@ -18,6 +18,10 @@ module Mutations required: false, description: 'Description of the runner.' + argument :maintenance_note, GraphQL::Types::String, + required: false, + description: 'Runner\'s maintenance notes.' + argument :maximum_timeout, GraphQL::Types::Int, required: false, description: 'Maximum timeout (in seconds) for jobs processed by the runner.' |