Commit Graph

39 Commits

Author SHA1 Message Date
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
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
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
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
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
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
8431d2698b Explicit imports of builders in the test suite. 2017-11-10 16:03:14 -05:00
mprahl
b0eada3e33 Fix KojiContentGenerator from a bug in PR 771 2017-11-10 08:33:53 -05: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
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
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
dfdd924bbf Always regen repository when starting module build to not wait on kojira. 2017-08-18 09:39:07 +02: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
Filip Valder
7ef2975984 PEP8 fixes 2017-07-17 18:29:10 +02:00
Stanislav Ochotnicky
40074b088e Fix test for logging change
Change of configuration to enable logging by default caused the test to
fail because mocked object had no id. This change fixes the test and
sets up cleanup for logs
2017-07-04 08:51:53 +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
Jakub Kadlčík
469cbc8846 Fix failing test after separating builders
Thanks to @jkaluza for this patch
2017-04-07 08:22:59 +02:00
Jakub Kadlčík
6a3de70e8f Use the real testing config not mock 2017-04-07 08:22:59 +02:00
Jan Kaluza
298bf63120 Fix #409 - Remove koji_tag_inherit_from and whitelist all the components we are going to build instead. 2017-03-14 11:28:47 +01:00
Filip Valder
6b343896dd s/rida/mbs/ 2017-02-28 17:59:02 +01:00
Matt Prahl
8577d5f307 Fix and cleanup tests 2017-02-21 14:22:30 -05:00
Jan Kaluza
4acc1d69aa Use vcrpy for tests to simulate PDC responses. 2017-01-12 11:52:49 +01:00
Matt Prahl
62654f871f Fixes bug where the build tag was not returned 2016-11-16 15:24:16 -05:00
Jan Kaluza
966a73251a Add support for modulemd-1.0 backward-incompatible changes like commit being replaced by ref 2016-11-14 15:32:51 +01:00
Jan Kaluza
42138810d5 Fix KojiModuleBuilder.build return values in tests 2016-11-01 12:05:08 +01:00
Matt Prahl
b4082dc551 Rename module from rida to module_build_service
Rename routes from /rida/1/module-builds/ to /module-build-service/1/module-builds/
2016-10-24 10:30:23 -04:00
Matt Prahl
23f057b750 Use abstract message classes instead of legacy code 2016-09-21 14:58:10 +02:00
Matt Prahl
7a928c3e8c Adds database migration support, converts rida.conf to config.py, adds Vagrant support, seperates out app views to views.py, control of the app now manage.py 2016-08-01 13:22:01 -04:00
Ralph Bean
0b0021b5ea Merge branch 'master' into ridad
Also, fix tests.
2016-07-27 13:34:32 -04:00
Ralph Bean
8b3ed86fa8 Change the names of these classmethods to be a little more generic. 2016-07-20 15:50:48 -04:00
Ralph Bean
af86b0a4fc Some test coverage for the repo done code. 2016-07-16 00:15:58 -04:00