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
Chenxiong Qi
cbb8156311
Add tests for use of anonymous koji session
...
This patch also clean and rewrite some tests that are relative to use
anonymous koji session.
Signed-off-by: Chenxiong Qi <cqi@redhat.com >
2018-12-07 18:37:36 +08:00
Chenxiong Qi
5579a0e72b
Init event handler handles module stream collision
...
Fixes: FACTORY-3616
Signed-off-by: Chenxiong Qi <cqi@redhat.com >
2018-12-05 18:25:14 +08:00
Chenxiong Qi
b5860fa039
Make it optional to tag build for CG import
...
Fixes FACTORY-3467
Signed-off-by: Chenxiong Qi <cqi@redhat.com >
2018-11-21 09:28:03 +08:00
mprahl
599c881714
Add the ability to query by the base modules a module build buildrequires
...
Future use cases will require the ability to find compatible module builds
to buildrequire based on the base module the module used to build. This
commit adds an association table that will contain module build IDs
and the base module they buildrequire.
Addresses FACTORY-3353
2018-10-17 07:47:31 -04:00
Chenxiong Qi
520a979d3d
Add singleton system_resolver
...
system_resolver is created based on loaded configuration, which could
avoid calls like `GenericResolver.create(conf)` repeatedly in the code.
However, if some cases need to create a specific resolver explicitly,
`GenericResolver.create` could be called with addition argument, for
example db or mbs is passed to argument backend in tests.
Signed-off-by: Chenxiong Qi <cqi@redhat.com >
2018-09-28 11:00:52 +08:00
Martin Curlej
5a3d3d99d3
ISSUE-991: Added a method to the producer that will move stuck builds into 'failed' state
...
Signed-off-by: Martin Curlej <mcurlej@redhat.com >
2018-08-30 16:02:24 +02:00
Jan Kaluza
56fe201c33
Fill in the 'filterer_rpms' in backend to not access Koji from frontend.
2018-08-21 07:58:52 +02:00
mprahl
f08135352a
Use the NVR instead of the component name when responding to a tag message
...
This addresses an issue when a module contains builds that have different
names in their NVR than the component name in MBS. This happens with
SCLs for instance. MBS wouldn't be able to find the component to mark
as tagged in the database since it was searching by the wrong name, so the
build would just stall. This uses the NVR now to find the correct build
in the database.
2018-08-07 11:54:28 -04:00
mprahl
a78c564073
Revert "Store the component's build ID and use that to identify the build when acting on a tag message"
...
This reverts commit 9bd16beeef .
2018-08-07 10:32:50 -04:00
mprahl
9bd16beeef
Store the component's build ID and use that to identify the build when acting on a tag message
...
This resolves an issue where the component name is different than the
package being tagged due to a macro such as those used for SCLs.
2018-08-03 20:45:00 -04:00
Martin Curlej
dfe7660519
Removed PDC dependency from MBS and replaced it with MBS prod instance.
...
Signed-off-by: Martin Curlej <mcurlej@redhat.com >
Removed pdc from comments.
Signed-off-by: Martin Curlej <mcurlej@redhat.com >
Adding missing files.
Signed-off-by: Martin Curlej <mcurlej@redhat.com >
Updated PR according to review.
Signed-off-by: Martin Curlej <mcurlej@redhat.com >
Local modules builds now
Signed-off-by: Martin Curlej <mcurlej@redhat.com >
Removed copr from config
Signed-off-by: Martin Curlej <mcurlej@redhat.com >
Fixed bugs
Signed-off-by: Martin Curlej <mcurlej@redhat.com >
2018-07-04 10:13:18 +02:00
mprahl
36a9026ca8
Remove references to COPR
2018-06-28 10:00:06 -04:00
Qixiang Wan
d83e6897ca
Change ModuleBuild.context to db column
...
1. Changed ModuleBuild's context property to db column, it's
non-nullable and default value is '00000000' to keep it consistent
with previous behaviour.
2. Changed ModuleBuild.contexts_from_mmd to return a tuple of
(ref_build_context, build_context, runtime_context, context).
3. Updated tests affected by this change.
2018-04-28 11:46:31 +08:00
Qixiang Wan
8b807a9fcd
Generate koji tag from MBS and use informative name
...
koji now supports tags with max length of 256, we can use
more informative tag name instead of the hash one.
The new format of koji tag name is:
module-<name>-<stream>-<version>-<context>
However when the generated tag's length > (256 - len('build')), we
fallback to the old way of name in hash format (module-<hash>).
In this change, koji tag is always generated from MBS itself, even
with pdc resolver.
FIXES : #918 #925
2018-04-26 22:04:16 +08:00
Jan Kaluza
8d1d439737
Generate 'context' from hash based on buildrequires/requires stream. Reuse components only from module with the same stream_build_context.
2018-04-24 15:45:26 +02:00
Jan Kaluza
9b6fd2ba39
Split utils.py to multiple files based on the methods use-case.
2018-04-03 09:58:57 -04:00
Jan Kaluza
6fc8c646de
Add 'mbs-manager import_module'.
2018-04-03 09:58:57 -04:00
Jan Kaluza
e5e9a24fce
Allow adding bool to XMD. Fix flake8 issues.
2018-04-03 09:58:57 -04:00
mprahl
eb0b2e1c38
Add the database resolver plugin
2018-04-03 09:58:57 -04:00
mprahl
f19f76872c
Use the build object directly instead of its JSON in the modules handler
2018-04-03 09:58:57 -04:00
mprahl
d3f92bf5d3
Make the resolver functions less PDC specific
2018-04-03 09:58:57 -04:00
mprahl
f0852d9009
Port to libmodulemd and support v2 modulemd without module stream expansion
2018-04-03 09:58:57 -04:00
mprahl
f5530d9b16
Fix flake8 errors made by jkaluza
2018-02-09 09:12:00 -05:00
Jan Kaluza
6a5d7267fd
Save another 20s in tests.
2018-02-09 11:46:12 +01:00
mprahl
575c2b8f05
Make the poller not resume paused module builds if there was recent activity on the build
...
This fixes an issue that occurs when someone submits a module build and most of its components
get reused and the poller just so happens to try to resume the build.
2018-02-06 10:45:07 -05:00
mprahl
8f024e6b04
Remove the dependency on vcrpy in unit tests and modernize some of the test data
2018-02-05 22:17:18 -05:00
mprahl
e91d09f7ca
Change the format of the unit tests to pytest
2018-01-31 16:34:21 -05:00
Filip Valder
5b4a8f6240
New: Resolver API for pluggable resolvers
2018-01-29 15:54:19 +01:00
Ralph Bean
01c8295269
Add an incrementing prefix to the dist_hash.
...
For #823 .
2018-01-17 16:54:02 -05:00
mprahl
a67b53f5c3
Add a "context" field on component and module releases in Koji for uniqueness for when Module Stream Expansion is implemented
2018-01-16 10:36:09 -05:00
mprahl
6925187f9f
Improve the stale builds poller handler test
2017-12-11 13:27:30 -05:00
mprahl
30ef85af01
Fix "instant complete" builds and reusing all components
2017-11-27 16:20:28 -05:00
mprahl
02e11b9b39
Don't try to untag stale module builds that don't have any completed components
2017-11-20 10:38:56 -05:00
mprahl
ef5dc64f2b
Transition stale failed builds to the "garbage" state and untag their components
2017-11-17 12:07:51 -05:00
Ralph Bean
318117c0c5
Make our builders into setuptools plugins.
2017-11-13 11:16:13 -05:00
Ralph Bean
8431d2698b
Explicit imports of builders in the test suite.
2017-11-10 16:03:14 -05:00
mprahl
bb0dde9936
Only complete the module build when *all components are tagged* and a KojiRepoRegen message is received
2017-11-10 08:33:53 -05:00
mprahl
b0eada3e33
Fix KojiContentGenerator from a bug in PR 771
2017-11-10 08:33:53 -05:00
mprahl
a8421568f9
Fix Flake8 errors
2017-11-08 08:45:58 -05:00
mprahl
d8f126e978
Allow resuming from a failure during the "init" phase
...
This also shifts build failure transitions from individual functions
in utils.py to the init module handler.
2017-11-06 14:15:12 -05:00
mprahl
45cce653eb
Add the ability to specify different rebuild methods
2017-11-01 15:39:43 -04:00
Martin Curlej
60b3d97c97
flake8 cleanup
...
Signed-off-by: Martin Curlej <mcurlej@redhat.com >
removed some noqa tags
2017-10-25 12:13:59 +02:00
mprahl
f5de140521
Schedule components based on build time
2017-10-23 15:33:57 -04:00
mprahl
8e41f9f335
Try to reuse all components in the batch before starting it
2017-10-23 15:33:57 -04:00
Igor Gnatenko
1e6708b34f
MockedSCM -> FakeSCM
...
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org >
2017-10-18 17:37:13 +02:00
mprahl
62d438651a
Fix tests
2017-10-16 15:09:42 -04:00
Ralph Bean
6150000d1e
Scan for modules stuck in the wait state.
...
And fake a message to get them building again.
But only if they look to have been stuck for more than 10 minutes.
2017-09-29 14:13:58 -04:00
Jan Kaluza
ad6874b0e6
Fix #670 - Tag Content Generator Koji build to special tag based on the base module stream
2017-09-25 08:36:29 +02:00
Ralph Bean
5e08d2ffe4
Introduce pluggable backends.
...
This allows an operator to write a custom messaging backend to handle
whatever transport and format.
2017-09-19 13:13:40 -04:00