2495 Commits

Author SHA1 Message Date
mprahl
aa113042b0 Bump the version to v2.28.0 v2.28.0 2019-09-17 13:25:55 -04:00
mprahl
110b6adb0a Add release notes for v2.28.0 2019-09-17 13:24:22 -04:00
mprahl
1a05d59a4d Use double quotes instead of single quotes 2019-09-17 13:11:22 -04:00
Chenxiong Qi
065abe3c45 Fix DetachedInstanceError in command module_build_locally
Update test test_build_module_locally_set_stream accordingly by not
mocking database session object in order to test against the real
SQLAlchemy Session scope.

Resolves: RHBZ#1752075

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-17 23:09:14 +08:00
Chenxiong Qi
c36bd7ebac Name component builds by states
This patch attemps to make code shorter and easier to read by naming
component builds for different states.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-16 15:29:21 +08:00
Jan Kaluža
442a855f0a Merge #1415 Install python3-pytest-cov in the C3I Dockerfile since it's now used by tox 2019-09-16 06:25:26 +00:00
Jan Kaluža
b33fc6adf1 Merge #1410 Don't check for compatibile modules during component reuse if allow_only_compatible_base_modules is false 2019-09-16 06:14:10 +00:00
Jan Kaluža
0bf84f557e Merge #1407 Do not ignore building components to reset state when submit an existing module build 2019-09-16 06:11:04 +00:00
mprahl
86b16d61c0 Unpin python3-libmodulemd in the C3I tests since the MBS RPM requires it directly 2019-09-13 09:12:34 -04:00
mprahl
10d70f51e1 Install python3-pytest-cov in the C3I Dockerfile since it's now used by tox 2019-09-13 09:12:24 -04:00
mprahl
d2e7c0cf90 Don't check for compatibile modules during component reuse if allow_only_compatible_base_modules is false
Addresses #1409
2019-09-13 13:06:35 +00:00
mprahl
2153f4d699 Alphabetize the dependencies in Dockerfile-tests 2019-09-13 08:35:17 -04:00
mprahl
bfd954f455 Provide context as to why the epel7Server-infra repo is required for the tests 2019-09-13 08:32:24 -04:00
mprahl
f8e4daae9f Unpin the libmodulemd RPMs 2019-09-13 08:32:24 -04:00
Jan Kaluza
52e88ba3ff Handle the conflicts between base module modular Koji tags everytime.
Currently, we generate `Conflicts` for ursine RPMs conflicting with
modular RPMs only when Ursa Prime is used for the base module. This
commit changes it, so these Conflicts are generated everytime.

The reason is that modular RPMs should always be preferred in the
buildroot over the ursine RPMs no matter what is their NVR. So far,
this has been guarded on Koji side by using external repos, but
we need to move away from external repo or at least use "bare"
merge mode which basically means we won't get this feature for free
from Koji.

The reason why we need to move away from external repos or use "bare"
merge mode is that without this, the Koji removes RPMs sharing the same
name but different version/release from the buildroot and only keeps
the latest one. This is an issue in situation when you need two
versions of single RPM in a buildroot comming from two modules.
2019-09-12 11:08:57 +02:00
Chenxiong Qi
5d0969f312 Merge #1406 Show test coverage 2019-09-12 01:50:20 +00:00
mprahl
6b484b7f49 Use str(e) instead of e.message to support Python 2 and 3 2019-09-11 12:38:02 -04:00
mprahl
00e78494d9 Refactor handling of default buildroot modules (Ursa Prime)
This removes support for default_modules_url in the Platform XMD and
gets the list of default name:stream combinations to include in the buildroot
from https://pagure.io/releng/fedora-module-defaults.

Addresses #1402
2019-09-11 12:20:35 -04:00
Chenxiong Qi
c54c3a288b Do not ignore building components to reset state when submit an existing module build
koji.BUILD_STATE["BUILDING"] equals to 0. So, checking if
component.state is None explicitly to avoid ignoring the components
which are in building state.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-11 09:55:10 +08:00
Chenxiong Qi
dd1f918920 Show test coverage
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-10 23:02:36 +08:00
Qixiang Wan
47809d530a Set build logs dir to mock results dir for mock builder
When build module with MockModulerBuilder, set build logs dir to
the main results dir of mock builder before build_logs start.
2019-09-03 22:27:03 +08:00
Qixiang Wan
478709e25d Change console log level of local build to INFO
1. Add option "-d|--debug" to build_module_locally command

   Note: there is also global debug option to Manager, so we need to use
a different dest name ("log_debug" in this change).

2. When debug option is not specified for local build command, set log
level of console to INFO.
2019-09-03 22:26:45 +08:00
Chenxiong Qi
6d19a23c17 Refactor buildroot_add_artifacts
* Reuse tag_artifacts.
* Split unblocking packages and adding packages to groups into
  separate methods.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-02 20:30:49 +08:00
Chenxiong Qi
6c3721ef75 Update KojiModuleBuilder *_artifacts methods docstring
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-02 17:37:13 +08:00
Jan Kaluza
f026a4f88b Version 2.27.0. v2.27.0 2019-08-30 08:01:41 +02:00
Jan Kaluža
457b16daff Merge #1395 Reuse the latest module build found. 2019-08-30 05:48:25 +00:00
Jan Kaluza
00ad20dfcd Reuse the latest module build found.
Before this commit, the base modules used in the `get_reusable_module` have
not been sorted and therefore when `get_reusable_module` tried to find out
the reusable module built against some base module, it could find a module
built against some old version of base module.

This could lead to situation when MBS tried to reuse components from quite
old module despite the fact that newer module build existed.

This commit fixes this by sorting the base modules by stream_version,
so MBS always tries to get the reusable module built against the latest
base module.
2019-08-29 15:35:21 +02:00
Valerij Maljulin
c4a95d0673 Add a check for non-ready builds (siblings) in requires resolver
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-08-28 15:34:46 +02:00
Jan Kaluža
9d40a9b9cb Merge #1390 Fix --add-local-build with MBS Resolver. 2019-08-26 05:33:40 +00:00
mprahl
ef39068127 Reword the gating documentation
This commit fixes a few typos and adds a link to Greenwave.
2019-08-23 14:02:46 -04:00
mprahl
cf334b3261 Use a different container name when running the unit tests with Postgres
This will allow the parallel execution of tests that use SQLite and Postgres.
2019-08-23 12:06:48 -04:00
mprahl
14a9ef9974 Use the z option when mounting container volumes to allow sharing 2019-08-23 11:53:16 -04:00
Hunor Csomortáni
1ae7976a22 Adjust syntax for parallel steps in .cico-pr.pipeline
"parallel" has a different syntac in scripted pipelines than in
declarative ones, see:
https://jenkins.io/doc/book/pipeline/jenkinsfile/#parallel-execution

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-08-23 17:22:07 +02:00
Jan Kaluza
cc5aaf90c1 Fix --add-local-build with MBS Resolver.
The `MBSResolver.get_buildrequired_modulemds` did not try to load
local module builds and always just queried the remote MBS instance.

This commit fixes it by using local module if available.
2019-08-23 14:58:15 +02:00
mprahl
f3db9a0ac2 Fix a typo in an error message 2019-08-22 17:15:55 -04:00
Matt Prahl
c8c028d989 Merge #1386 Do not check Greenwave gating status for scratch builds. 2019-08-22 21:11:38 +00:00
Valerij Maljulin
4b4428a9e3 Fix locale issues with date representations
This fixes #1214
Also fixes tests running on different locales

Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-08-22 17:06:26 +02:00
Jan Kaluža
1d9d08141f Merge #1387 Describe gating in GATING.rst. 2019-08-22 12:54:39 +00:00
Jan Kaluza
5329c656c0 Describe gating in GATING.rst. 2019-08-22 14:53:48 +02:00
mprahl
a7099d8431 Make the timestamps consistent in import_mmd
This will keep tests from failing occasionally.
2019-08-21 16:21:05 -04:00
mprahl
f7654f736b Run the unit tests in parallel in the Jenkins job 2019-08-21 16:21:05 -04:00
mprahl
10d36d3a0e Pull the container images in parallel in the Jenkins job 2019-08-21 16:21:05 -04:00
Jan Kaluža
13a18d1d5a Merge #1384 Add "scratch_build_only_branches" configuration options. 2019-08-21 11:18:34 +00:00
Jan Kaluza
80fca557af Do not check Greenwave gating status for scratch builds.
Scratch builds cannot be gated. They stay in the `done` state forever.
Therefore it is useless to query Greenwave for its status in the Poller.
2019-08-21 13:17:04 +02:00
Jan Kaluza
e2395e4a69 Do not check Greenwave gating status for scratch builds.
Scratch builds cannot be gated. They stay in the `done` state forever.
Therefore it is useless to query Greenwave for its status in the Poller.
2019-08-19 08:16:46 +02:00
Chenxiong Qi
e1342d8ffc Use dict literal to create dict
Some code create a dict in this way:

some_var = {}
some_var["a"] = 100
some_var["b"] = 200

Using dict literal could make these lines a little bit simpler.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-15 21:28:27 +08:00
Chenxiong Qi
e6aa47e02a Use set literal to create a set
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-15 21:14:02 +08:00
Chenxiong Qi
dbced8668b Do not compare with a empty list
An empty list [] is evaluated as a false value. So, it is not necessary
to compare like "if some_var == []:".

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-15 17:48:33 +08:00
Jan Kaluza
796a367457 Add "scratch_build_only_branches" configuration options.
The goal here is to define certain branches from which only scratch
module builds can be submitted. The main use case is for "private-*"
branches which can be created and maintained by anyone, but there
must not be production-ready module build created from them.

This commit adds new `scratch_build_only_branches` config option
to define the list of regexes to match such branches.
2019-08-15 10:49:03 +02:00
Valerij Maljulin
a6e7741553 Fix tests failing on 1 sec time differences
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-08-14 13:52:39 +02:00