2107 Commits

Author SHA1 Message Date
mprahl
fce77b48dc Release v2.13.1 v2.13.1 2019-01-28 09:14:52 -05:00
Jan Kaluza
642c8406ca Allow setting context in the imported MMD file.
We always set the "context" to DEFAULT_MODULE_CONTEXT from the historical
reasons - the context was not stored in the database before and we stored
just the build_context/runtime_context. But this is no longer true for
some time.

In this commit, the context is respected and stored in the database when
importing module using the `import_mmd` method. If the context is not set
in the imported MMD, the DEFAULT_MODULE_CONTEXT is used.
2019-01-28 12:16:07 +01:00
Jan Kaluza
26d707cb8e Allow resubmiting the very same module build in case it results in new MSE build.
This is needed for Fedora branching, but it is generally useful.

For example, there is a module buildrequiring "platform:[]". In the time
this module has been built, only platform:f29 existed, so it has been built
just against platform:f29.

After a while, the platform:f30 is released and the maintainer needs
to rebuild the module against platform:f30. Right now, he needs to create
new commit in the module and submit the build, but this will result in useless
rebuild of the module also against platform:f29.

In this commit, MBS allows to resubmit the module build in a case
there are new MSE builds to build. MBS will send all the module builds
back to the user - so the existing builds will be already marked as
"ready" and the newly submitted builds will have the "init" state in
the REST API response.

However, in case when there are no new MSE builds to build, MBS still
sends back the Conflict error as it used to. This is done for backwards
compatibility and also to not confuse the users in case when no new build
has been submitted.
2019-01-28 10:53:37 +01:00
mprahl
6817102506 Release v2.13.0 v2.13.0 2019-01-24 13:23:13 -05:00
mprahl
25cda8d2bd Shutdown fedmsg-hub when SQLAlchemy can no longer resolve DNS records 2019-01-24 10:48:28 -05:00
Luiz Carvalho
5921c109f7 Add retire command to mbs-manager
With this command, admins can retire module builds that should no longer
be used as a dependency for other module builds.

Fixes #1021

Signed-off-by: Luiz Carvalho <lucarval@redhat.com>
2019-01-18 10:58:26 -05:00
mprahl
a94ad0a20b Release v2.12.2 v2.12.2 2019-01-17 09:37:53 -05:00
mprahl
5b0cb105f8 Add a missing entry to the change log 2019-01-17 09:35:20 -05:00
mprahl
c95f1897f4 Fix the default distgits config value to match the default value for RPMS_DEFAULT_REPOSITORY
This was missed as part of PR#1120, where the default dist-git URLs were changed.
2019-01-17 09:07:22 -05:00
Matt Prahl
812b43821e Merge #1122 Pin the python-ldap3 version in the unit tests while RHBZ#1664859 gets resolved 2019-01-16 21:02:43 +00:00
mprahl
522db2743a Release v2.12.1 v2.12.1 2019-01-16 16:00:01 -05:00
mprahl
fed906f9b4 Pin the python-ldap3 version in the unit tests while RHBZ#1664859 gets resolved 2019-01-16 15:49:24 -05:00
mprahl
9f9a025958 Use the https protocol to clone dist-git repos instead of the git protocol
You can read about this at:
https://fedoraproject.org/wiki/Infrastructure/HTTPS-commits

The bug was reported at:
https://bugzilla.redhat.com/show_bug.cgi?id=1666257
2019-01-16 19:00:25 +00:00
Owen W. Taylor
31f4aee548 record_filtered_rpms: Don't discard buildrequires if filtered_rpms already is found
Due to a logic error, if record_filtered_rpms() was called on a module which
already had filtered_rpms set, the buildrequires xmd information was discarded.
This broke all local builds.
2019-01-16 12:30:44 -05:00
mprahl
82c9b993f0 Release v2.12.0 v2.12.0 2019-01-14 08:47:46 -05:00
mprahl
67ebe16f72 Read the files to be hashed as binary to ensure end of lines are not converted
When encoutering a Windows end of line (^M), io.open and open in Python 3
will convert those to UNIX end of lines by default. When reading logs
to compute the checksum, it's important those new lines aren't converted,
to ensure the checksum is correct. This caused issues in Fedora staging
because when cloning down a repo, the repoSpanner output had Windows end
of lines, and this would end up in build.log. The solution is to just read
it as binary so that Python doesn't perform these conversions.
2019-01-11 16:24:18 -05:00
Matt Prahl
64abb202db Merge #1118 Removing tests for _check_upload as long as function was separated from pull-request 2019-01-11 13:52:37 +00:00
Valerij Maljulin
020315fa4e Removing tests for _check_upload as long as function was separated from pull-request
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-01-11 14:43:25 +01:00
Lukas Holecek
3ebc67979e Omit extra git-checkout while cloning repo
Signed-off-by: Lukas Holecek <hluk@email.cz>
2019-01-11 14:17:32 +01:00
Merlin Mathesius
9974d48709 Correct reStructuredText markup in docs
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2019-01-10 15:33:15 -06:00
Valerij Maljulin
436e0bef3f Fix for the test test_all_builds_in_batch_fail
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-01-10 15:22:37 +01:00
Valerij Maljulin
51a9892398 Unit tests for koji_import
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-01-10 15:22:37 +01:00
Valerij Maljulin
aed51dfae1 Adding exception handling while doing import
This fixes #1068

Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-01-10 15:22:37 +01:00
Petr Šabata
ff1ed9926a Don't define DistTag anymore
Fedora 30 now includes rpm-4.14.2.1-4.fc30 with support for
ModularityLabel.  We're not using the DistTag anywhere anymore and it
should be safe to drop it at this point.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2019-01-04 12:02:22 +01:00
Jan Kaluza
3c7f8b7006 Handle lost message from Koji informing MBS about Component being tagged into Koji tag.
Adds new meethod checking the "tagged" and "tagged_in_final" attributes of
"complete" ComponentBuilds in the current batch of module builds
in "building" state against the Koji.

In case the Koji shows the build as tagged/tagged_in_final,
the fake "tagged" message is added to work queue.
2019-01-02 09:33:42 +01:00
mprahl
3515919a94 Add a missing entry to the change log 2018-12-19 13:06:03 -05:00
mprahl
b579a30931 Release v2.11.1 v2.11.1 2018-12-19 09:09:38 -05:00
mprahl
e237676c7e Don't overwrite the state parameter in _nudge_module_builds_in_state 2018-12-19 09:06:59 -05:00
mprahl
fec1a8be92 Fix a log statement in the poller 2018-12-18 17:17:44 -05:00
mprahl
dd1baf1682 Release v2.11.0 v2.11.0 2018-12-18 16:25:26 -05:00
Matt Prahl
8bb50cfe16 Merge #1093 List package name in failed state reason 2018-12-18 21:19:14 +00:00
mprahl
25122cb53e Modify MBS to use a separate Kerberos context per thread so both threads can use the thread keyring to store the Kerberos cache
This commit includes the backport of the changes to `krb_login` in
https://pagure.io/koji/pull-request/1187. This change is required
for our separate threads to use a separate Kerberos context per thread.
2018-12-18 16:05:55 -05:00
Jan Kaluza
e17fdbdb5a Raise an exception in case getRPMHeaders return an empty dict or does not return the RPM license. 2018-12-18 16:28:47 +01:00
Jan Kaluža
f47cc39de9 Merge #1109 Fix creation of CG build without any RPM. 2018-12-18 09:38:28 +00:00
Chenxiong Qi
5c2b411309 List package name in failed state reason
Client tool like module-build-watch and `module-build --watch' could
output failed reason. However, original message "Some components failed
to buld" is not informative enough. Instead, list package names of
failed builds would be helpful.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2018-12-18 16:09:16 +08:00
Jan Kaluza
bcfead0809 In case module is stuck in 'init' state for more than 10 minutes, send fake MBSModule msg.
This fixes issues when UMB message delivery from frontend to backend fails
for whatever reason...

We do the same thing for 'wait' state already, so this commit just extends
it to 'init' state too.
2018-12-18 08:06:31 +01:00
Jan Kaluža
cc303854ad Merge #1096 Non-zero return code for failing builds when building locally 2018-12-17 14:21:40 +00:00
Jan Kaluza
db116aee71 Fix creation of CG build without any RPM.
In case the module did not contain any RPM, _koji_rpms_in_tag still
tried to call the session.getRPMHeaders with an empty list. This results
in None being returned, which is something _koji_rpms_in_tag did
not count with and failed with traceback when trying to iterate
that None value.

In this commit, the _koji_rpms_in_tag returns an empty list early
if Koji tag does not contain any RPM. Therefore the
session.getRPMHeaders is not called at all in this case, because it
does not make any sense to get RPM Headers when Koji tag does not
contain any RPM.
2018-12-14 08:20:57 +01:00
mprahl
6f2866e25a Release v2.10.0 v2.10.0 2018-12-12 19:18:12 -05:00
Matt Prahl
78bb367e7a Merge #1103 Force the epoch on SRPM artifacts in the modulemd files uploaded to the CG build 2018-12-13 00:10:34 +00:00
mprahl
7f82275114 Force the use of a separte Kerberos cache per thread
When using a single Kerberos cache that is shared among threads,
Koji logins start failing because the cache gets corrupt. This uses
the Linux kernel keyring to store a Kerberos cache per MBS thread.

See https://web.mit.edu/kerberos/krb5-1.12/doc/basic/ccache_def.html
2018-12-12 19:04:00 -05:00
mprahl
c3a4b2b91f Force the epoch on SRPM artifacts in the modulemd files uploaded to the CG build 2018-12-12 16:14:07 -05:00
mprahl
654a30129f Release v2.9.2 v2.9.2 2018-12-12 10:33:56 -05:00
Matt Prahl
f4af515dad Merge #1100 Fix handling of SRPMs in Content Generator builds when SRPM name and main package name are different. 2018-12-12 15:26:59 +00:00
Jan Kaluza
7e7f298381 Fix handling of SRPMs in Content Generator builds when SRPM name and main package name are different.
Current code presumes SRPM name always matches the RPM name built out of this SRPM
and only includes it together with the main package in this case. This is wrong
assumption, because usually there are multiple binary RPMs built from single SRPM.

This commit fixes that by including the SRPM NEVRA in `non_devel_source_rpms`
no matter what RPM name is.

The test RPMs are reworked in this commit to match the reality better - especially
the relations between SRPM and RPMs. The case with different SRPM name and RPM
name is also included in the reworked test - dhcp-libs binary RPM built from
dhcp SRPM.
2018-12-12 16:25:20 +01:00
Valerij Maljulin
cadb0587c1 Non-zero return code for failing builds when building locally
Fixes #1063

Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2018-12-10 16:24:11 +01:00
mprahl
96f82443aa Remove the unused "owner" parameter from KojiModuleBuilder.get_session 2018-12-10 09:59:42 -05:00
mprahl
00693cbd00 Improve the readability in KojiModuleBuilder.get_session 2018-12-10 09:54:29 -05:00
Matt Prahl
692c34fceb Merge #1094 Use anonymous Koji session properly 2018-12-10 14:52:22 +00:00
Jan Kaluza
6f43411ea9 Fix circular dependency between module_build_service.__init__ and module_build_service.backports.
This fixes issues with calling 'python module_build_service/manage.py' directly
from the MBS git repo as part of testing local module builds without installing
MBS.

The issue is that 'import pkg_resources' for some reason tries to load
module_build_service.backports before the module_build_service.app actually
exists. This results in traceback saying that module_build_service.app does
not exist.

This commit fixes this by importing whole module_build_service in backports.py.
2018-12-10 12:05:51 +01:00