Skip to content
Snippets Groups Projects

Add `admin_runners` custom role permission

Merged mo khan requested to merge mokhax/442851/admin_runners into master
All threads resolved!

What does this MR do and why?

This change introduces a new custom permission to allow users the ability to manage runners for a group or project.

#442851 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Before: Project Page Before: Project CI/CD Settings After: Create role After: Roles and Permissions After: Project Page After: Project CI/CD Settings After: Create Project Runner After: Group CI/CD Settings After: Enable/Disable instance runners for Group

How to set up and validate locally

  1. In rails console enable the experiment fully
    Feature.enable(:custom_ability_admin_runners)
  2. Create a role with the Admin Runners permission enabled.
  3. Assign the new role to a new user
  4. Login with the new user
  5. Visit any project page and ensure that the Settings menu item appears in the navigation.
  6. Click on the Settings menu and ensure that the CI/CD menu item appears.
  7. Click on the CI/CD menu.
  8. Ensure that the Runners section appears.
  9. Click on Expand
  10. Ensure that the list of runners are displayed.
Edited by mo khan

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
  • mo khan added 254 commits

    added 254 commits

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 5f2a4586 - Enable admin_runners ability via custom role

    Compare with previous version

  • mo khan added 2 commits

    added 2 commits

    • a6d255de - Provide better error messages in assertion output
    • c0f2b057 - Test for CRUD abilities when admin_runners enabled

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • c89cdf05 - Render CI/CD settings menu for admin_runners permission

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 4083dbde - Extract context for rendering menu items for custom role permissions

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • f5875de4 - Use table tests to test lighting up menu items based on custom permission

    Compare with previous version

  • mo khan added 2 commits

    added 2 commits

    • 9f40c1bb - Check multiple permissions to light up menu item
    • d561e6b5 - Test Access Tokens menu item

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • bec724c0 - Render Runner Settings if admin_runner enabled

    Compare with previous version

  • A deleted user added frontend label

    added frontend label

  • mo khan added 1 commit

    added 1 commit

    • 0ecdc8d0 - Ensure Maintainers have the admin_runner ability

    Compare with previous version

  • mo khan changed the description

    changed the description

  • mo khan added 1 commit

    added 1 commit

    • 6036304f - Check admin_runner permission in runners controller

    Compare with previous version

  • mo khan added 3 commits

    added 3 commits

    • 0a7a432f - Extract method to check multiple permissions
    • ab441bb0 - Extract constant to store permissions that allow access to CI/CD settings
    • f19d8546 - Add spec for toggle_shared_runners

    Compare with previous version

  • mo khan changed the description

    changed the description

  • mo khan added 1 commit

    added 1 commit

    • ad995fe1 - Add spec to ensure GraphQL mutation works for custom roles

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 78ed8029 - Allow read_runner on runner policy

    Compare with previous version

  • mo khan added 266 commits

    added 266 commits

    Compare with previous version

  • mo khan mentioned in merge request !150415 (merged)

    mentioned in merge request !150415 (merged)

  • mo khan added 2 commits

    added 2 commits

    • 142d6ad9 - Collapse admin_push_rules spec into table tests
    • 313d36d5 - Collapse admin_push_rules spec into table tests

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • f5d60862 - Generate traits for custom permissions

    Compare with previous version

  • mo khan added 3 commits

    added 3 commits

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 1ace5303 - Add feature flag to gradually roll out this change

    Compare with previous version

  • A deleted user added feature flag label

    added feature flag label

  • mo khan added 1 commit

    added 1 commit

    • 9e97b996 - Use #filter_map instead of #tap + #each

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    Compare with previous version

  • mo khan mentioned in merge request !151677 (merged)

    mentioned in merge request !151677 (merged)

  • mo khan mentioned in merge request !152654 (merged)

    mentioned in merge request !152654 (merged)

  • mo khan mentioned in merge request !152659 (merged)

    mentioned in merge request !152659 (merged)

  • mo khan
  • mentioned in issue #442851 (closed)

  • mo khan added 65 commits

    added 65 commits

    Compare with previous version

  • mo khan added 2 commits

    added 2 commits

    • 02574d31 - Add spec to disable new policy when ff is disabled
    • ff6f83f7 - Add N+1 spec to flush out performance issue

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • fa67cf0b - Reload user and runner in specs

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • a0088061 - Use member roles preloader to check for custom permission

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 286284a6 - Delegate to MemberRoleAbilityLoader to figure out the details

    Compare with previous version

  • mo khan added 209 commits

    added 209 commits

    Compare with previous version

  • mo khan changed the description

    changed the description

  • mo khan added 2 commits

    added 2 commits

    • 908b07a0 - Change milestone to 17.1
    • 2822ff75 - Add specs to preload abilities for a runner

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 2abfb169 - Allow admin_runners at group level

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • be9c4963 - Add rollout issue for feature flag

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 125190c6 - Rename methods to match intent

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 17d2b5fa - Add admin_runners to group policy

    Compare with previous version

  • mo khan added 2 commits

    added 2 commits

    • e9e81a36 - Display the CI/CD menu item for admin_runner
    • 687e417f - Combine existing specs into a table test

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • a4311d05 - Allow access to group CI/CD settings page

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 9b4294e9 - Add admin_runner to owner permissions in group policy

    Compare with previous version

  • mo khan added 2 commits

    added 2 commits

    • 082211a8 - Add admin_cicd_variables to base owner permissions
    • 8e43fa71 - Display runners section to when :admin_runner allowed

    Compare with previous version

  • mo khan changed the description

    changed the description

  • mo khan added 1 commit

    added 1 commit

    • 572eed8f - Add spec for changing the shared runner setting on Group API

    Compare with previous version

  • mo khan added 2 commits

    added 2 commits

    • 3f62b8ac - Add spec to update shared runner setting
    • 1387170c - Check updated shared runner setting

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • a9e11757 - Allow updating shared runners

    Compare with previous version

  • mo khan added 2 commits

    added 2 commits

    • f63c5095 - Extract helper to check multiple abilities at once
    • de68af28 - Delegate to #can_any? helper method

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 385cfd34 - Delegate to #can_any? helper

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 2f608414 - Authorize endpoint with one of many permissions

    Compare with previous version

  • mo khan changed the description

    changed the description

  • mo khan added 572 commits

    added 572 commits

    Compare with previous version

  • mo khan
  • mo khan
  • mo khan added 231 commits

    added 231 commits

    Compare with previous version

  • mo khan mentioned in merge request !153333 (merged)

    mentioned in merge request !153333 (merged)

  • mo khan added 1 commit

    added 1 commit

    Compare with previous version

  • mo khan added 225 commits

    added 225 commits

    Compare with previous version

  • mo khan added 303 commits

    added 303 commits

    Compare with previous version

  • mo khan mentioned in merge request !153742 (merged)

    mentioned in merge request !153742 (merged)

  • mo khan added 681 commits

    added 681 commits

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 6f6238b0 - Add admin_runner to list of allowed abilities

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • f42acd10 - Undo changes to MemberRoleAbilityLoader

    Compare with previous version

  • mo khan added 297 commits

    added 297 commits

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 5b07ebd5 - Make spec pending to decouple from another MR

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    Compare with previous version

  • mo khan added 180 commits

    added 180 commits

    • 5db73e8d...83fb32d5 - 179 commits from branch master
    • 9ab16dac - Add admin_runners ability

    Compare with previous version

  • mo khan changed the description

    changed the description

  • mo khan marked this merge request as ready

    marked this merge request as ready

  • mo khan requested review from @alexbuijs and @dftian

    requested review from @alexbuijs and @dftian

  • mo khan
  • Alex Buijs
  • Alex Buijs
  • Alex Buijs approved this merge request

    approved this merge request

  • Alex Buijs removed review request for @alexbuijs

    removed review request for @alexbuijs

    • Resolved by mo khan

      :wave: @alexbuijs, thanks for approving this merge request.

      This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break master, a new pipeline will be started shortly.

      Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.

  • added pipelinetier-2 label and removed pipelinetier-1 label

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for e204ceb1

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Data Stores | 31     | 0      | 0       | 22    | 31    | ✅     |
    | Monitor     | 8      | 0      | 0       | 7     | 8     | ✅     |
    | Govern      | 128    | 0      | 2       | 82    | 130   | ✅     |
    | Package     | 19     | 0      | 12      | 19    | 31    | ✅     |
    | Plan        | 56     | 0      | 2       | 47    | 58    | ✅     |
    | Verify      | 30     | 0      | 2       | 29    | 32    | ✅     |
    | Create      | 129    | 0      | 10      | 93    | 139   | ✅     |
    | Release     | 5      | 0      | 0       | 5     | 5     | ✅     |
    | Fulfillment | 1      | 0      | 0       | 0     | 1     | ✅     |
    | Manage      | 0      | 0      | 1       | 0     | 1     | ➖     |
    | Analytics   | 2      | 0      | 0       | 1     | 2     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 409    | 0      | 29      | 305   | 438   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-package-and-test: :white_check_mark: test report for e204ceb1

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Govern      | 182    | 0      | 16      | 0     | 198   | ✅     |
    | Plan        | 44     | 0      | 4       | 0     | 48    | ✅     |
    | Create      | 46     | 0      | 6       | 0     | 52    | ✅     |
    | Verify      | 8      | 0      | 2       | 0     | 10    | ✅     |
    | Release     | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Data Stores | 22     | 0      | 0       | 0     | 22    | ✅     |
    | Package     | 6      | 0      | 8       | 0     | 14    | ✅     |
    | Monitor     | 8      | 0      | 0       | 0     | 8     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 318    | 0      | 36      | 0     | 354   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
  • :tools: Generated by gitlab_quality-test_tooling.


    :snail: Slow tests detected in this merge request. These slow tests might be related to this merge request's changes.

    Click to expand
    Job File Name Duration Expected duration
    #6958594181 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 69.08 s < 27.12 s
    #6958594268 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 78.28 s < 27.12 s
    #6958594684 spec/features/ide_spec.rb#L46 IDE with vscode feature flag off behaves like legacy Web IDE loads legacy Web IDE 63.92 s < 50.13 s
    #6960662361 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 74.81 s < 27.12 s
    #6960662411 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 82.46 s < 27.12 s
    #6974603645 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 70.53 s < 27.12 s
    #6974603574 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 69.46 s < 27.12 s
    #7005096129 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 63.76 s < 27.12 s
    #7005096029 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 67.81 s < 27.12 s
    #7008585325 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 70.3 s < 27.12 s
    #7008585284 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 75.37 s < 27.12 s
    #7017409647 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 64.49 s < 27.12 s
    #7017409724 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 78.7 s < 27.12 s
    #7018824587 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 72.82 s < 27.12 s
    #7018824455 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 75.51 s < 27.12 s
    #7020073350 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 65.44 s < 27.12 s
    #7020073495 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 77.41 s < 27.12 s
    #7033436949 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 63.26 s < 27.12 s
    #7033437005 spec/lib/release_highlights/validator_spec.rb#L82 ReleaseHighlights::Validator when validating all files they should have no errors 77.73 s < 27.12 s
  • A deleted user added rspec:slow test detected label
  • mo khan added 1 commit

    added 1 commit

    • 271efd78 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Daniel Tian approved this merge request

    approved this merge request

  • Daniel Tian removed review request for @dftian

    removed review request for @dftian

  • mo khan added 579 commits

    added 579 commits

    Compare with previous version

  • mo khan reset approvals from @alexbuijs by pushing to the branch

    reset approvals from @alexbuijs by pushing to the branch

  • mo khan added 1 commit

    added 1 commit

    • e412503d - Connect policy to CustomAbility class

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • eaa745da - Remove pending spec for runner policy

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • 5a7f9577 - Allow admin_runner permission to update stale runner pruning setting

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • b76b6d5d - Add :admin_runner to UserNamespacePolicy next to :admin_namespace

    Compare with previous version

  • mo khan added 1 commit

    added 1 commit

    • a770cbdf - Add `admin_runners` custom ability

    Compare with previous version

  • mo khan requested review from @jarka and @svedova

    requested review from @jarka and @svedova

  • mo khan
  • mo khan added 1 commit

    added 1 commit

    • 532d966a - Remove unsafe authz change in groups REST API

    Compare with previous version

  • mo khan mentioned in merge request !154848 (merged)

    mentioned in merge request !154848 (merged)

  • Savas Vedova
  • Savas Vedova approved this merge request

    approved this merge request

  • Jarka Košanová resolved all threads

    resolved all threads

  • Jarka Košanová approved this merge request

    approved this merge request

  • Jarka Košanová requested review from @stanhu

    requested review from @stanhu

  • Stan Hu
  • Stan Hu removed review request for @stanhu

    removed review request for @stanhu

  • mo khan added 870 commits

    added 870 commits

    Compare with previous version

  • mo khan reset approvals from @jarka and @svedova by pushing to the branch

    reset approvals from @jarka and @svedova by pushing to the branch

  • Jarka Košanová approved this merge request

    approved this merge request

  • mo khan added 227 commits

    added 227 commits

    Compare with previous version

  • mo khan reset approvals from @jarka by pushing to the branch

    reset approvals from @jarka by pushing to the branch

  • mo khan requested review from @stanhu

    requested review from @stanhu

  • Stan Hu
  • mo khan added 1 commit

    added 1 commit

    • b338ad90 - Rename before action hook to be clearer

    Compare with previous version

  • Stan Hu approved this merge request

    approved this merge request

  • Stan Hu removed review request for @stanhu

    removed review request for @stanhu

  • mo khan added 1 commit

    added 1 commit

    • e204ceb1 - Revert authz changes to Mutation.namespaceCiCdSettingsUpdate

    Compare with previous version

  • mo khan reset approvals from @stanhu by pushing to the branch

    reset approvals from @stanhu by pushing to the branch

  • Stan Hu approved this merge request

    approved this merge request

  • Jarka Košanová resolved all threads

    resolved all threads

  • Jarka Košanová approved this merge request

    approved this merge request

  • added pipelinetier-3 label and removed pipelinetier-2 label

  • Jarka Košanová enabled automatic add to merge train when the pipeline for 5722ade3 succeeds

    enabled automatic add to merge train when the pipeline for 5722ade3 succeeds

  • Jarka Košanová aborted automatic add to merge train because This merge request cannot be added to the merge train

    aborted automatic add to merge train because This merge request cannot be added to the merge train

  • Peter Leitzen started a merge train

    started a merge train

  • Peter Leitzen mentioned in commit 2d5fb2ae

    mentioned in commit 2d5fb2ae

  • mentioned in issue #466033 (closed)

  • added workflowstaging label and removed workflowcanary label

  • Darren Eastman mentioned in issue #330100

    mentioned in issue #330100

  • Please register or sign in to reply
    Loading