For a commit which is not in the default branch, github also returns
the open PRs containing it. A PR based on the 8.3 branch and targeting
master, like the 9.0 support one in xcp-python-libs, was then linked to
the 8.3 builds, and checking that the commit is in the PR commits
couldn't filter it out.
Only keep the PRs whose head or merge commit is in the build commit
range: the PRs merged in the range, or the ones the build was made from.
This also saves fetching the commits of each PR.
Also cache the PR found from the merge commit message, which was lost
on the next run because an empty list was cached.
Signed-off-by: Vincent Michel <vincent.michel@vates.tech>
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 <gaetan.lehmann@vates.tech>
* 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 <gaetan.lehmann@vates.tech>
* 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 <gaetan.lehmann@vates.tech>
---------
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
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 <gaetan.lehmann@vates.tech>
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 <vincent.michel@vates.tech>
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 <vincent.michel@vates.tech>
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 <gaetan.lehmann@vates.tech>
Github API returns some PRs that are not related to the commit, so we check if the
PR actually contains the commit that we've just used to get a list of PR containing
that commit
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
we need the report generator to run fast most of the time, but we
don't want to keep forever some non valid content that may have
been inserted in the cache
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
* when the build is not found in any of the plane card
* when the PR is not found in any of the plane card
* when the package has not maintainer
The PR column now appears before the Cards column to better reflect
how to data is acquired (the build first, then the PRs related to that
build, then the cards linking to the build or any of the PRs).
This way the warning signs are more logically grouped.
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
github is not reporting the PR associated to some commits, so
we get the info from the merge description
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>