2471 Commits

Author SHA1 Message Date
Jan Kaluza
f026a4f88b Version 2.27.0. v2.27.0 2019-08-30 08:01:41 +02:00
Jan Kaluža
457b16daff Merge #1395 Reuse the latest module build found. 2019-08-30 05:48:25 +00:00
Jan Kaluza
00ad20dfcd Reuse the latest module build found.
Before this commit, the base modules used in the `get_reusable_module` have
not been sorted and therefore when `get_reusable_module` tried to find out
the reusable module built against some base module, it could find a module
built against some old version of base module.

This could lead to situation when MBS tried to reuse components from quite
old module despite the fact that newer module build existed.

This commit fixes this by sorting the base modules by stream_version,
so MBS always tries to get the reusable module built against the latest
base module.
2019-08-29 15:35:21 +02:00
Valerij Maljulin
c4a95d0673 Add a check for non-ready builds (siblings) in requires resolver
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-08-28 15:34:46 +02:00
Jan Kaluža
9d40a9b9cb Merge #1390 Fix --add-local-build with MBS Resolver. 2019-08-26 05:33:40 +00:00
mprahl
ef39068127 Reword the gating documentation
This commit fixes a few typos and adds a link to Greenwave.
2019-08-23 14:02:46 -04:00
mprahl
cf334b3261 Use a different container name when running the unit tests with Postgres
This will allow the parallel execution of tests that use SQLite and Postgres.
2019-08-23 12:06:48 -04:00
mprahl
14a9ef9974 Use the z option when mounting container volumes to allow sharing 2019-08-23 11:53:16 -04:00
Hunor Csomortáni
1ae7976a22 Adjust syntax for parallel steps in .cico-pr.pipeline
"parallel" has a different syntac in scripted pipelines than in
declarative ones, see:
https://jenkins.io/doc/book/pipeline/jenkinsfile/#parallel-execution

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-08-23 17:22:07 +02:00
Jan Kaluza
cc5aaf90c1 Fix --add-local-build with MBS Resolver.
The `MBSResolver.get_buildrequired_modulemds` did not try to load
local module builds and always just queried the remote MBS instance.

This commit fixes it by using local module if available.
2019-08-23 14:58:15 +02:00
mprahl
f3db9a0ac2 Fix a typo in an error message 2019-08-22 17:15:55 -04:00
Matt Prahl
c8c028d989 Merge #1386 Do not check Greenwave gating status for scratch builds. 2019-08-22 21:11:38 +00:00
Valerij Maljulin
4b4428a9e3 Fix locale issues with date representations
This fixes #1214
Also fixes tests running on different locales

Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-08-22 17:06:26 +02:00
Jan Kaluža
1d9d08141f Merge #1387 Describe gating in GATING.rst. 2019-08-22 12:54:39 +00:00
Jan Kaluza
5329c656c0 Describe gating in GATING.rst. 2019-08-22 14:53:48 +02:00
mprahl
a7099d8431 Make the timestamps consistent in import_mmd
This will keep tests from failing occasionally.
2019-08-21 16:21:05 -04:00
mprahl
f7654f736b Run the unit tests in parallel in the Jenkins job 2019-08-21 16:21:05 -04:00
mprahl
10d36d3a0e Pull the container images in parallel in the Jenkins job 2019-08-21 16:21:05 -04:00
Jan Kaluža
13a18d1d5a Merge #1384 Add "scratch_build_only_branches" configuration options. 2019-08-21 11:18:34 +00:00
Jan Kaluza
80fca557af Do not check Greenwave gating status for scratch builds.
Scratch builds cannot be gated. They stay in the `done` state forever.
Therefore it is useless to query Greenwave for its status in the Poller.
2019-08-21 13:17:04 +02:00
Jan Kaluza
e2395e4a69 Do not check Greenwave gating status for scratch builds.
Scratch builds cannot be gated. They stay in the `done` state forever.
Therefore it is useless to query Greenwave for its status in the Poller.
2019-08-19 08:16:46 +02:00
Chenxiong Qi
e1342d8ffc Use dict literal to create dict
Some code create a dict in this way:

some_var = {}
some_var["a"] = 100
some_var["b"] = 200

Using dict literal could make these lines a little bit simpler.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-15 21:28:27 +08:00
Chenxiong Qi
e6aa47e02a Use set literal to create a set
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-15 21:14:02 +08:00
Chenxiong Qi
dbced8668b Do not compare with a empty list
An empty list [] is evaluated as a false value. So, it is not necessary
to compare like "if some_var == []:".

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-15 17:48:33 +08:00
Jan Kaluza
796a367457 Add "scratch_build_only_branches" configuration options.
The goal here is to define certain branches from which only scratch
module builds can be submitted. The main use case is for "private-*"
branches which can be created and maintained by anyone, but there
must not be production-ready module build created from them.

This commit adds new `scratch_build_only_branches` config option
to define the list of regexes to match such branches.
2019-08-15 10:49:03 +02:00
Valerij Maljulin
a6e7741553 Fix tests failing on 1 sec time differences
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-08-14 13:52:39 +02:00
Jan Kaluza
34dc744041 Version 2.26.0 v2.26.0 2019-08-12 10:54:17 +02:00
Chenxiong Qi
6f1d0b3ad9 Return empty result if short=true is specified on empty list of builds
Fixes #1376

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-11 22:18:38 +08:00
Chenxiong Qi
ac09fb55ba Merge #1379 Start build logs from init event handler 2019-08-09 14:55:11 +00:00
Chenxiong Qi
0917d6aa4d Start build logs from init event handler
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-09 16:47:46 +08:00
Chenxiong Qi
e3b14beacc Allow to run tests in containers in parallel
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-07 21:45:07 +08:00
Valerij Maljulin
e5735efc76 Skip prefix validation for modules in allowed_privileged_module_names and base_module_names
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-08-07 14:17:39 +02:00
Matt Prahl
2690af4142 Merge #1373 Add documentation about dependency resolution 2019-08-07 12:10:34 +00:00
Jan Kaluža
f759a4ec1c Merge #1374 Remove the “All” MMDResolver policy 2019-08-07 06:29:38 +00:00
Jan Kaluža
83570f59fd Merge #1368 Ignore *.pyc for building test images and install pytest<5.0 for py2 test image 2019-08-06 11:10:25 +00:00
Jan Kaluža
758cf9c112 Merge #1365 Allow components to be reused from module builds even if the buildrequires commit hashes changed for the changed-and-after rebuild strategy 2019-08-06 11:08:46 +00:00
Chenxiong Qi
30b03c2ca6 Remove the “All” MMDResolver policy
Fixes #1339

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-06 10:52:55 +08:00
Chenxiong Qi
51c3b39a52 Install pytest<5.0 for building py2 test image
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-06 10:21:03 +08:00
Chenxiong Qi
13c7e450e5 Ignore *.pyc for building test images
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-06 10:21:03 +08:00
Chenxiong Qi
b185b51721 Merge #1375 Fix name s2nsvc in MMDResolver.solve 2019-08-06 01:50:17 +00:00
Chenxiong Qi
b5df1457c4 Merge #1363 Rewrite import_mmd 2019-08-06 01:48:42 +00:00
mprahl
a6bf9f88dd Allow components to be reused from module builds even if the buildrequires commit hashes changed for the changed-and-after rebuild strategy
This behavior was not documented, and it was confusing to users since module builds
in a stream should always have a compatible API.
2019-08-05 09:23:44 -04:00
Jan Kaluža
602e93589a Merge #1367 Fix the database migrations 2019-08-05 08:53:44 +00:00
Chenxiong Qi
9c6c4da80f Rewrite import_mmd
* xmd/mbs is always set if it is not present in xmd, so move the code on
  the top of function. This change is also helpful for accessing keys
  under xmd/mbs.
* By setting xmd/mbs in the beginning, code is simplified to get
  disttag_marking and virtual_streams. The result is much straightforwar
  for getting a default value for them.
* Move disttag_marking validation code next to the line getting
  disttag_marking from xmd/mbs. As a result, the code structure is
  easier to read as getting disttag_marking and validate it, getting
  virtual_streams and validate.
* Rewrite the part of code for check_buildrequires. Always set
  xmd/mbs/buildrequires if it is not present and check_buildrequires is
  set to True, as it is required by
  ModuleBuild.get_buildrequired_base_modules.
* Using in operator instead of dict.get to check if key koji_tag exists.
  Using dict.get would be ambiguous because even if koji_tag exists
  under xmd/mbs, but due to its value is set to None occasionally, there
  is still a message logged to tell koji_tag is not set.
* Rwrite all lines of code for updating virtual streams. A new method
  update_virtual_streams is added to ModuleBuild. This also fixes
  FACTORY-4561.
* Tests are added for the rewrite of virtual streams update.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-05 16:10:57 +08:00
Chenxiong Qi
3b95b09408 Fix name s2nsvc in MMDResolver.solve
The original name s2nsvc does not contain the name of arch.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-05 16:09:29 +08:00
Jan Kaluža
bc18a592ff Merge #1370 Increase the timeout when running the unit tests in Jenkins 2019-08-05 07:55:46 +00:00
mprahl
530136a522 Add documentation about dependency resolution
This was written with the help of Jan Kaluža.

Co-authored-by: Jan Kaluža <jkaluza@redhat.com>
2019-08-02 15:49:47 -04:00
Matt Prahl
49465fc761 Merge #1372 Allow to run specific test in py3 test container 2019-08-02 16:39:23 +00:00
Chenxiong Qi
df66d4f1b2 Allow to run specific test in py3 test container
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-08-02 23:40:18 +08:00
mprahl
671f78965b Increase the timeout when running the unit tests in Jenkins 2019-08-02 11:07:19 -04:00