Skip to content

Expose dismissal_reason on VulnerabilityType

What does this MR do and why?

Expose dismissal_reason on VulnerabilityType

Related to #411774 (closed)

How to set up and validate locally

GraphQL query to use
query {
  project(fullPath: "<path to project>") {
    vulnerabilities {
      edges {
        node {
          id
          state
          dismissalReason
        }
      }
    }
  }
}
  1. Ensure you have a project with some Vulnerabilities present in the Vulnerability report
  2. Dismiss any of the Vulnerabilities
  3. Execute the provided query, dismissalReason should be null
  4. echo "Feature.enable(:expose_dismissal_reason)" | rails c
  5. Execute the provided query, dismissalReason should NOT be null for the dismissed Vulnerability

Database review

This change adds preloading vulnerability_reads table:

Query plan (cold cache): https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/19904/commands/65032

Query plan (warm cache): https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/19904/commands/65033

MR acceptance checklist

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

Edited by Michał Zając

Merge request reports

Loading