Fix Security features tables cross-joining `ci_builds` -> Deprecate `user_[analyzer]_scans` metrics
From !62092 (comment 626027123) we see that Security::Scan.latest_successful_by_build requires joining from non ci_*
tables to ci_*
tables. When we extract ci_*
tables to a new database this will not be possible.
As such we need to find an alternative approach.
UsageData metrics
The specific metrics are:
counts_28d/20210607043410_user_secret_detection_scans.yml:
key_path: usage_activity_by_stage_monthly.secure.user_secret_detection_scans
counts_28d/20210607043509_user_coverage_fuzzing_scans.yml:
key_path: usage_activity_by_stage_monthly.secure.user_coverage_fuzzing_scans
counts_28d/20210607043622_user_api_fuzzing_scans.yml:
key_path: usage_activity_by_stage_monthly.secure.user_api_fuzzing_scans
counts_28d/20210607041718_user_dast_scans.yml:
key_path: usage_activity_by_stage_monthly.secure.user_dast_scans
counts_28d/20210607043301_user_dependency_scanning_scans.yml:
key_path: usage_activity_by_stage_monthly.secure.user_dependency_scanning_scans
counts_28d/20210607043218_user_sast_scans.yml:
key_path: usage_activity_by_stage_monthly.secure.user_sast_scans
counts_28d/20210607043336_user_container_scanning_scans.yml:
key_path: usage_activity_by_stage_monthly.secure.user_container_scanning_scans
Proposal
An analysis has shown that these metrics are unlikely to be used in Sisense charts and as such will be deprecated.
Edited by Cameron Swords