Skip to content

Capture gitaly errors in Security Policies

Alan (Maciej) Paruszewski requested to merge capture-git-errors into master

What does this MR do and why?

This change adds capturing errors happening outside of the Security Policies scope (when the repository is inaccessible, during Postgres update, etc.). Currently, these errors are affecting the group's error budget, and there is no action that we can take to solve them.

Related to GRPC::ResourceExhausted: 8:detecting object has... (#412419 - closed)

How to test it locally?

  1. Create a new project
  2. Go to Secure -> Policies and create a new policy (ie. Scan Execution Policy)
  3. Go to GraphQL Explorer (/-/graphql-explorer) and query policies for the created project (you should see this created policy there):
    query {
      project(fullPath: "root/cis-test") {
        scanExecutionPolicies {
          nodes {
            name
          }
        }
      }
    }
  4. Now turn off gitaly locally gdk stop praefect praefect-gitaly-0
    1. Go to GraphQL Explorer (/-/graphql-explorer) and query policies again for the created project (you should see an empty list), while before this change, you would get 500 errors.

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 Alan (Maciej) Paruszewski

Merge request reports

Loading