DRI

So, are you the Directly Responsible Individual for GitLab's QA pipelines this week? Looking for a gem to help triage and report failing tests? Look no further.

Welcome to your new gem! DRI is a CLI ready to help:

  • Fetching failing test cases by pipeline
  • Reporting at the end of the timezone shift
  • View today's newest and untriaged failures
  • Mark actions on failures

... and more

Installation

To install the dri gem:

$ gem install dri

And then execute dri to see all available options:

$ dri

Usage

Configuration

To use dri fully it is necessary to have:

  • a Personal Access Token
  • a triage emoji

The emoji is the Award/My Reaction emoji associated with the failure issues to group all failures triaged on a given day. This emoji is a personal choice. Note that the same emoji should be used only while triaging failures and not associated with other issues out of the scope of triage.

To set up your personal profile:

$ dri init

To verify the profile is correctly set:

$ dri profile

Commands

1. init

$ dri init

Initializes the dri CLI with necessary configurations to run smoothly.

2. profile

$ dri profile

Shows the current profile associated after initial configuration. Pass the option --edit to edit the current profile.

3. fetch

$ dri fetch failures

Fetches today's opened failures and lists them according to their triage status. Helpful to understand if there are missing recent failures to be reviewed.

To surface most urgent issues pass the --urgent flag to see issues that are both in canary and staging-canary pipelines just during today's timespan.

$ dri fetch testcases

Fetches test cases that failing currently and groups them by pipeline. To filter the pipelines, pass the --filter-pipelines options to multi-select the pipelines you wish to consult. (Use Space to select an option)

$ dri fetch triaged

Fetches triaged failures which use the triage emoji specified in dri profile.

$ dri fetch quarantines

Fetches open quarantine Merge Requests to be reviewed

$ dri fetch dequarantines

Fetches open dequarantine Merge Requests to be reviewed

Results are organized by environment (production, staging, staging ref and preprod).

$ dri fetch featureflags

Fetches a list of today's feature flag changes, including the date and time in UTC of when the change occurred as well as a link to the corresponding issue from the feature-flag-log project.

$ dri fetch pipelines

Fetches a table containing last executed pipeline and its test report link for all monitored pipelines. The timestamps are in UTC

4. publish

$ dri publish report

Publishes a handover report on the latest triage issue, in the pipeline-triage project.

Options

$ dri publish report --format=list # formats the report in a list
$ dri publish report --format=table # formats the report in a table (default)
$ dri publish report --dry-run # the report is only generated locally
$ dri publish report --actions # activate the actions prompt for each failure
$ dri publish report --feature-flags # includes a summary of the feature flag changes on each environment

Note: These options above can be combined like:

$ dri publish report --format=list --dry-run --actions

Actions

When using --actions a set of actions are prompt on each failure. Use Space to mark several actions: pinged SET, quarantined, reproduced, transient. Hitting Enter without a selected action will skip marking the actions for a given failure.

5. rm

$ dri rm emoji

Removes the triage emoji from all triaged issues.

$ dri rm reports

When using $ dri publish report --dry-run to download the reports locally instead of uploading to the latest Pipeline Triage Issue, an /handover_reports/ folder created to store these reports. This command removes this folder and subsequent reports stored in it.

$ dri rm profile

Removes the profile currently in use.

6. incidents

$ dri incidents

Have a quick look at currently active/mitigated incidents on GitLab services.

7. analyze

$ dri analyze stacktraces

Searches through any open test failure issues and publishes a report that identifies issues that have similar stack traces. This may be useful to identify situations where a common test failure is presenting itself across multiple individual test cases, over a period of time.

8. version

$ dri version

dri gem version.

Copyright (c) 2022 GitLab, Inc. See MIT License for further details.