Skip to content
Snippets Groups Projects

Add title to runner delete error alert

All threads resolved!

What does this MR do and why?

This change improves the information provided when a runner deletion fails.

Screenshots or screen recordings

Before After
127.0.0.1_3000_admin_runners image

How to set up and validate locally

Create a condition for an error

  1. Change code to ensure the backend produces an error, here I change how the backend handles deletion:
diff --git a/app/graphql/mutations/ci/runner/delete.rb b/app/graphql/mutations/ci/runner/delete.rb
index db68914a4eb0..7261ea8f1f0f 100644
--- a/app/graphql/mutations/ci/runner/delete.rb
+++ b/app/graphql/mutations/ci/runner/delete.rb
@@ -23,7 +23,8 @@ def resolve(id:, **runner_attrs)
         end
 
         def find_object(id)
-          GitlabSchema.find_by_gid(id)
+          nil
+          # GitlabSchema.find_by_gid(id)
         end
       end
     end

Trigger the error

  1. With at least one runner registered, logged in as admin
  2. Visit the Admin -> Runners page
  3. Select the delete button in a runner
  4. Check the error alert at the top of the screen

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #346793 (closed)

Edited by Dan MH

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • mentioned in issue danmh/danmh#11 (closed)

  • Vitaly Slobodin removed review request for @vitallium

    removed review request for @vitallium

  • Miguel Rincon added 1319 commits

    added 1319 commits

    Compare with previous version

  • Miguel Rincon requested review from @vitallium

    requested review from @vitallium

  • Miguel Rincon resolved all threads

    resolved all threads

  • Vitaly Slobodin approved this merge request

    approved this merge request

  • Vitaly Slobodin mentioned in commit cf4c47fe

    mentioned in commit cf4c47fe

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading