Follow-up from "Introduce matcher classes for builds and runners"
The following discussion from !61471 (merged) should be addressed:
-
@ayufan started a discussion: (+2 comments) I wonder, if this would not be helpful to also pass
runner_ids
, similarly tobuild_ids
.This can be achieved by:
unique_params = [ :runner_type, :public_projects_minutes_cost_factor, :private_projects_minutes_cost_factor, :run_untagged, :access_level, Arel.sql("(#{arel_tag_names_array})") ] group(*unique_params).pluck('array_agg(id)', *unique_params).map do |values| Gitlab::Ci::Matching::RunnerMatcher.new( runner_ids: values[0], runner_type: values[1], public_projects_minutes_cost_factor: values[2], private_projects_minutes_cost_factor: values[3], run_untagged: values[4], access_level: values[5], tag_list: values[6] ) end