checks
The checks
view is a time series representation of the collection of checks that Lunar ran on components.
A subset of this data is available in the checks_latest
view, which contains only the checks for the latest git_sha
in each pr
, in each component. To get the latest row for the default branch, you can filter this view by pr IS NULL
.
Schema
component_id
TEXT
The identifier for the component - e.g. github.com/foo/bar/buz
timestamp
TIMESTAMPTZ
The "committed at" UTC timestamp of the git_sha
git_sha
TEXT
The Git commit SHA of the component JSON
pr
BIGINT
The pull request number if the commit is part of a pull request. Set to NULL
for the default branch
name
TEXT
The name of the check that was run
description
TEXT
The description of the check that was run
initiative_name
TEXT
The identifier of the initiative this check's policy belongs to
policy_name
TEXT
The name of the policy this check is part of
enforcement
TEXT
The enforcement level of the check. Can be one of draft
, score
, block-pr
, block-release
, block-pr-and-release
status
TEXT
The status of the check. Can be one of pass
, fail
, no-data
, error
failure_reason
TEXT
The human-readable reason the check failed. Set to NULL
if the check passed.
metadata
JSONB
The metadata of the check that was run
Notes
To get the set of checks for a given component version, you need to filter by
component_id
, andgit_sha
.While a certain
git_sha
for a component is being evaluated, the set of rows in this view will dynamically change as collectors provide more data, and policies are iteratively evaluated against the updated information. (For example, new checks may appear as new policies are evaluated, or existing checks may switch status fromno-data
topass
orfail
.)
Usage examples
Retrieve the checks associated with the latest git_sha
for a given component, ordered by status.
Retrieve time series data of the number of checks that passed, failed, had no data, or errored out over time.
Retrieve the checks that are failing for all components with the tag soc2
.
Retrieve the checks that are blocking PRs right now.
Count the number of PRs that are blocked by checks for each domain.
Total blocking checks for the domain payments
over time.
All blocking failing checks of all PRs authored by Jane.
Last updated