Add release_post.py, which writes the "What changed" and "Versions"
sections of the XCP-ng release post from the json report, with the
change descriptions for the users taken from the related pull requests.
Signed-off-by: Gaëtan Lehmann <[email protected]>
* Fix plane connection error blocking the script execution
It's meant to generate a message in the report, not block the report
generation
Signed-off-by: Gaëtan Lehmann <[email protected]>
* pkg_in_pipe: log the progress, the cache usage and the source problems during the generation
Add a --debug option and log the koji tag and the build being processed, whether
values come from the cache or are fetched again, and warn when the plane tickets
or github can't be reached, using the same logger setup as gen-dnf-proxy.py.
Signed-off-by: Gaëtan Lehmann <[email protected]>
---------
Signed-off-by: Gaëtan Lehmann <[email protected]>
The report is written as a json file that other scripts can consume,
e.g. to generate the release post or to move the plane cards of the
builds to another state.
Signed-off-by: Gaëtan Lehmann <[email protected]>
It might happen that the previous tag build for a package does not have
its source field filled in with the corresponding git commit (this
typically happens for security updates that did not go through the
standard release procedure). In order to avoid reporting extra PRs and
plane cards, those missing sources can now be listed in the
`missing_sources.toml` dictionary.
Signed-off-by: Vincent Michel <[email protected]>
It might happen that the previous tag build for a package does not have
its source field filled in with the corresponding git commit (this
typically happens for security updates that did not go through the
standard release procedure). By trying again with the build before
it until we find a source, we limit the amount of PRs and Plane cards
that will be included in the reports (if no source is provided by
`find_previous_build_commit`, all the PRs and cards are listed).
Signed-off-by: Vincent Michel <[email protected]>
Introduce PackageInfo TypedDict for all package data structures
Replace all dict[str, dict[str, Any]] with dict[str, PackageInfo]
and use PackageInfo | None for base_version throughout the file.
Introduce Packages type alias for dict[str, PackageInfo]
Replace all dict[str, PackageInfo] occurrences with the new
Packages type alias for shorter, cleaner annotations.
Fix flake8 E501 line-too-long errors
- Split long print() call across multiple lines
- Split long lines.append() call across multiple lines
- Split do_list_update() def signature across two lines
Signed-off-by: Philippe Coval <[email protected]>
This script is used to generated versions updates:
uv run koji-helper.py --no-verify-ssl list-update v8.3-ci v8.3-updates \
| sed -e 's|\([^:]*\)\(.*\)|* \1\2|g'
It produces this kind of output:
* `xen`: 4.17.6-9.3.1.xcpng8.3 -> 4.17.6-12.2.xcpng8.3
Signed-off-by: Philippe Coval <[email protected]>
- Add version and release to list_source_packages results
- Update list-update output to show version-release format
- Include base_version and base_release for comparison
Signed-off-by: Philippe Coval <[email protected]>
Adds:
- list_update_source_packages() function to find updated packages between tags
- Reuse list_source_packages() for both tag lookups
- list-update CLI command with old_nvr -> new_nvr output format
Signed-off-by: Philippe Coval <[email protected]>
Features:
- Uses python-koji library for Koji CLI API access
- Supports SSL verification toggle and debug mode
- Configurable server and web URLs
Signed-off-by: Philippe Coval <[email protected]>
The disk creation tool does not support the '.' character in package
name so rename it from 'qlogic-fastlinq-alt_8.42' to
'qlogic-fastlinq-alt_8_42'.
Signed-off-by: Thierry Escande <[email protected]>
in order to decrease the load on koji. With what's currently in the pipe, we
decrease the number of koji calls from 65 to 37 with the cache.
Signed-off-by: Gaëtan Lehmann <[email protected]>
This package provides an older version of the qlogic-fastlinq driver
than the ones in the main and alt package. This older version 8.42.10.0
is know to work with some old hardware not well supported by newer
versions of the driver.
Signed-off-by: Thierry Escande <[email protected]>
This package contains an assortment of useful Python functions for
manipulating UEFI variables on XCP-ng pools and VMs.
Signed-off-by: Tu Dinh <[email protected]>
A regression was introduced to VM.revert in xapi-26.1.4-3.3, which left VBDs
attached to the VM when they are not present in the reverted-to
snapshot (instead of destroying such VBDs, as was done before).
VMs that were reverted to their snapshots after xapi-26.1.4-3.3 may have
such "leftover" VBDs. This script can be used to detect possible cases in
pools. Sadly, there is no way to automatically distinguish a VBD that
was created after a VM.revert from a VBD that survived the VM.revert,
so this script relies on the user to determine if the suspicious VBDs are
indeed affected or not.
Therefore, tbis is not a destructive script, it just uses the API to find the
affected VBDs and presents them to the user, as in this example output:
VM e2678368-596d-1b6e-7211-9ee45f60dec1 ("Alpine minimal for CI") has
VBDs that are not present in the snapshot it was reverted to
(303ead66-9515-b1c8-0dc5-d33b7644b161 "Alpine minimal for CI_snapshot1"):
xvdb (ca8610d2-76e3-6c54-4378-ee599619b4bb))
The script follows this algorithm:
1. Find all VMs that are children of snapshots
(i.e. were reverted to a particular snapshot at some point in time)
2. Find VBDs that are currently present in such VMs but are
not present in the snapshot
Signed-off-by: Andrii Sultanov <[email protected]>
If xapi was manually stopped before running the script, then it
would fail:
$ python3 snapshot-fixer.py rewrite
INFO:root:Check HA...
Traceback (most recent call last):
File "snapshot-fixer.py", line 237, in <module>
main()
File "snapshot-fixer.py", line 234, in main
args.func(args)
File "snapshot-fixer.py", line 177, in rewrite
ha_enabled = query_and_stop_ha()
File "snapshot-fixer.py", line 96, in query_and_stop_ha
pool_uuid = r.stdout.strip().split()[-1].decode('utf-8')
IndexError: list index out of range
Handle this failure and start xapi back up to check HA instead:
$ python3 snapshot-fixer.py rewrite
INFO:root:Check HA...
INFO:root:Xapi was down, bringing it up to check HA
INFO:root:Starting up xapi...
INFO:root:Shutting down xapi...
INFO:root:Regenerating database...
INFO:root:Writing database to /var/lib/xcp/state.db
INFO:root:Starting up xapi...
Signed-off-by: Andrii Sultanov <[email protected]>
This allows building straight from source, without generating patches and
modifying the specfile manually.
The script will replace the current tarball with the one generated from the
git hash in the source repository. It will also increment the release tag
(following the rules for --test-build), with the commit hash used as a unique
reference.
Note that the new tarball might conflict with the patches generated on top
of the current tarball, or require new dependencies etc., so this is not a
catch-all solution, just a usability improvement for some simpler cases.
Like --pre-build or --test-build, the subcommand takes an additional
argument - the hash of the commit in source repository to generate the
tarball from. It can be called from rpms-xsconsole like this, for example:
koji_build.py --source-build 6f7d91f8 v8.3-u-asultanov2 .
I've specified two automatic spec->source mappings for xapi and
xsconsole in this commit, this can be expanded in the future.
For other repositories, --source-repo has to be specified manually:
koji_build.py --source-build 4e0cae33f7 --source-repo xapi-project/varstored v8.3-u-asultanov2 .
Signed-off-by: Andrii Sultanov <[email protected]>