Skip to main content

# relvalconsumer

relvalconsumer is a fedora-messaging consumer for creating Fedora release validation test events. Each time a compose appears, it runs various checks to decide whether it should create an event for the compose. It creates events for both nightly composes and ‘candidate’ composes.

It should create a first nightly for the next release shortly after a release goes out. From then until the release, it will create new nightly events periodically. It will never create a nightly event fewer than three days after the current event. Between three and fourteen days after the current event, it will create a new event if certain packages have changed (these are defined in the code). After fourteen days it will create an event as soon as a nightly compose appears. It will create events for all candidate composes as soon as they appear.

It should never create an event for a given release from a Rawhide compose after that release branches, because at that point wikitcms will decide that any notional event for a Rawhide compose would be for the release two after the current stable release, and this script will create events only for the release one after the current stable release.

Note that in production mode the consumer is configured to create events in the production wiki, send announcement emails to the test@ mailing list, and post announcements to Discourse (if an API key is provided). So, really, only one person should ever have it running in production mode, and that’s probably me. Please don’t run it in production mode unless you’re taking over my job or something.

As long as relval is also installed, relvalconsumer will also run the image size check on the newly-created event, whenever it creates an event.

The project also includes another consumer, RelvalAMIConsumer, which updates a wiki page containing information on available EC2 AMIs for a validation event whenever a relevant ‘AMI published’ message is received from fedora- image-uploader (the tool that publishes Fedora AMI images to EC2).

## Requirements

Python libraries:

The hawkey library is also required. This is only available on Fedora and RHEL and is only available from official package repositories, it is not available from Pypi.

Optionally also [relval](https://forge.fedoraproject.org/quality/relval) itself, to run image size check tests on the created events.

## Installation

Install the required external Python libraries, then use setuptools to install, e.g.:

python3 setup.py install

You will also typically need to do:

dnf install fedora-messaging python3-hawkey

## Configuration

A sample configuration file which is set up to listen for real compose events on the production fedora-messaging bus is provided as relvalconsumer.toml. A sample file for the AMI consumer is provided as relvalamiconsumer.toml. To use these, you must at least change the queue name from 00000000-0000-0000-0000-000000000000 to a unique and private string; the official recommendation is to use a UUID generated by uuidgen. Then place the file in /etc/fedora-messaging.

You can then enable and start the consumer as a systemd service:

sudo systemctl enable fm-consumer@relvalconsumer sudo systemctl start fm-consumer@relvalconsumer

For the AMI consumer:

sudo systemctl enable fm-consumer@relvalamiconsumer sudo systemctl start fm-consumer@relvalamiconsumer

### Discourse announcements

The consumer can also post each announcement to a Discourse instance. This is opt-in: leave discourse_api_key unset and no HTTP requests are made. In production, the key is supplied by the Ansible role from the private secrets store and is never committed. The relevant settings live in consumer_config:

  • discourse_url — the forum host (default discussion.fedoraproject.org)

  • discourse_category_id — the numeric ID of the category to post in (default 7, which is Project Discussion on the Fedora forum)

  • discourse_tags — tags to apply to each topic (default quality-team, workstation-wg, server-wg, cloud-wg)

  • discourse_username — the account the API key belongs to (default announcebot)

  • discourse_api_key — the API key; posting is enabled only when this is set

A new topic is created in the configured category for each compose. Discourse errors are logged and ignored, so they never block the announcement email or stop the consumer.

## Test and production modes

A configuration setting, relval_prod, decides whether the consumer operates in ‘production’ or ‘test’ mode. This is set in the consumer configuration file’s consumer_config section. The corresponding setting for the AMI consumer is relvalami_prod. In test mode:

  • The consumer creates events on the staging wiki (not production wiki)

  • The announcement email is logged rather than being mailed out

  • The rendered Discourse topic is logged instead of being posted

In this mode it is fairly safe to play around with the consumer. You will need a local fedora-messaging broker instance to be able to trigger the consumer at will, though. Depending on how you set that up, you may also need to change the routing_keys from .prod. to .dev. or similar.

For ‘production’:

  • The consumer creates events on the production wiki

  • The consumer sends email notifications to public mailing lists

PLEASE do not enable the production consumer unless you’re absolutely sure it’s your job to create the official events.

## License

All copyrightable content in relvalconsumer is released under the [GPL](https://www.gnu.org/licenses/gpl.txt), version 3 or later. See COPYING and the header of relvalconsumer.py itself. With reference to the US Copyright Office’s 2025 report on the copyrightability of AI-generated content, to the extent that this project contains any such content, it is asserted that the project as a whole constitutes “a larger human-generated work” and is copyrightable. Copyright is explicitly asserted to the maximum possible extent in all human-generated or human-assisted elements of this project.

## Contributing

Issues and pull requests can be filed in [Fedora Forge](https://forge.fedoraproject.org/quality/relvalconsumer).

ANY USE OF AI/LLM IN THE PRODUCTION OF A PULL REQUEST MUST BE CLEARLY DISCLOSED. This is for legal reasons, as the copyrightability of LLM-generated code is (as of July 2025) disputed and unclear. This is also for technical reasons, as reviewers may need to look out for different problems when reviewing LLM-generated code, compared to human-generated code.

Please include an Assisted-by line in the commit message, specifying the model, tool and/or service used in creating the pull request, and a more detailed explanation of how LLM technologies were used in the pull request description. This can be copied/pasted from PR to PR if the workflow remains the same.

Pull requests must be signed off (use the -s git argument). By signing off your pull request you are agreeing to the [Developer’s Certificate of Origin](http://developercertificate.org/):

Developer’s Certificate of Origin 1.1

By making a contribution to this project, I certify that:

  1. The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

  2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

  3. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

  4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

Metadata

Release files for relvalconsumer 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for relvalconsumer 2.3.0
File Size Uploaded Provenance Actions
relvalconsumer-2.3.0.tar.gz 36.2 kB Without provenance Details for relvalconsumer-2.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for relvalconsumer 2.3.0
File Interpreter ABI Platform Actions
relvalconsumer-2.3.0-py3-none-any.whl Python 3 none any Details for relvalconsumer-2.3.0-py3-none-any.whl

Total release size: 59.4 kB

Release files / relvalconsumer-2.3.0.tar.gz

Download URL relvalconsumer-2.3.0.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
47bbdb92f05f5af6879647807dcb6450225fddc68404c76531a7daf829fbbf6e
BLAKE2b-256 checksum
How to use checksums
42b43041fe1e73cc6a6a2e23a182afa1ccd575520c68775f91b0c6615cd37346
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Release files / relvalconsumer-2.3.0-py3-none-any.whl

Download URL relvalconsumer-2.3.0-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
016892915d655f069c4db126a9b8b3774699f59bc44e7cbcae924f3cf4b2053c
BLAKE2b-256 checksum
How to use checksums
fd0615b743272eef29c6cf362c3432dc29c6e4dd15ce350aed0b78d27337e17a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.8

Security for relvalconsumer 2.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page