2592 Commits

Author SHA1 Message Date
mprahl
efb690a482 Release v2.30.0 v2.30.0 2019-11-05 15:15:04 -05:00
Matt Prahl
e2155b58db Merge #1489 Mention layered product modules in KojiResolver. 2019-11-05 14:10:09 +00:00
Jan Kaluza
566164ecb1 Mention layered product modules in KojiResolver. 2019-11-05 08:59:51 +01:00
Jan Kaluža
84398834e4 Merge #1481 Search for default modules built also against compatible base modules. 2019-11-05 07:41:42 +00:00
Jan Kaluza
96ca7fd00b Search for default modules built also against compatible base modules. 2019-11-05 07:03:40 +01:00
Matt Prahl
4eee019791 Merge #1486 update container base images to Fedora 31 2019-11-04 20:27:39 +00:00
Mike Bonnet
e582126106 use the C locale for generating the date string for the specfile changelog
This produces exactly the same output as the en_US locale, and is guaranteed to be supported
in all environments.
2019-11-01 16:50:56 -07:00
Mike Bonnet
86c85825ee update container base images to Fedora 31
Also update the uid management in the frontend image to be more consistent with
best practices, as demonstrated by:

https://github.com/RHsyseng/container-rhel-examples/tree/master/starter-arbitrary-uid

This allows the dependency on nss_wrapper to be dropped.
2019-11-01 12:04:36 -07:00
mprahl
f95b665904 Use RuntimeError instead of ValueError when the retrieval of default modules fails
This will result in the error actually being in the state reason
of the failed module build instead of "An unknown error occurred
while validating the modulemd".
2019-11-01 14:49:10 -04:00
Chenxiong Qi
1c645f5a04 Fix log.exception
log.exception() without a message will fail and module build cannot move
to failed state.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-11-01 21:33:08 +08:00
mprahl
ef0ab348bc Remove commented out code in test_utils.py 2019-10-30 15:29:45 -04:00
Mike Bonnet
f6baf5a427 convert tests to Kerberos auth 2019-10-29 19:37:31 -07:00
Mike Bonnet
6cdf460647 configure MBS to use Kerberos for authentication
This change deploys a KDC using the c3i-library (https://pagure.io/c3i-library) and configures MBS
to require Kerberos authentication for submitting builds to the frontend.
2019-10-29 19:37:31 -07:00
Chenxiong Qi
1ab259ba77 Fix state for determining if continue building components in current batch
The original code before changing to is_unbuilt is to check if any
component builds in current batch has state None. This patch fixes that.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-10-30 09:26:07 +08:00
Chenxiong Qi
cab9cb8ee3 Merge #1479 Minor fixes to consume and process_message 2019-10-30 01:24:38 +00:00
Chenxiong Qi
251239621d Refactor consume and process_message
A new method _map_message is added for converting a message object to
corresponding event handler and module build. This is used to shorten the
process_message method.

process_message is refactored so that:

* when handler is NO_OP, just return as earlier as possible because setting it
  make no sense to set MBSConsumer.current_module_build_id back and forth.
* Re-raise error thrown from handler execution so that the caller is able to
  get a chance to collect monitoring metric inside except clause handling
  Exception. Otherwise, no failed metric is collected. This is the major
  problem this patch is to fix.
* Ensure MBSConsumer.current_module_build_id is set back to None.

In consumer method, no traceback is logged inside except clause catching
Exception. process_method does that.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-10-29 22:22:10 +08:00
Chenxiong Qi
fa227698ef Fix wrong value passed to ModuleBuild.transition state argument
state argument expects an int value represeting a module build state
rather than a string value.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-10-29 22:19:46 +08:00
Chenxiong Qi
4bebd13872 Fix wrong argument name in docstring and assert its value
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-10-29 22:19:46 +08:00
Chenxiong Qi
3bdbdaee20 Remove unnecessary code from process_message
It is not necessary to initialize the build variable before following
if-elif-else branch.

After the if-elif-else branch, if no build is found, process_message
just returns immediately. So, no need to check if build is None during
handling error raised from handler call.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-10-28 20:49:52 +08:00
Matt Prahl
0596dad784 Merge #1477 Do not drop realm from user's kerberos principal name 2019-10-25 14:56:50 +00:00
Matt Prahl
1de4cfcc64 Merge #1476 Use the new internal container registry 2019-10-25 14:55:21 +00:00
Chenxiong Qi
d1026c0df7 Do not drop realm from user's kerberos principal name
Save the realm and just keep the variable there for any further possible
use.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-10-25 13:46:54 +08:00
Hunor Csomortáni
0066c79dae Bootstrap integration tests
This is the first step to have some tests, that we could run against an
MBS instance, to check that it's functionally correct. Ultimately, these
will replace the test scripts (`contrib/test-*`).

This doesn't really do anything yet, but I would like to make sure that
everyone is on the same page regarding how this will be set up.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-10-24 10:16:16 +02:00
Luiz Carvalho
246cae6328 Use the new internal container registry
Signed-off-by: Luiz Carvalho <lucarval@redhat.com>
2019-10-23 17:49:19 -04:00
Mike McLean
2b5deca8ec Merge #1464 Fix the name field in modulemd text for -devel builds 2019-10-21 22:12:44 +00:00
Mike Bonnet
6868454fcc increase build timeouts 2019-10-18 10:29:29 -07:00
Mike McLean
e90fa30841 revert part of #1469
After merging #1469, CI runs are failing on the merge step

11:33:39  fatal: proposed/devel-build-modulemd - not something we can merge

This seems to be caused by the change to the fetch line. It seems older versions
of git might have slightly different behavior when asked to fetch a branch name.
2019-10-18 12:13:02 -04:00
Matt Prahl
9379e9ac9c Merge #1469 avoid shallow clone, but limit second fetch to branch under consideration 2019-10-18 15:24:35 +00:00
Matt Prahl
5fc3e0a73f Merge #1467 use C3I-as-a-Service to allocate a dynamic project for building and testing 2019-10-18 15:20:23 +00:00
Mike McLean
920c4efa46 avoid shallow clone, but limit second fetch to branch under consideration 2019-10-18 11:18:10 -04:00
Mike McLean
107df94776 fix unit test 2019-10-18 09:44:45 -04:00
Mike McLean
dbcb0f30d1 drop unnecessary parentheses 2019-10-18 09:44:45 -04:00
Mike McLean
5e854f503d adjust unit test 2019-10-18 09:44:45 -04:00
Mike McLean
620263c34b combine common code 2019-10-18 09:44:45 -04:00
Mike McLean
ad6afecc69 also fix build.extra 2019-10-18 09:44:45 -04:00
Mike McLean
8a83a17c53 update devel case assertion 2019-10-18 09:44:45 -04:00
Mike McLean
8581b9d02f adjust name for devel builds in modulemd.txt 2019-10-18 09:44:45 -04:00
Mike McLean
72621277f3 Merge #1465 run-unittests.sh: docker pull needed images 2019-10-17 15:13:55 +00:00
Mike McLean
1b02a45331 no need to update database image 2019-10-17 11:06:20 -04:00
Mike Bonnet
78ee32bc83 enable parallel job execution
With the use of C3IaaS, resource contention in the main OpenShift project will
be dramatically reduced. This allows jobs to run in paralle, increasing throughput
and reducing lag time for feedback on changes.
2019-10-17 07:32:16 -07:00
Mike Bonnet
f86b736c70 use C3I-as-a-Service to allocate a dynamic project for building and testing
The C3I-as-a-Service system (https://pagure.io/c3i-library/blob/master/f/c3iaas)
enables creation of new OpenShift projects, which will be deleted after a
configurable period of time, and are suitable for building and testing proposed
changes. The MBS-Koji integration tests now make use of C3IaaS, to reduce resource
contention and avoid false failures due to quota limitations.
2019-10-17 07:32:16 -07:00
Chenxiong Qi
9fd3731ff7 Remove KerberosAuthenticate and get kerberos username from REMOTE_USER
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-10-17 10:20:59 +08:00
Mike McLean
120681806b update script options in CONTRIBUTING doc 2019-10-15 11:17:51 -04:00
Mike McLean
0d8af77ce4 run-unittests.sh: docker pull needed images
Related: https://pagure.io/fm-orchestrator/issue/1463
2019-10-15 11:14:10 -04:00
Jan Kaluza
eeb65c97da KojiResolver: Filter module builds based on the real stream name.
Query Koji for the real stream name of each module and keep only those matching
requested `stream`.

This needs to be done, because MBS stores the stream name in the "version" field in Koji,
but the "version" field cannot contain "-" character. Therefore MBS replaces all "-"
with "_". This makes it impossible to reconstruct the original stream name from the
"version" field.

We therefore need to ask for real original stream name here and filter out modules based
on this real stream name.
2019-10-14 14:13:34 +02:00
Jan Kaluža
578d6f1e33 Merge #1461 Add KojiResolver doc. 2019-10-11 07:36:29 +00:00
Jan Kaluza
3fedb14483 Add KojiResolver doc. 2019-10-11 09:34:19 +02:00
Matt Prahl
74bf638cdc Merge #1458 Only use default modules that were built with the same base module 2019-10-09 12:44:52 +00:00
Jan Kaluža
514e4c115a Merge #1457 Make reuse_shared_userspace_init_data faster 2019-10-09 05:24:00 +00:00
mprahl
27f4d71392 Only use default modules that were built with the same base module 2019-10-08 11:38:39 -04:00