• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

containerbuildsystem / cachi2 / 9482235040
97%

Build:
DEFAULT BRANCH: main
Ran 12 Jun 2024 12:07PM UTC
Jobs 3
Files 35
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jun 2024 12:05PM UTC coverage: 97.819% (+0.005%) from 97.814%
9482235040

push

github

eskultety
package_managers: rpm: Allow specifying DNF options via CLI input JSON

Introduce a new input JSON attribute 'options' for the PoC rpm package
manager allowing consumers to pass arbitrary DNF repo configuration
options that would be applied later through the inject-files command.

The general schema for the input JSON is as follows:

{
    type: <package_manager>
    path: <relative_path>
    options: {
        <namespace>: {
            <key1>..<keyN>: Union[str, Any]<val1>
        }
    }
}

which translated to DNF repo options for RPM might then look like:

{
    type: rpm
    path: .
    options: {
        dnf: {
             repoid1: {gpgcheck: 0, deltarpm: 1},
             repoid2: {fastestmirro: 1, sslverify: 0}
        }
    }
}

This implementation is trying to be generic enough to be potentially
later extended to other package managers as well which also means that
due to the fairly complex (multi-level nested dictionary) input
a new intermediary model _DNFOptions was needed to be introduced in
this patch, but most importantly a custom 'before' model validator for
this model had to be implemented to generate stable and deterministic
errors which could be reliably unit-tested (default pydantic error
messages for such complex structures are madness).

Worth noting would be that unless options were specified, they would
not appear in the build-config.json --> exclude_none=True

Signed-off-by: Erik Skultety <eskultet@redhat.com>

45 of 47 new or added lines in 4 files covered. (95.74%)

3 existing lines in 1 file now uncovered.

3633 of 3714 relevant lines covered (97.82%)

2.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 python-3.9 - 9482235040.1 12 Jun 2024 12:07PM UTC 0
97.79
GitHub Action Run
2 python-3.11 - 9482235040.2 12 Jun 2024 12:07PM UTC 0
97.82
GitHub Action Run
3 python-3.10 - 9482235040.3 12 Jun 2024 12:07PM UTC 0
97.82
GitHub Action Run
Source Files on build 9482235040
Detailed source file information is not available for this build.
  • Back to Repo
  • e5caa8c4 on github
  • Prev Build on main (#9444578578)
  • Next Build on main (#9546393238)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc