Commit d818762f authored by Adam Hegyi's avatar Adam Hegyi

Merge branch 'remove_security_scan_succeeded_from_code' into 'master'

Remove security_scan_succeeded from code

See merge request gitlab-org/gitlab!84222
parents 6e40d109 8f9e556e
...@@ -10425,7 +10425,6 @@ Snapshot. ...@@ -10425,7 +10425,6 @@ Snapshot.
| <a id="devopsadoptionsnapshotrecordedat"></a>`recordedAt` | [`Time!`](#time) | Time the snapshot was recorded. | | <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="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` **{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="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="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. |
...@@ -34,9 +34,6 @@ module Types ...@@ -34,9 +34,6 @@ module Types
description: 'At least one runner was used.' description: 'At least one runner was used.'
field :sast_enabled_count, GraphQL::Types::Int, null: true, field :sast_enabled_count, GraphQL::Types::Int, null: true,
description: 'Total number of projects with enabled SAST.' 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, field :start_time, Types::TimeType, null: false,
description: 'Start time for the snapshot where the data points were collected.' description: 'Start time for the snapshot where the data points were collected.'
field :total_projects_count, GraphQL::Types::Int, null: true, field :total_projects_count, GraphQL::Types::Int, null: true,
......
...@@ -9,8 +9,7 @@ class Analytics::DevopsAdoption::Snapshot < ApplicationRecord ...@@ -9,8 +9,7 @@ class Analytics::DevopsAdoption::Snapshot < ApplicationRecord
:merge_request_approved, :merge_request_approved,
:runner_configured, :runner_configured,
:pipeline_succeeded, :pipeline_succeeded,
:deploy_succeeded, :deploy_succeeded
:security_scan_succeeded
].freeze ].freeze
NUMERIC_METRICS = [ NUMERIC_METRICS = [
...@@ -36,6 +35,7 @@ class Analytics::DevopsAdoption::Snapshot < ApplicationRecord ...@@ -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) 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 :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 scope :latest_for_namespace_ids, -> (ids) do
finalized.for_month(1.month.before(Time.zone.now)).for_namespaces(ids) finalized.for_month(1.month.before(Time.zone.now)).for_namespaces(ids)
......
...@@ -34,7 +34,6 @@ Gitlab::Seeder.quiet do ...@@ -34,7 +34,6 @@ Gitlab::Seeder.quiet do
runner_configured: booleans.sample, runner_configured: booleans.sample,
pipeline_succeeded: booleans.sample, pipeline_succeeded: booleans.sample,
deploy_succeeded: booleans.sample, deploy_succeeded: booleans.sample,
security_scan_succeeded: booleans.sample,
code_owners_used_count: rand(10), code_owners_used_count: rand(10),
sast_enabled_count: rand(10), sast_enabled_count: rand(10),
dast_enabled_count: rand(10), dast_enabled_count: rand(10),
......
...@@ -72,10 +72,6 @@ module Analytics ...@@ -72,10 +72,6 @@ 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
def security_scan_succeeded
false
end
def total_projects_count def total_projects_count
snapshot_project_ids.count snapshot_project_ids.count
end end
......
...@@ -12,6 +12,5 @@ FactoryBot.define do ...@@ -12,6 +12,5 @@ FactoryBot.define do
runner_configured { true } runner_configured { true }
pipeline_succeeded { false } pipeline_succeeded { false }
deploy_succeeded { true } deploy_succeeded { true }
security_scan_succeeded { false }
end end
end end
...@@ -114,14 +114,6 @@ RSpec.describe Analytics::DevopsAdoption::SnapshotCalculator do ...@@ -114,14 +114,6 @@ RSpec.describe Analytics::DevopsAdoption::SnapshotCalculator do
end end
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 describe 'total_projects_count' do
subject { data[:total_projects_count] } subject { data[:total_projects_count] }
......
...@@ -36,7 +36,6 @@ RSpec.describe CopyAdoptionSnapshotNamespace, :migration, schema: 20210430124630 ...@@ -36,7 +36,6 @@ RSpec.describe CopyAdoptionSnapshotNamespace, :migration, schema: 20210430124630
runner_configured: true, runner_configured: true,
pipeline_succeeded: true, pipeline_succeeded: true,
deploy_succeeded: true, deploy_succeeded: true,
security_scan_succeeded: true,
end_time: Time.zone.now.end_of_month 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