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
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
mprahl
19db295795
Fix flake8 errors
2018-04-03 09:58:57 -04: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
e5e9a24fce
Allow adding bool to XMD. Fix flake8 issues.
2018-04-03 09:58:57 -04:00
Jan Kaluza
2482e47c07
Fix issues from review. Drop xmd['mbs']['requires']. Do not allow building MSE builds against non-MSE builds.
2018-04-03 09:58:57 -04:00
Jan Kaluza
31ddbe51a5
Add generate_expanded_mmds which returns list of MMDs which can be submitted as MSE builds and submit them.
2018-04-03 09:58:57 -04:00
mprahl
eb0b2e1c38
Add the database resolver plugin
2018-04-03 09:58:57 -04:00
mprahl
28e821fee0
Start querying modules by context when it's available
...
When implementing module stream expansion, we'll need to make sure
the buildrequires are queried using their context as well.
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
Yash Nanavati
ed25afd9ec
Code changes for Python 3 support
2018-03-04 03:22:38 -05:00
mprahl
654820ac31
Fix error that occurs when a batch hasn't started but a repo regen message is received
...
Fixes #864
2018-02-19 13:56:46 -05:00
Jan Kaluza
6a5d7267fd
Save another 20s in tests.
2018-02-09 11:46:12 +01:00
Jan Kaluza
4001d3c488
Use in-memory SQLite database in tests to make them 40% faster.
2018-02-08 08:01:24 +01: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
ea650047a1
Use a random build_id instead of an incrementing one in FakeModuleBuilder
...
I ran into issues on CentOS CI where fake Koji build messages were getting
one ID but the task_id for the component in the database was getting
another. Making the build_id random and not tied to the class seems to
resolve that issue.
2018-02-05 22:16:53 -05:00
mprahl
0fd29b33c3
Removed unneeded timed decorators on test_build tests
2018-02-05 22:11:31 -05:00
mprahl
6b3cc64711
Use a FileStorage object instead of a tuple when testing direct modulemd submissions
...
It seems that there is a bug with the Flask test client when submitting a tuple of
file path and content, that incorrectly sets the filename to be the first line of
the file contents instead of the actual filename. We should eventually investigate
this and report a bug or provide a patch.
2018-02-05 11:44:55 -05:00
mprahl
e91d09f7ca
Change the format of the unit tests to pytest
2018-01-31 16:34:21 -05:00
Ralph Bean
01c8295269
Add an incrementing prefix to the dist_hash.
...
For #823 .
2018-01-17 16:54:02 -05:00
mprahl
430ac4ba31
Use the "build_context" field when evaluating if a previous module's buildrequires changed
2018-01-16 10:36:09 -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
d13699fce3
Fix some logic errors in FakeModuleBuilder
2017-12-08 16:08:29 -05:00
mprahl
12d036089e
Fix test_submit_build_resume_init_fail
2017-12-08 16:04:40 -05:00
mprahl
aa4ca009ef
Fix situations where module-build-macros builds in Koji but fails in MBS and the build is resumed
2017-12-08 15:50:55 -05:00
mprahl
5e9d846872
Fix double tagging on module builds that have all their components reused
2017-11-28 09:50:35 -05:00
mprahl
30ef85af01
Fix "instant complete" builds and reusing all components
2017-11-27 16:20:28 -05:00
mprahl
fa6f43e748
Fail module builds directly when a component build in a batch fails
2017-11-17 10:44:15 -05:00
Matt Prahl
ea26e0281a
Merge #788 Fix bug and clean up scm.get_latest
2017-11-14 13:38:23 +00:00
mprahl
1622494b17
Replace the name of the "branch" parameter in "scm.get_latest" to "ref"
2017-11-13 09:20:20 -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
3ccbb3dd57
Fix duplicate state traces
2017-11-08 10:18:47 -05:00
mprahl
a8421568f9
Fix Flake8 errors
2017-11-08 08:45:58 -05:00
mprahl
b578f802a6
Reenable skipped test
2017-11-07 14:57:27 -05:00
mprahl
d7c49caca8
Skip a test that hangs when run on CentOS CI over SSH
2017-11-07 13:20:38 -05:00
mprahl
11e39ab0c3
Fix multiple transitions to the failed state
2017-11-06 16:46:57 -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
58d160cce4
Transition a failed module to wait instead of init upon resuming
2017-11-03 15:12:39 -04:00
Ralph Bean
9b006e1ba5
The Case of the Mysterious Dist Tag
...
We ran into a crazy bug in stg today where the `disttag` of every
component build .. for every module .. was the same! (duh duh duh).
Turns out this had to do with the way we were writing the name, stream,
and version values back into the yaml file we recorded. More correctly,
how we *weren't* writing those values back.
2017-11-02 13:36:18 -04:00
mprahl
6cf24baebb
Don't allow a user to resubmit a module build that is already in the init state
2017-11-01 10:10:10 -04:00
mprahl
c7e6fff1d8
Handle module builds without components
2017-10-31 14:47:26 -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
Igor Gnatenko
1e6708b34f
MockedSCM -> FakeSCM
...
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org >
2017-10-18 17:37:13 +02:00
Matt Prahl
4eaec38ee4
Merge #743 Avoid test collection warning from pytest
2017-10-18 15:28:18 +00:00
Nick Coghlan
5d0287b06f
Avoid test collection warning from pytest
...
pytest thinks `TestModuleBuilder` looks like a test
class name, so it complains about the presence of
an `__init__` method.
Changing the name of the helper class avoids the
warning.
2017-10-18 19:25:15 +10:00
mprahl
62d438651a
Fix tests
2017-10-16 15:09:42 -04:00
Jan Kaluza
ac92a389d6
Fix module dist_tag separator in tests
2017-08-31 10:46:42 -04: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
09b3f32dbb
Fix #619 : Support for module YAML file validation within a SCM repository
2017-08-07 13:10:53 +02:00