Commit 8f9e556e authored by Steven Van der Jeugt's avatar Steven Van der Jeugt Committed by Adam Hegyi

Remove security_scan_succeeded from code

Changelog: changed
EE: true
parent 98284cbb
......@@ -10425,7 +10425,6 @@ Snapshot.
| <a id="devopsadoptionsnapshotrecordedat"></a>`recordedAt` | [`Time!`](#time) | Time the snapshot was recorded. |
| <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="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) | Start time for the snapshot where the data points were collected. |
| <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. |
......@@ -34,9 +34,6 @@ module Types
description: 'At least one runner was used.'
field :sast_enabled_count, GraphQL::Types::Int, null: true,
description: 'Total number of projects with enabled SAST.'
field :security_scan_succeeded, GraphQL::Types::Boolean, null: false,
description: 'At least one security scan succeeded.',
deprecated: { reason: 'Substituted with specific security metrics. Always false', milestone: '14.1' }
field :start_time, Types::TimeType, null: false,
description: 'Start time for the snapshot where the data points were collected.'
field :total_projects_count, GraphQL::Types::Int, null: true,
......
......@@ -9,8 +9,7 @@ class Analytics::DevopsAdoption::Snapshot < ApplicationRecord
:merge_request_approved,
:runner_configured,
:pipeline_succeeded,
:deploy_succeeded,
:security_scan_succeeded
:deploy_succeeded
].freeze
NUMERIC_METRICS = [
......@@ -36,6 +35,7 @@ class Analytics::DevopsAdoption::Snapshot < ApplicationRecord
validates(*NUMERIC_METRICS, numericality: { only_integer: true, greater_than_or_equal_to: 0 }, allow_nil: true)
ignore_column :segment_id, remove_with: '14.2', remove_after: '2021-07-22'
ignore_column :security_scan_succeeded, remove_with: '15.1', remove_after: '2022-05-18'
scope :latest_for_namespace_ids, -> (ids) do
finalized.for_month(1.month.before(Time.zone.now)).for_namespaces(ids)
......
......@@ -34,7 +34,6 @@ Gitlab::Seeder.quiet do
runner_configured: booleans.sample,
pipeline_succeeded: booleans.sample,
deploy_succeeded: booleans.sample,
security_scan_succeeded: booleans.sample,
code_owners_used_count: rand(10),
sast_enabled_count: rand(10),
dast_enabled_count: rand(10),
......
......@@ -72,10 +72,6 @@ module Analytics
Deployment.success.for_project(snapshot_project_ids).updated_before(range_end).updated_after(range_start).exists?
end
def security_scan_succeeded
false
end
def total_projects_count
snapshot_project_ids.count
end
......
......@@ -12,6 +12,5 @@ FactoryBot.define do
runner_configured { true }
pipeline_succeeded { false }
deploy_succeeded { true }
security_scan_succeeded { false }
end
end
......@@ -114,14 +114,6 @@ RSpec.describe Analytics::DevopsAdoption::SnapshotCalculator do
end
end
describe 'security_scan_succeeded' do
subject { data[:security_scan_succeeded] }
it 'is always false' do
is_expected.to eq false
end
end
describe 'total_projects_count' do
subject { data[:total_projects_count] }
......
......@@ -36,7 +36,6 @@ RSpec.describe CopyAdoptionSnapshotNamespace, :migration, schema: 20210430124630
runner_configured: true,
pipeline_succeeded: true,
deploy_succeeded: true,
security_scan_succeeded: true,
end_time: Time.zone.now.end_of_month
}
......
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