Skip to content
Snippets Groups Projects
Commit 17e02062 authored by 🤖 GitLab Bot 🤖's avatar 🤖 GitLab Bot 🤖
Browse files

Automatic merge of gitlab-org/gitlab master

parents 93eddf8b e50d1653
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,10 @@ def filter_by_image
def filter_by_cluster_agent_id
return unless params[:cluster_agent_id].present?
@vulnerability_reads = vulnerability_reads.with_cluster_agent_ids(params[:cluster_agent_id])
# TODO: One background migration to fill casted_cluster_agent_id migration is finished,
# we can remove this. See: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/89915
cluster_agent_ids_as_string = Array.wrap(params[:cluster_agent_id]).map(&:to_s)
@vulnerability_reads = vulnerability_reads.with_cluster_agent_ids(cluster_agent_ids_as_string)
end
def sort
......
......@@ -204,14 +204,16 @@
let_it_be(:cluster_vulnerability) { create(:vulnerability, :cluster_image_scanning, project: project) }
let_it_be(:finding) { create(:vulnerabilities_finding, :with_cluster_image_scanning_scanning_metadata, project: project, vulnerability: cluster_vulnerability) }
let(:filters) { { cluster_agent_id: [finding.location['kubernetes_resource']['agent_id']] } }
let(:filters) { { cluster_agent_id: [finding.location['kubernetes_resource']['agent_id'].to_i] } }
it 'only returns vulnerabilities matching the given agent_id' do
is_expected.to contain_exactly(cluster_vulnerability.vulnerability_read)
end
context 'when different report_type is passed' do
let(:filters) { { report_type: %w[dast], cluster_agent_id: [finding.location['kubernetes_resource']['agent_id']] }}
let(:filters) do
{ report_type: %w[dast], cluster_agent_id: [finding.location['kubernetes_resource']['agent_id'].to_i] }
end
it 'returns empty list' do
is_expected.to be_empty
......
......@@ -42,6 +42,7 @@ exports[`RunnerAwsDeploymentsModal renders the modal 1`] = `
>
<gl-accordion-item-stub
class="gl-font-weight-normal"
headerclass=""
title="More Details"
titlevisible="Less Details"
>
......@@ -76,6 +77,7 @@ exports[`RunnerAwsDeploymentsModal renders the modal 1`] = `
>
<gl-accordion-item-stub
class="gl-font-weight-normal"
headerclass=""
title="More Details"
titlevisible="Less Details"
>
......@@ -110,6 +112,7 @@ exports[`RunnerAwsDeploymentsModal renders the modal 1`] = `
>
<gl-accordion-item-stub
class="gl-font-weight-normal"
headerclass=""
title="More Details"
titlevisible="Less Details"
>
......@@ -144,6 +147,7 @@ exports[`RunnerAwsDeploymentsModal renders the modal 1`] = `
>
<gl-accordion-item-stub
class="gl-font-weight-normal"
headerclass=""
title="More Details"
titlevisible="Less Details"
>
......
......@@ -1048,10 +1048,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-2.21.0.tgz#bc71951dc35a61647fb2c0267cca6fb55a04d317"
integrity sha512-cVa5cgvVmY2MsRdV61id+rLTsY/tAGPq7Og9ETblUuZXl06ciw8H/g7cYPMxN39DdEfDklzbUnS98OJlMmD9TQ==
 
"@gitlab/ui@42.7.0":
version "42.7.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-42.7.0.tgz#70e53399d78a2720aa035605c6b194e9352e24c0"
integrity sha512-dsKkjUOvPsu+TzXAe0EOQJrWVrwrYViJ9loCjslweOYJ4wxgukqLpMIQCDCgDTHMdGzjUWENvF98Xle7Vkfl2g==
"@gitlab/ui@42.9.0":
version "42.9.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-42.9.0.tgz#506a642b9bef9eb5d363684c8ef81129a9b284ef"
integrity sha512-i575fmHOXYPGWdaaSqt7cdgpfhPvnbIwhavslgbj9g9LNzffH7fea4P6BobKakb1AZuOfahJfarqfOJ2pYuRSQ==
dependencies:
"@popperjs/core" "^2.11.2"
bootstrap-vue "2.20.1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment