2509 Commits

Author SHA1 Message Date
mprahl
550b266961 Release v2.28.2 v2.28.2 2019-09-19 10:22:01 -04:00
mprahl
749f186524 Add conflicts in module-build-macros for NEVRAs found in handle_collisions_with_base_module_rpms
PR #1331 made the assumption that the Ursa Major ursine RPMs were at
xmd["mbs"]["ursine_rpms"], but they are actually at
xmd["mbs"]["buildrequires"]["platform"]["ursine_rpms"]. This commit
handles the ursine RPMs generated by handle_collisions_with_base_module_rpms
separately since the base module the RPMs came from are not tracked in
that function.
2019-09-19 13:31:10 +00:00
Mike McLean
e2939c80a1 use patch.object 2019-09-18 17:22:59 -04:00
Mike McLean
e1cf07c038 extend unit test 2019-09-18 20:21:14 +00:00
Mike McLean
bbb1d4bb5b Use utc date for compare and correct operator 2019-09-18 20:21:14 +00:00
Mike McLean
fafff9f5d0 use date comparison rather than datetime 2019-09-18 20:21:14 +00:00
Matt Prahl
902d887a5e Merge #1423 option to use sudo when running docker for unit tests 2019-09-18 19:27:53 +00:00
mprahl
235d4cd457 Fix the test_handle_collisions_with_base_module_rpms unit test 2019-09-18 12:04:18 -04:00
mprahl
099ee8cbd1 Call record_module_build_arches before add_default_modules
record_module_build_arches needs to be called before since
record_module_build_arches requires the arches to be set to know
which DNF repos to query.
2019-09-18 11:36:01 -04:00
Mike McLean
dfc88f99a6 option to use sudo when running docker for unit tests 2019-09-18 11:04:46 -04:00
mprahl
853300d150 Release v2.28.1 v2.28.1 2019-09-18 09:55:55 -04:00
Chenxiong Qi
3fb079f23d Add more tests for mbs-manager command build_module_locally
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-18 13:42:42 +00:00
Chenxiong Qi
e3f91dd8a8 Add missing keyword assert to test
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-18 16:49:21 +08:00
Chenxiong Qi
0899e470f0 Convert value to correct type in order to pass to _get_rpms_from_tags
Fixes #1420

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-09-18 16:48:39 +08:00
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