Skip to content

Remove unused `MAX_DAYS_OF_HISTORY` from vulnerabilities

What does this MR do and why?

The MAX_DAYS_OF_HISTORY constant in the vulnerability model appears to be unused:

~/gitlab-development-kit/gitlab$ ag --ignore TAGS \
                                 --literal \
                                 --group \
                                 --line-number \
                                 --column \
                                 --smart-case -- MAX_DAYS_OF_HISTORY .
File: ee/app/models/ee/vulnerability.rb
22:7:      MAX_DAYS_OF_HISTORY = 10
1 matches
1 files contained matches
62376 files searched

git history

  1. added in 7ff151eb
    • used in VulnerabilitiesHistoryResolver and Vulnerability.counts_by_day_and_severity
  2. VulnerabilitiesHistoryResolver removed in 89009fc7
  3. Vulnerability.counts_by_day_and_severity removed in e9567195

resolves: #433494 (closed)

How to set up and validate locally

  1. ci passes
  2. run a similar search as the ag above

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #433494 (closed)

Edited by Michael Becker

Merge request reports