Skip to main content

An engine for storing waivers against test results.

Project description

# WaiverDB

![logo of WaiverDB](https://pagure.io/waiverdb/raw/master/f/logo.png)

## What is WaiverDB

WaiverDB is a companion service to
[ResultsDB](https://pagure.io/taskotron/resultsdb), for recording waivers
against test results.

## Quick development setup

Install dependencies:

$ sudo dnf builddep waiverdb.spec

Configure Postgres on the local machine, with a `waiverdb` database:

$ sudo dnf install postgresql-server
$ sudo postgresql-setup --initdb
$ sudo systemctl enable --now postgresql
$ sudo -u postgres createuser --superuser $USER
$ createdb waiverdb

Create a local configuration file:

$ cp conf/settings.py.example conf/settings.py

Populate the database:

$ PYTHONPATH=. DEV=true python3 waiverdb/manage.py db upgrade

Run the server:

$ PYTHONPATH=. DEV=true python3 waiverdb/manage.py run -h localhost -p 5004 --debugger

The server is now running at <http://localhost:5004> and API calls can be sent to
<http://localhost:5004/api/v1.0>. All data is stored in the `waiverdb` Postgres
database on the local machine. You can verify the server is running correctly
by visiting <http://localhost:5004/api/v1.0/about>.


## Adjusting configuration

You can configure this app by copying `conf/settings.py.example` into
`conf/settings.py` and adjusting values as you see fit. It overrides default
values in `waiverdb/config.py`.

## Running test suite

You can run this test suite with the following command::

$ py.test-3 tests/

The test suite will drop and re-create a Postgres database named
`waiverdb_test`. By default, it expects to have superuser access to Postgres on
the local machine.

To test against all supported versions of Python, you can use tox::

$ sudo dnf install python3-tox
$ tox

## Building the docs

You can view the docs locally with::

$ cd docs
$ make html
$ firefox _build/html/index.html

## Viewing published fedmsgs

You can view fedmsgs published when new waivers get created by doing::

$ fedmsg-relay --config-filename fedmsg.d/config.py &
$ fedmsg-tail --config fedmsg.d/config.py --no-validate --really-pretty

### WaiverDB CLI
WaiverDB has a command-line client interface for creating new waivers against test
results. A sample configuration is installed as ``/usr/share/doc/waiverdb/client.conf.example``.
Copy it to ``/etc/waiverdb/client.conf`` and edit it there. Or you can use ``--config-file``
to specify one.
```
Usage: waiverdb-cli [OPTIONS]

Creates new waivers against test results.

Examples:

waiverdb-cli -r 47 -r 48 -p "fedora-28" -c "This is fine"
or

waiverdb-cli -t dist.rpmdeplint -s '{"item": "qclib-1.3.1-3.fc28", "type": "koji_build"}' -p "fedora-28" -c "This is expected for non-x86 packages"


Options:
-C, --config-file PATH Specify a config file to use
-r, --result-id INTEGER Specify one or more results to be waived
-s, --subject TEXT Specify one subject for a result to waive
-t, --testcase TEXT Specify a testcase for the subject
-p, --product-version TEXT Specify one of PDC's product version
identifiers.
--waived / --no-waived Whether or not the result is waived
-c, --comment TEXT A comment explaining why the result is waived
-h, --help Show this message and exit.
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waiverdb-0.12.0.tar.gz (131.7 kB view details)

Uploaded Source

File details

Details for the file waiverdb-0.12.0.tar.gz.

File metadata

  • Download URL: waiverdb-0.12.0.tar.gz
  • Upload date:
  • Size: 131.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for waiverdb-0.12.0.tar.gz
Algorithm Hash digest
SHA256 33ca216de1e99b5190397ef49ae37d299c998f6991f5b7b5e78428db411333da
MD5 f8bf7e9e0efd6b29ae91dc15df97807d
BLAKE2b-256 8d637b11f30b5d5ad13f83d3cd9fd53ad016df41a5baa3fe07d71f8380ad7b55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page