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.

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

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. version

$ dri version

dri gem version.

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