Skip to content

Remove security report latest pipeline fallback calculation

What does this MR do and why?

This fallback calculation was implemented until we could have the latest pipeline data populated in the database. Now that the background migrations have completed, this calculation is no longer needed and can be removed, per #331950 (closed).

Screenshots or screen recordings

There are no screenshots to show for this MR.

How to set up and validate locally

  1. Set the branch to master
  2. Go to the Vulnerability Report of a project with vulnerabilities
  3. Note the last updated field exists. Screen_Shot_2022-06-21_at_1.26.47_PM
  4. Open a rails console
  5. Get the project's vulnerability statistic
    vs = Project.find(<project.id>).vulnerability_statistic
  6. Clear the latest_pipeline_id
    vs.update_attribute(:latest_pipeline_id, nil)
  7. On the Vulnerability Report, the last updated field still exists.
  8. Set the branch to 331950-remove-the-fallback-to-on-the-fly-calculation-of-latest-pipeline-with-security-reports
  9. On the Vulnerability Report, the last updated field no longer exists, as the backup method has been removed. Screen_Shot_2022-06-21_at_1.25.55_PM

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 #331950 (closed)

Edited by Jonathan Schafer

Merge request reports

Loading