Commit e463bca0 authored by Phil Hughes's avatar Phil Hughes

Merge branch '335190-remove-devops-adoption-scanning-metric' into 'master'

Remove securityScansSucceeded from DevOps Adoption

See merge request gitlab-org/gitlab!66291
parents 5cc6ecfd eac43a02
...@@ -8552,7 +8552,7 @@ Snapshot. ...@@ -8552,7 +8552,7 @@ Snapshot.
| <a id="devopsadoptionsnapshotrecordedat"></a>`recordedAt` | [`Time!`](#time) | The time the snapshot was recorded. | | <a id="devopsadoptionsnapshotrecordedat"></a>`recordedAt` | [`Time!`](#time) | The time the snapshot was recorded. |
| <a id="devopsadoptionsnapshotrunnerconfigured"></a>`runnerConfigured` | [`Boolean!`](#boolean) | At least one runner was used. | | <a id="devopsadoptionsnapshotrunnerconfigured"></a>`runnerConfigured` | [`Boolean!`](#boolean) | At least one runner was used. |
| <a id="devopsadoptionsnapshotsastenabledcount"></a>`sastEnabledCount` | [`Int`](#int) | Total number of projects with enabled SAST. | | <a id="devopsadoptionsnapshotsastenabledcount"></a>`sastEnabledCount` | [`Int`](#int) | Total number of projects with enabled SAST. |
| <a id="devopsadoptionsnapshotsecurityscansucceeded"></a>`securityScanSucceeded` | [`Boolean!`](#boolean) | At least one security scan succeeded. | | <a id="devopsadoptionsnapshotsecurityscansucceeded"></a>`securityScanSucceeded` **{warning-solid}** | [`Boolean!`](#boolean) | **Deprecated** in 14.1. Substituted with specific security metrics. Always false. |
| <a id="devopsadoptionsnapshotstarttime"></a>`startTime` | [`Time!`](#time) | The start time for the snapshot where the data points were collected. | | <a id="devopsadoptionsnapshotstarttime"></a>`startTime` | [`Time!`](#time) | The start time for the snapshot where the data points were collected. |
| <a id="devopsadoptionsnapshottotalprojectscount"></a>`totalProjectsCount` | [`Int`](#int) | Total number of projects. | | <a id="devopsadoptionsnapshottotalprojectscount"></a>`totalProjectsCount` | [`Int`](#int) | Total number of projects. |
| <a id="devopsadoptionsnapshotvulnerabilitymanagementusedcount"></a>`vulnerabilityManagementUsedCount` | [`Int`](#int) | Total number of projects with vulnerability management used at least once. | | <a id="devopsadoptionsnapshotvulnerabilitymanagementusedcount"></a>`vulnerabilityManagementUsedCount` | [`Int`](#int) | Total number of projects with vulnerability management used at least once. |
......
...@@ -57,7 +57,6 @@ DevOps Adoption shows you which groups in your organization are using the most e ...@@ -57,7 +57,6 @@ DevOps Adoption shows you which groups in your organization are using the most e
- Sec - Sec
- DAST - DAST
- SAST - SAST
- Scans
- Ops - Ops
- Deployments - Deployments
- Pipelines - Pipelines
......
...@@ -27,7 +27,6 @@ Group DevOps Adoption shows you how individual groups and sub-groups within your ...@@ -27,7 +27,6 @@ Group DevOps Adoption shows you how individual groups and sub-groups within your
- Sec - Sec
- DAST - DAST
- SAST - SAST
- Scans
- Ops - Ops
- Deployments - Deployments
- Pipelines - Pipelines
......
...@@ -128,12 +128,6 @@ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [ ...@@ -128,12 +128,6 @@ export const DEVOPS_ADOPTION_TABLE_CONFIGURATION = [
tooltip: s__('DevopsAdoption|SAST enabled for at least one project'), tooltip: s__('DevopsAdoption|SAST enabled for at least one project'),
testId: 'sastCol', testId: 'sastCol',
}, },
{
key: 'securityScanSucceeded',
label: s__('DevopsAdoption|Scanning'),
tooltip: s__('DevopsAdoption|At least one security scan of any type run in pipeline'),
testId: 'scanningCol',
},
], ],
}, },
{ {
......
...@@ -5,7 +5,6 @@ fragment LatestSnapshot on DevopsAdoptionSnapshot { ...@@ -5,7 +5,6 @@ fragment LatestSnapshot on DevopsAdoptionSnapshot {
runnerConfigured runnerConfigured
pipelineSucceeded pipelineSucceeded
deploySucceeded deploySucceeded
securityScanSucceeded
recordedAt recordedAt
codeOwnersUsedCount codeOwnersUsedCount
sastEnabledCount sastEnabledCount
......
...@@ -21,7 +21,8 @@ module Types ...@@ -21,7 +21,8 @@ module Types
field :deploy_succeeded, GraphQL::BOOLEAN_TYPE, null: false, field :deploy_succeeded, GraphQL::BOOLEAN_TYPE, null: false,
description: 'At least one deployment succeeded.' description: 'At least one deployment succeeded.'
field :security_scan_succeeded, GraphQL::BOOLEAN_TYPE, null: false, field :security_scan_succeeded, GraphQL::BOOLEAN_TYPE, null: false,
description: 'At least one security scan succeeded.' description: 'At least one security scan succeeded.',
deprecated: { reason: 'Substituted with specific security metrics. Always false', milestone: '14.1' }
field :code_owners_used_count, GraphQL::INT_TYPE, null: true, field :code_owners_used_count, GraphQL::INT_TYPE, null: true,
description: 'Total number of projects with existing CODEOWNERS file.' description: 'Total number of projects with existing CODEOWNERS file.'
field :sast_enabled_count, GraphQL::INT_TYPE, null: true, field :sast_enabled_count, GraphQL::INT_TYPE, null: true,
......
...@@ -72,16 +72,9 @@ module Analytics ...@@ -72,16 +72,9 @@ module Analytics
Deployment.success.for_project(snapshot_project_ids).updated_before(range_end).updated_after(range_start).exists? Deployment.success.for_project(snapshot_project_ids).updated_before(range_end).updated_after(range_start).exists?
end end
# rubocop: disable CodeReuse/ActiveRecord
def security_scan_succeeded def security_scan_succeeded
Security::Scan false
.joins(:build)
.merge(Ci::Build.for_project(snapshot_project_ids))
.created_before(range_end)
.created_after(range_start)
.exists?
end end
# rubocop: enable CodeReuse/ActiveRecord
def total_projects_count def total_projects_count
snapshot_project_ids.count snapshot_project_ids.count
......
...@@ -40,7 +40,6 @@ export const devopsAdoptionNamespaceData = { ...@@ -40,7 +40,6 @@ export const devopsAdoptionNamespaceData = {
runnerConfigured: true, runnerConfigured: true,
pipelineSucceeded: false, pipelineSucceeded: false,
deploySucceeded: false, deploySucceeded: false,
securityScanSucceeded: false,
codeOwnersUsedCount: 0, codeOwnersUsedCount: 0,
sastEnabledCount: 0, sastEnabledCount: 0,
dastEnabledCount: 0, dastEnabledCount: 0,
...@@ -129,10 +128,6 @@ export const overallAdoptionData = { ...@@ -129,10 +128,6 @@ export const overallAdoptionData = {
adopted: false, adopted: false,
title: 'SAST', title: 'SAST',
}, },
{
adopted: false,
title: 'Scanning',
},
{ {
adopted: false, adopted: false,
title: 'Deploys', title: 'Deploys',
......
...@@ -117,15 +117,9 @@ RSpec.describe Analytics::DevopsAdoption::SnapshotCalculator do ...@@ -117,15 +117,9 @@ RSpec.describe Analytics::DevopsAdoption::SnapshotCalculator do
describe 'security_scan_succeeded' do describe 'security_scan_succeeded' do
subject { data[:security_scan_succeeded] } subject { data[:security_scan_succeeded] }
let!(:old_security_scan) { create :security_scan, build: create(:ci_build, project: project), created_at: 100.days.ago(range_end) } it 'is always false' do
is_expected.to eq false
context 'with successful security scan within month' do
let!(:fresh_security_scan) { create :security_scan, build: create(:ci_build, project: project), created_at: 10.days.ago(range_end) }
it { is_expected.to eq true }
end end
it { is_expected.to eq false }
end end
describe 'total_projects_count' do describe 'total_projects_count' do
......
...@@ -11324,9 +11324,6 @@ msgstr "" ...@@ -11324,9 +11324,6 @@ msgstr ""
msgid "DevopsAdoption|At least one pipeline successfully run" msgid "DevopsAdoption|At least one pipeline successfully run"
msgstr "" msgstr ""
msgid "DevopsAdoption|At least one security scan of any type run in pipeline"
msgstr ""
msgid "DevopsAdoption|Code owners" msgid "DevopsAdoption|Code owners"
msgstr "" msgstr ""
...@@ -11393,9 +11390,6 @@ msgstr "" ...@@ -11393,9 +11390,6 @@ msgstr ""
msgid "DevopsAdoption|SAST enabled for at least one project" msgid "DevopsAdoption|SAST enabled for at least one project"
msgstr "" msgstr ""
msgid "DevopsAdoption|Scanning"
msgstr ""
msgid "DevopsAdoption|Sec" msgid "DevopsAdoption|Sec"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment