diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-27 21:12:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-27 21:12:02 +0300 |
commit | 3b060a68f3ca685d0676c2a70e3471dc7ee19d6e (patch) | |
tree | 5a3f06014de88fd4564e4f5eb7e6a2ecb1d9e7ce /app/finders | |
parent | 2977cf67ec27f8ab014bfee852d0ae7b56585242 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/ci/runners_finder.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/finders/ci/runners_finder.rb b/app/finders/ci/runners_finder.rb index 4f9244d9825..774947a35b7 100644 --- a/app/finders/ci/runners_finder.rb +++ b/app/finders/ci/runners_finder.rb @@ -69,10 +69,15 @@ module Ci end def filter_by_upgrade_status! - return unless @params.key?(:upgrade_status) - return unless Ci::RunnerVersion.statuses.key?(@params[:upgrade_status]) + upgrade_status = @params[:upgrade_status] - @runners = @runners.with_upgrade_status(@params[:upgrade_status]) + return unless upgrade_status + + unless Ci::RunnerVersion.statuses.key?(upgrade_status) + raise ArgumentError, "Invalid upgrade status value '#{upgrade_status}'" + end + + @runners = @runners.with_upgrade_status(upgrade_status) end def filter_by_runner_type! |