Koji 1.34.0 Release notes

All changes can be found in the roadmap. Most important changes are listed here.

Check at least scheduler and draft builds as the crucial changes in this release.

Migrating from Koji 1.33/1.33.1

For details on migrating see Migrating to Koji 1.34

Security Fixes

None

Client Changes

Fix [still active] display for edit entries

Not all active settings were correctly marked in list-history output.

Streamline python/json options in call command

Coherent usage of --json/--json-input/--json-output options.

Handle hub w/o getKojiVersion in cancel tasks

Don’t fail cancel command when used against old koji server.

Fix wait-repo message when missing builds

Clarify message.

list-permissions: backward compatibility for getUserPermsInheritance call

Read config file on image build indirection

Option --config was already there, but it was doing nothing. Now, user can pass all the options via config file similarly to the “classical” image build.

API Changes

Unify getSessionInfo output

Different fields were returned when getSessionInfo was called with details=True. Now, same base fields are returned in both cases.

Remove koji.AUTHTYPE_* in 1.34

These constants were deprecated while ago, use koji.AUTHTYPES enum instead.

Extend getUser to get user groups

Additional groups option to get info about user’s group membership.

Short option for watch-logs –follow

Added -f as an alias for --follow.

System Changes

Scheduler part 1

Biggest change in this release. We’re rewriting scheduler to allow better utilization of builders and to have better control about what is built where and when. This is the first part of the changes and it moves scheduling responsibilities from builder to hub and unified queue.

This phase is transparent to administrators and users (even older builders are provided “fake” API, so they can benefit from new hub code without noticing). Two new CLI commands scheduler-info and scheduler-logs can be used to gain insights to scheduler state.

Also there are some new options for hub to modify scheduler behaviour and koji-sweep-db is updated, so it can clean old scheduler logs.

In the next phase there should be added multi-target policies, concept of builder resources, etc. which would allow fine-tuning of build requests. Crude channels’ logic then could be replaced by scheduler hints and hard limits for selecting right builder.

Remove get_sequence_value in 1.34

Deprecated get_sequence_value was finally removed. This could be of some interest to plugin developers.

Add support for sw_64 and loongarch64

Simple extension to support these architectures.

Don’t spawn createrepo if not needed

Performance improvement in some cases where it is not needed to rerun createrepo when creating new tag (typically sidetag or some build tag which doesn’t modify its inherited content). Simple copy of the original repodata is correct here.

Package migration scripts to koji-hub

Previously, these scripts were packaged with basic lib. It doesn’t make much sense, so they were moved to hub subpackage. You can find them now in /usr/share/koji there.

Inherit group permissions

Intuitive understanding of group membership is to inherit everything what is accessible via group inheritance.

Fix user_in_group policy test

Bugfix of regression.

Disable use_bootstrap_image if not requested

Mock’s default behaviour changed to have this setting on by default. So, we’ve extended our flag to allow also disabling this.

new_build: build in error should be the old one

Error message was fixed to show correct data.

Draft builds

Another big change in this release. Builds (rpm only for now) can be run with --draft option to mark it as a draft.

Draft builds should not be confused with scratch builds. Scratch builds are simply stored as files and cannot be tagged in Koji. Draft builds, on the other hand, are actual builds with a modified release value and the draft flag set to True. Koji appends a draft suffix of ,draft{build_id} to the release for the build entry. This allows building multiple drafts for the same NVR.

This release change is done only on the build level. The RPM components of the build are not modified when creating a draft build. The system will now allow overlapping rpm NVRA values, but only for draft builds.

Draft builds can be “promoted” to non-draft using the promote-build cli command. The promoted build is renamed to remove the draft suffix. The original file path is replaced with a symlink to the new location. This is a one-time transition, i.e. builds cannot be “unpromoted”. Only one draft build for a given NVR can be promoted, and once Koji has a non-draft build for a given NVR, further draft builds for that NVR are blocked.

Typical use would be PR/MR workflow. There could be many “candidate” draft builds and only one which will pass testing and/or other workflows will be promoted in the end as “real” build which can be used for distribution.

Handling of when/where draft builds can be used (e.g. in some buildroots but not in the others) is done by is_draft policy test.

Retrieve task_id for older OSBS builds

It is hidden for regular usecases, but improves policy behaviour, e.g. that volume policy can handle builds based on CG, etc.

Raise an error on missing build directory (setBuildVolume)

Better error reporting in case of missing build directories.

More general CG import logging

Fixes race condition when creating CG log.

queryOpts for queryHistory

Adding support for standard queryOpts to this call.

fix task_id extraction for missing extra

OSBS task now pass correct task data to volume policy

Builder Changes

Switch to WatchedFileHandler for logger

Logrotate sometimes caused that kojid/kojira output was appended to already rotated (even deleted) file. Change to WatchedFileHandler will ensure that correct file is used.

Wait with writing timestamps after results dir is created

log_timestamps feature in some cases tried to write logs into directory which hasn’t existed yet causing build to fail from unrelated reasons.

distrepo will not skip rpm stat by default

Reusing repodata with distrepo is dangerous as rpms could be signed with different keys. So, now the default behaviour is to always stat rpms to be sure that they don’t differ from cached metadata. This behaviour can be overriden by --skip-stat CLI option. Note that you’ve to be sure what you’re doing in such case (typically you don’t care about signatures in this repo).

Clean rpm db directory of broken symlinks

(At least) Fedora is moving rpm database directory. We’ve previously checked existence of .migrated file but it is not enough in some transient environments. Host rpm and buildroot rpm could handle these directories differently resulting in bogus files preventing one of these to work. So, this “hack” is cleaning up potentially broken files.

Kojira

kojira no_repo_effective_age setting

New build tags (without repos) were not prioritized by kojira in best way. Kojira assumed that this tag was never used, so it had very low priority. New setting allows to set default “last use” value to improve the situation.

Web UI

Better handling of deleted tags in kojiweb

Display deleted tags properly on all web pages.

Fix duplicate build link on CG taskinfo page

Multiple ways how to store CG’s task_id led to situation when task was displayed twice.

Display two decimal points for the task load in hosts page

Some floats were too long, stripped to two digits.

Sort channels on hosts page

More readability in selectors.

Plugins

create initial repo for sidetag

trigger_new_repo is new setting for sidetag plugin. When it is set to true, it will trigger newRepo task as part of new sidetag creation. If it is not set, old way (leave it on kojira) is used.

sidetag: extend is_sidetag_owner for untag ops

is_sidetag_owner policy has now tag/fromtag/both optional keywords for tag specification.

kiwi: Sort image rpm components before inserting

There is a potential db deadlock which is avoided by this reordering.

Documentation

Fix docstring getTaskInfo

More XMLRPC-related docs

Fix release notes version

Explain _ord() method

readTaggedRPMS/Builds API documentation

Fix param in createImageBuild docstring

Example of how to enable a module via mock.module_setup_commands

Update docstring for listPackages

Fix return type (chainBuild)

Devtools and tests

Basic vim syntax highlighting for hub policy

It can be used for editing hub policies. As it has no rigorous syntax it doesn’t work in 100%.

Tox: Don’t install coverage every run

A bit of performance improvement for running tests.

Fix tests/flake8

Update Containerfiles

Updated to current Fedoras