Commit Graph

2627 Commits

Author SHA1 Message Date
Luiz Carvalho
9204941d82 Increase get_module_build_arches test coverage
Signed-off-by: Luiz Carvalho <lucarval@redhat.com>
2019-11-22 10:17:24 -05:00
Hunor Csomortáni
0f0e809467 Tests: allow running integration tests in parallel
This is done in order to speed up test execution.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-11-20 16:47:12 +01:00
Hunor Csomortáni
b41b6b9cc1 Tests: allow reusing an existing module build
Module builds take a long time to run, which can be a pain to wait for
during integration test development.

Instead of requiring developers to locally tweak the test code to be
able to reuse module builds, allow specifying the build ID of the module
build to be reused in test.env.yaml .

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-11-20 14:27:33 +01:00
Mike McLean
3435b7d1a6 Release 2.30.4 v2.30.4 2019-11-19 16:07:49 -05:00
Hunor Csomortáni
b05ae2fe9a Merge #1499 Integration test for failed build 2019-11-19 16:30:54 +00:00
Mariana Ulaieva
6095ecc5fd Integration test for failed build
Implement the integration test for the failed build scenario.
2019-11-19 13:04:02 +01:00
Chenxiong Qi
87f4f3e546 Use distro.linux_distribution instead
platform.linux_distribution is removed since Python 3.8.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-11-18 10:41:41 +08:00
Chenxiong Qi
2101f38e63 Run tests in in-memory SQLite db
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-11-14 15:20:21 +08:00
Jan Kaluža
5979f7cd97 Merge #1510 Remove removed db_session fixture from tests 2019-11-14 06:55:01 +00:00
Chenxiong Qi
d962834614 Remove removed db_session fixture from tests
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-11-14 10:52:57 +08:00
Mike McLean
5dc089e83c option to use Podman instead of Docker when running unit tests 2019-11-13 15:25:16 -05:00
Matt Prahl
52fe1e308e Merge #1496 Upgrade Vagrant to use Fedora 31 2019-11-13 15:03:55 +00:00
Mike McLean
11df325e5c Merge #1475 allow reuse of added components in some cases 2019-11-13 13:25:58 +00:00
Jan Kaluža
8dc3eed766 Merge #1504 Correct function name spelling 2019-11-13 07:51:28 +00:00
Chenxiong Qi
fb0cd95427 Fix call of at_concurrent_component_threshold in producer
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-11-13 11:28:35 +08:00
Merlin Mathesius
8807389222 Correct function name spelling
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2019-11-12 12:12:39 -06:00
Mike McLean
f5692d0f3a Adjust unnecessarily strict reuse check
Fixes https://pagure.io/fm-orchestrator/issue/1298
2019-11-11 18:07:13 -05:00
mprahl
b7571c6ba0 Release v2.30.3 v2.30.3 2019-11-11 11:14:52 -05:00
Matt Prahl
ba4f45a7f3 Merge #1503 Configure the MBS backend code to use the correct SQLite database during local builds 2019-11-11 16:13:22 +00:00
mprahl
fc7ecb145f Configure the MBS backend code to use the correct SQLite database during local builds 2019-11-11 11:12:45 -05:00
Hunor Csomortáni
6bdbf4b044 Merge #1498 Add integration test to check scratch module builds 2019-11-11 15:54:17 +00:00
mprahl
9c085a4d79 Release v2.30.2 v2.30.2 2019-11-08 08:34:29 -05:00
mprahl
1160d47e7a Stop adding repo entries for empty tags for local builds
DNF fails on Fedora 31 when there is a repo entry to an empty directory.
2019-11-07 11:18:50 -05:00
mprahl
be641dee57 Set skip_if_unavailable=True on localrepo to avoid module-build-macros failures for local builds
When module-build-macros is built, the localrepo hasn't been generated yet.
This has caused errors on Fedora 31.
2019-11-07 11:18:38 -05:00
Hunor Csomortáni
f5bf0d7252 Add integration test to check scratch module builds
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-11-07 14:30:53 +01:00
Hunor Csomortáni
8c0521cde3 Lint the integration tests with Python 3
The integration tests under 'tests/integration' are Python 3 only.
Flake8 will fail on Python 3 syntax when running under Python 2, but for
now we wouldn't like to change this, in order to keep Python 2
compatibility of the code base.

To work around the above, set up a separate tox environment to lint the
integration tests, and exclude linting the integration tests when the
rest of the code is checked.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-11-07 14:30:49 +01:00
Chenxiong Qi
f24cd4222f Make db_session singleton
Please note that this patch does not change the use of database session
in MBS. So, in the frontend, the database session is still managed by
Flask-SQLAlchemy, that is the db.session. And the backend, running event
handlers, has its own database session created from SQLAclehmy session
API directly.

This patch aims to reduce the number of scoped_session created when call
original function make_db_session. For technical detailed information,
please refer to SQLAlchemy documentation Contextual/Thread-local
Sessions.

As a result, a global scoped_session is accessible from the
code running inside backend, both the event handlers and functions
called from handlers. The library code shared by frontend and backend,
like resolvers, has no change.

Similarly, db.session is only used to recreate database for every test.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-11-07 11:06:40 +08:00
mprahl
ea890bc706 Whitelist the pytest binary that's actually used in tox.ini 2019-11-06 17:47:37 -05:00
mprahl
1dcb9fc753 Upgrade Vagrant to use Fedora 31 2019-11-06 17:43:16 -05:00
mprahl
090f4bb7dc Release v2.30.1 v2.30.1 2019-11-06 09:27:37 -05:00
mprahl
eebefd0689 Set module_hotfixes on repos created for local builds to allow using modular packages in non-modular repos
This fixes an issue that causes module-build-macros to fail during a local
build when a module buildrequires a non-base module.
2019-11-06 09:13:32 -05:00
Chenxiong Qi
28f089bf3d Merge #1491 Remove unused _dummy_context_mgr 2019-11-06 02:17:53 +00:00
Chenxiong Qi
4b5679b37c Merge #1492 Remove unused Kerberos configuration options 2019-11-06 02:15:58 +00:00
mprahl
efb690a482 Release v2.30.0 v2.30.0 2019-11-05 15:15:04 -05:00
mprahl
8dc20c1731 Remove unused Kerberos configuration options
This is some leftover code that was missed in 9fd3731ff7.
2019-11-05 15:08:27 -05:00
Matt Prahl
e2155b58db Merge #1489 Mention layered product modules in KojiResolver. 2019-11-05 14:10:09 +00:00
mprahl
3b85cecf6a Remove unused _dummy_context_mgr 2019-11-05 08:48:40 -05:00
Jan Kaluza
566164ecb1 Mention layered product modules in KojiResolver. 2019-11-05 08:59:51 +01:00
Jan Kaluža
84398834e4 Merge #1481 Search for default modules built also against compatible base modules. 2019-11-05 07:41:42 +00:00
Jan Kaluza
96ca7fd00b Search for default modules built also against compatible base modules. 2019-11-05 07:03:40 +01:00
Matt Prahl
4eee019791 Merge #1486 update container base images to Fedora 31 2019-11-04 20:27:39 +00:00
Mike Bonnet
e582126106 use the C locale for generating the date string for the specfile changelog
This produces exactly the same output as the en_US locale, and is guaranteed to be supported
in all environments.
2019-11-01 16:50:56 -07:00
Mike Bonnet
86c85825ee update container base images to Fedora 31
Also update the uid management in the frontend image to be more consistent with
best practices, as demonstrated by:

https://github.com/RHsyseng/container-rhel-examples/tree/master/starter-arbitrary-uid

This allows the dependency on nss_wrapper to be dropped.
2019-11-01 12:04:36 -07:00
mprahl
f95b665904 Use RuntimeError instead of ValueError when the retrieval of default modules fails
This will result in the error actually being in the state reason
of the failed module build instead of "An unknown error occurred
while validating the modulemd".
2019-11-01 14:49:10 -04:00
Chenxiong Qi
1c645f5a04 Fix log.exception
log.exception() without a message will fail and module build cannot move
to failed state.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-11-01 21:33:08 +08:00
mprahl
ef0ab348bc Remove commented out code in test_utils.py 2019-10-30 15:29:45 -04:00
Mike Bonnet
f6baf5a427 convert tests to Kerberos auth 2019-10-29 19:37:31 -07:00
Mike Bonnet
6cdf460647 configure MBS to use Kerberos for authentication
This change deploys a KDC using the c3i-library (https://pagure.io/c3i-library) and configures MBS
to require Kerberos authentication for submitting builds to the frontend.
2019-10-29 19:37:31 -07:00
Chenxiong Qi
1ab259ba77 Fix state for determining if continue building components in current batch
The original code before changing to is_unbuilt is to check if any
component builds in current batch has state None. This patch fixes that.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-10-30 09:26:07 +08:00
Chenxiong Qi
cab9cb8ee3 Merge #1479 Minor fixes to consume and process_message 2019-10-30 01:24:38 +00:00