Commit Graph

148 Commits

Author SHA1 Message Date
Filip Valder
3cb41aa5dc Changes in MBS restful API:
- Refactor MBS API code
- Unify module-/component_build API philosophy/design/approach
- Naming fixes
- _utc_datetime_to_iso moved from ModuleBuildAPI and is now a module-level function.
- Existing v1 API remains unchanged. ComponentBuildAPI now supports individual component build listing + verbose mode.
- documented in README
- various component_build API tests added
2017-09-11 14:48:22 +02:00
Jan Kaluza
83628ec74f Add 'requires' of 'build-required' modules to buildroot when building module. 2017-09-08 09:25:44 +02:00
Jan Kaluza
dfdd924bbf Always regen repository when starting module build to not wait on kojira. 2017-08-18 09:39:07 +02:00
Jan Kaluza
aac4227eb8 Add 'mbs-build local [[--add-local-build n:s:v], ...]' to use local builds as dependency. 2017-08-17 10:00:19 +02:00
Filip Valder
41f5472021 Merge #631 Do not rebuild the -build tag repository for last batch. 2017-08-09 00:40:05 +00:00
Jan Kaluza
4bbb0cc416 Create module-build-macros component just once - do not duplicate it for each resubmition of a module. 2017-08-08 06:52:28 +02:00
Jan Kaluza
15523ac90e Fix the bug when module build stuck in the 'build' state even with failed component builds. 2017-08-07 15:47:06 +02:00
Jan Kaluza
27d249fe17 Do not rebuild the -build tag repository for last batch. 2017-08-07 15:46:38 +02:00
Filip Valder
7ef2975984 PEP8 fixes 2017-07-17 18:29:10 +02:00
Jan Kaluza
439767cbcf Tag the component to final tag in case it is built, but not tagged. 2017-07-13 13:37:10 -04:00
Ralph Bean
a755104bd4 Fix the test suite.
We had some circular imports that caused the tests (and more?) to fail.

I ran into this when looking at the tests for #583 and #595.
2017-07-06 21:02:32 -04:00
Jan Kaluza
93092a43be Add per-module-build logging feature 2017-06-30 16:30:47 +02:00
Jan Kaluza
a07b44411c Set the state_reason when format_mmd raises in frontend and do not overwrite the state_reason in backend. 2017-06-06 14:49:49 +02:00
Stanislav Ochotnicky
b33beb0cef Enable koji content generator code
If the koji_enable_content_generator is configured to True koji instance
has to be configured as follows:
koji call addBType module
koji grant-cg-access <mbs-user> module-build-service --new

Without the above configuration MBS will start failing the builds
2017-05-31 14:48:34 +02:00
Jan Kaluza
f27b0ddb81 Regenerate the repo when module-build-macros is reused to ensure it is in the buildroot. 2017-05-24 14:26:08 +02:00
Jan Kaluža
7d024e17c3 Merge #564 Fix fedmsg issue on Copr 2017-05-22 19:43:26 +00:00
Jakub Kadlčík
4992d97937 Remove leftovers from incomplete copr fedmsg implementation 2017-05-22 18:07:54 +02:00
Jan Kaluza
a819f51549 Change module build state to 'build' even if we reuse all the components, so we handle the buildsys.tag message. 2017-05-22 13:54:08 +02:00
Jan Kaluža
4593ee5d95 Merge #526 Do not tag built components if there is any failed one. 2017-05-17 09:48:05 +00:00
Jan Kaluza
7d7a45f997 Do not tag built components if there is any failed one. 2017-05-12 10:39:48 +02:00
Jan Kaluza
22758419c0 Delete build target after config.koji_target_delete_time seconds. 2017-05-11 14:43:05 +02:00
Jan Kaluza
024877592c Do not build module-build-macros when all the components will be reused from previous module build. 2017-05-02 12:09:23 +02:00
Matt Prahl
dd72504395 Merge #509 Pass the whole ModuleBuild object to the builder 2017-04-13 15:54:18 +00:00
Jakub Kadlčík
b78b0346d2 Pass the module build into builder 2017-04-12 23:53:55 +02:00
Jan Kaluza
9a193c36af Do not start new batch in poller when new_repo is running 2017-04-11 19:51:55 +02:00
Matt Prahl
e3cd821f53 Merge #499 Log message ids every time we try to handle them. 2017-04-10 15:01:45 +00:00
Jan Kaluža
32b363d1a9 Merge #501 Stop using .strip('-build') 2017-04-07 13:37:56 +00:00
Jan Kaluža
a4de06bc40 Merge #493 Start newRepo only when all the COMPLETE components have been tagged and there are no unbuilt components in a batch 2017-04-07 13:25:13 +00:00
mprahl
e7cbce51db Stop using .strip('-build') 2017-04-07 09:20:19 -04:00
Ralph Bean
c432187f92 Log message ids every time we try to handle them. 2017-04-07 08:28:28 -04:00
Jan Kaluza
cdf06ad999 Start newRepo only when all the COMPLETE components have been tagged and there are no unbuilt components in a batch 2017-04-07 11:34:16 +02:00
Jakub Kadlčík
469cbc8846 Fix failing test after separating builders
Thanks to @jkaluza for this patch
2017-04-07 08:22:59 +02:00
Jan Kaluza
11d9fa7148 Do not raise exception in poller, but log it instead. 2017-04-07 07:22:22 +02:00
Jan Kaluža
6307e5a692 Merge #484 Trigger newRepo manually when all components are tagged to buildroot 2017-04-06 15:40:30 +00:00
Jan Kaluza
8bbe2d359f Trigger newRepo by MBS instead of waiting on Kojira in case when we have sucessfully tagged all the components 2017-04-06 17:19:35 +02:00
Jan Kaluza
061d346d7c Revert "Trigger newRepo manually when Kojira does not manage to build it in 20 minutes."
This reverts commit 2fcd66ad53.
2017-04-05 12:41:29 +02:00
Jan Kaluza
7e5743248e Use Koji multicall when tagging builds. Do not query Koji to get the status of builds which we are reusing from previous module build. 2017-04-05 10:25:45 +02:00
Jan Kaluza
2fcd66ad53 Trigger newRepo manually when Kojira does not manage to build it in 20 minutes. 2017-04-05 10:18:31 +02:00
Jan Kaluža
1df6f8e8ad Merge #470 Try to get the deps from PDC again on ConnectionError exception. 2017-04-03 05:59:25 +00:00
Jan Kaluza
4c5732957c include %module_name, %module_stream and %module_version in the module-build-macros and fix sending active=True in pdc.py 2017-03-31 15:18:53 +02:00
Jan Kaluza
3a25671165 Try to get the deps from PDC again on ConnectionError exception. 2017-03-31 09:06:47 +02:00
Jan Kaluža
f7c8478d9c Merge #448 Copr builder improvements #2 2017-03-29 12:09:43 +00:00
Jakub Kadlčík
70b3782231 Fake repo.done message without publishing it 2017-03-28 19:13:38 +02:00
Jan Kaluza
597973da98 For mock backend, build all the components in batch in single continue_batch_build call. 2017-03-28 15:44:01 +02:00
Matt Prahl
2561930833 Merge #457 Create the builder in components.py handler only when we really need it. 2017-03-23 16:11:18 +00:00
Jan Kaluza
b1217921aa Create the build in components.py handler only when we really need it. 2017-03-23 15:28:24 +01:00
Jan Kaluza
296d69b609 Handle all exceptions in the consumer handlers. 2017-03-23 14:59:38 +01:00
Jan Kaluza
4a6d961d66 Handle situation when all component builds in a batch fail 2017-03-23 14:25:20 +01:00
Jan Kaluza
b4d87c4e25 Retry communication with PDC on RuntimeError exception and increase the timeout to 120 seconds 2017-03-23 12:56:12 +01:00
Ralph Bean
aabd28b148 Fix UnboundLocalError.
I have hotfixed this in production on mbs-backend01::

    Traceback (most recent call last):
      File "module_build_service/scheduler/consumer.py", line 134, in consume
        self.process_message(session, msg)
      File "module_build_service/scheduler/consumer.py", line 224, in process_message
        for event in further_work:
    UnboundLocalError: local variable 'further_work' referenced before assignment
2017-03-22 13:10:34 -04:00