fedora-ci / cccc

Created 2 years ago
Maintained by jkaluza
Compose Configuration Compare and Check tool
Members 2

Compose Configuration Compare and Check tool (CCCC)

Motivation

Before merging any compose configuration change, we should be able to verify how the resulting compose changes. For example, when adding new packages to a comps file, we should be able to see all the packages pulled-in as dependencies and we should also ensure this compose passes basic sanity tests.

CCCC tool

The CCCC tool takes following inputs:

  • git repository/commit with default Pungi configuration (For example pointing to some commit/branch in https://pagure.io/pungi-fedora/).
  • default Pungi configuration file name (For example fedora.conf).
  • git repository with PR for Pungi configuration repository.
  • git repository with PR for Comps repository.
  • git repository with PR for module-defaults repository.

The CCCC tool then uses this input to create two minimal composes using the ODCS (On Demand Compose Service):

  • The default compose using the unchanged configuration from git repository with default Pungi configuration.
  • The PR compose with the PRs applied.

The CCCC tool compares these two composes and prints the difference to stdout.

CCCC tool use-case

The plan is to have the Jenkins Job running the CCCC tool on any PR against pungi-fedora, comps and module-defaults repositories. The summary of compose difference will be added as comment to the PR.

It should therefore be clear if the most important parts of the compose still works with the PR applied and how the PR changed the compose.

Development

Unit-testing

Install packages required to build and test the python package:

$ sudo dnf install -y \
    compose-utils \
    gcc \
    git \
    krb5-devel \
    make \
    rsync \
    tox \
    which

Run the tests:

$ make test