Commit Graph

2943 Commits

Author SHA1 Message Date
Owen W. Taylor
a96774a1fd Go back to using a file-backed SQLite database for tests
Using a memory database causes tests/test_build to intermittently
fail, because using the same pysqlite3 connection object from multiple
threads - as was done so that the threads shared the same memory database
- is not, in the end, thread safe. One thread will stomp on the transaction
state of other threads, resulting in errors from starting a new transaction
when another is already in progress, or trying to commit a transaction
that is not in progress.

To avoid a significant speed penalty, the session-scope fixture sets up
a database in the pytest temporary directory, which will typically be on
tmpfs. Time to complete all tests:

 memory backend:               38 seconds
 file on tmpfs:                40 seconds
 file on nvme ssd with btrfs: 137 seconds

MBSSQLAlchemy, which attempted to make the memory backend work, is removed.

Session hooks are installed on the Session class rather than on the
scoped_session instance - this works better when we're changing from
one database to another at test setup time.
2022-04-26 16:59:59 -04:00
Brendan Reilly
3a633967ec Merge #1737 Remove Greenwave Code 2022-04-14 19:50:11 +00:00
Brendan Reilly
4a30847bea Remove Greenwave Code
No implementations of MBS are using Greenwave, and there are no current plans
to do so. Koji Resolver will be sufficient for any usecase dependent on gating.
2022-03-30 14:27:34 -04:00
Mike McLean
24e1efd394 PR#1733: Replace dashes with underscore in stream name integration test
Merges #1733
https://pagure.io/fm-orchestrator/pull-request/1733
2021-10-29 16:04:08 -04:00
Brendan Reilly
e7016b25ae Replace dashes with underscore in stream name integration test 2021-10-29 11:40:35 -04:00
Mike McLean
3f876ae5c7 PR#1732: clarify id in readme
Merges #1732
https://pagure.io/fm-orchestrator/pull-request/1732
2021-10-26 14:56:35 -04:00
Mike McLean
033acf9b38 clarify id in readme
Fixes https://pagure.io/fm-orchestrator/issue/1723
2021-10-20 13:27:49 -04:00
Mike McLean
6718bd72c5 PR#1729: don't filter runtime deps for packagerV3 case
Merges #1729
https://pagure.io/fm-orchestrator/pull-request/1729
2021-08-30 11:59:16 -04:00
Mike McLean
2f324d2ba1 fix unit test 2021-08-26 17:07:23 -04:00
Mike McLean
85e5b9c738 don't filter runtime deps for packagerV3 case
Fixes: https://pagure.io/fm-orchestrator/issue/1714
2021-08-26 15:54:10 -04:00
Mike McLean
d5d150da58 PR#1719: Clarify common 500 errors
Merges #1719
https://pagure.io/fm-orchestrator/pull-request/1719
2021-08-23 12:08:36 -04:00
Brendan Reilly
2cb057daf6 update 2021-08-12 15:53:53 -04:00
Brendan Reilly
39add4382c Clarify common 500 errors 2021-08-12 15:48:37 -04:00
Mike McLean
889a20990f PR#1726: Update handler name used by SQLAlchemy
Merges #1726
https://pagure.io/fm-orchestrator/pull-request/1726
2021-08-12 12:52:24 -04:00
Brendan Reilly
1883fa8567 Update handler name used by SQLAlchemy 2021-08-12 11:50:46 -04:00
Mike McLean
d115c86ec6 PR#1724: Improve error messaging for module submission.
Merges #1724
https://pagure.io/fm-orchestrator/pull-request/1724

Fixes: #1098
https://pagure.io/fm-orchestrator/issue/1098
[RFE] Improve the error messages when a user submits a module
2021-07-29 16:34:08 -04:00
Joe Talbott
06d31786e8 Improve error messaging for module submission.
Fixes: https://pagure.io/fm-orchestrator/issue/1098
2021-07-29 16:34:03 -04:00
Mike McLean
e44d203287 PR#1721: Remove conf/cacert.pem
Merges #1721
https://pagure.io/fm-orchestrator/pull-request/1721

Fixes: #1631
https://pagure.io/fm-orchestrator/issue/1631
delete conf/cacert.pem
2021-07-29 16:29:28 -04:00
Joe Talbott
10e1a9afd0 Remove conf/cacert.pem
Fixes: https://pagure.io/fm-orchestrator/issue/1631
2021-07-29 16:29:23 -04:00
Mike McLean
b0de17f7e8 PR#1720: Remove conf/__init__.py
Merges #1720
https://pagure.io/fm-orchestrator/pull-request/1720

Fixes: #1630
https://pagure.io/fm-orchestrator/issue/1630
delete conf/__init__.py
2021-07-29 16:26:30 -04:00
Joe Talbott
531bdb519b Remove conf/__init__.py
Fixes: https://pagure.io/fm-orchestrator/issue/1630
2021-07-29 16:26:24 -04:00
Mike McLean
ff32aaef47 PR#1717: Fail if requested side tag is not available for any base modules.
Merges #1717
https://pagure.io/fm-orchestrator/pull-request/1717
2021-07-29 16:21:59 -04:00
Joe Talbott
933c4fd8dd Update error message. 2021-07-29 16:21:55 -04:00
Joe Talbott
6b42102cc6 Fail if requested side tag is not available for any base modules. 2021-07-29 16:21:55 -04:00
Mike McLean
e5d0b39664 PR#1708: Exclude specific platform streams from stream expansion
Merges #1708
https://pagure.io/fm-orchestrator/pull-request/1708

Fixes: #1639
https://pagure.io/fm-orchestrator/issue/1639
[RFE] Exclude certain platform stream(s) from [ ] expansion
2021-07-29 15:15:08 -04:00
Brendan Reilly
669318f1fd Exclude specific platform streams from stream expansion
Fixes: #1639
2021-07-29 15:15:03 -04:00
Mike McLean
14ce0c41c6 PR#1725: Allow overriding RPM components refs while submitting the module build.
Merges #1725
https://pagure.io/fm-orchestrator/pull-request/1725
2021-07-28 10:07:41 -04:00
Jan Kaluza
bfd9a13205 Allow overriding RPM components refs while submitting the module build.
There is a need to rebuild the module builds done in CentOS 9 Stream
internally in MBS to include them in RHEL. This is currenly a hard task,
because the RPM components included in a module are usually
taken from HEAD of the branch defined by their `ref` value.

For the rebuild task, it means we would have to ensure that the HEAD
of all RPM components points to right commit hash right before we start
rebuilding CentOS 9 Stream module in internal MBS. This is very hard
and fragile thing to do, especially if there are two different modules
using the RPM component from the same branch. This is prone to race
condition and makes the rebuilds quite complex and in some cases
not possible to do without force pushes to RPM component repositories
which is not acceptable by internal dist-git policy.

This commit fixes it by allowing overriding the commit hash while
submitting the module build. This helps in the mentioned situation,
because we can keep internal RPM components branches in 1:1 sync with
CentOS 9 Stream branches and HEAD can always point to the same commit
in both internal and CentOS 9 Stream repositories.

When the module rebuild is submitted in internal MBS,
we can use this new feature to override the `ref` for each RPM component
so it points to particular commit and the requirement for HEAD to point
to this commit is no longer there.

The `ref` is overriden only internally in MBS (but it is recorded in logs
and in XMD section), so the input modulemd file is not altered. This is
the same logic as used for other overrides (`buildrequire_overrides` or
`side_tag`).

This does not bring any security problem, because it is already possible
to use commit hash in `ref`, so the package maintainer can already change
the commit hash to any particular commit by using this `ref` value.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2021-07-28 08:48:12 +02:00
Mike McLean
31412a464f PR#1718: also nudge reused components after 10 minutes
Merges #1718
https://pagure.io/fm-orchestrator/pull-request/1718

Fixes: #1621
https://pagure.io/fm-orchestrator/issue/1621
unable to recover from failed tag operation
2021-07-19 14:23:51 -04:00
Mike McLean
a1494e66aa also nudge reused components after 10 minutes 2021-07-07 18:22:24 -04:00
Mike McLean
d944666fe1 PR#1715: List missing streams in exception message.
Merges #1715
https://pagure.io/fm-orchestrator/pull-request/1715

Fixes: #1574
https://pagure.io/fm-orchestrator/issue/1574
Error message improvement
2021-06-25 15:49:12 -04:00
Joe Talbott
1957d7db86 resolve: Fix docstring. 2021-06-25 15:49:09 -04:00
Joe Talbott
f1a3025a9a resolve: Update docstring with added return field. 2021-06-25 15:49:09 -04:00
Joe Talbott
b3203caf76 List missing streams in exception message.
Fixes: https://pagure.io/fm-orchestrator/issue/1574
2021-06-25 15:49:09 -04:00
Mike McLean
d1f2b85dea PR#1709: Fixed scratch build suffix bug
Merges #1709
https://pagure.io/fm-orchestrator/pull-request/1709
2021-06-16 12:06:19 -04:00
Martin Curlej
71a44bdfb6 Fixed scratch build suffix bug
When building a scratch build of a module with static context
the scratch suffix was added twice.

Signed-off-by: Martin Curlej <mcurlej@redhat.com>
2021-06-16 12:06:14 -04:00
Mike McLean
5cdb2127fe PR#1711: Enforce sane module state transitions
Merges #1711
https://pagure.io/fm-orchestrator/pull-request/1711
2021-06-15 15:05:10 -04:00
Mike McLean
af97a23bca additional unit tests for strict_module_state_transitions 2021-06-15 15:05:06 -04:00
Mike McLean
fcd662468f fix unit tests 2021-06-15 15:05:06 -04:00
Mike McLean
7b56c6429e strict_module_state_transitions config option
Fixes: https://pagure.io/fm-orchestrator/issue/1678
2021-06-15 15:05:06 -04:00
Mike McLean
7522cc1fb2 PR#1710: Fix docs rendering
Merges #1710
https://pagure.io/fm-orchestrator/pull-request/1710

Fixes: #1669
https://pagure.io/fm-orchestrator/issue/1669
render README in Pagure
2021-06-10 14:02:24 -04:00
Mike McLean
9a0e8e3db4 fix emphasis 2021-06-08 13:04:31 -04:00
Mike McLean
ae4132ce30 fix literal blocks 2021-06-08 13:04:24 -04:00
Mike McLean
e61cbcc8f8 fix ref 2021-06-08 12:29:19 -04:00
Mike McLean
a92321b9c6 PR#1704: Added link to docs folder in README
Merges #1704
https://pagure.io/fm-orchestrator/pull-request/1704

Fixes: #1628
https://pagure.io/fm-orchestrator/issue/1628
link to documentation from README
2021-05-25 14:36:45 -04:00
Brendan Reilly
9f31bf0741 Added link to docs folder in README 2021-05-25 14:36:40 -04:00
Mike McLean
0e067b521e PR#1707: Fix README rendering
Merges #1707
https://pagure.io/fm-orchestrator/pull-request/1707
2021-05-25 14:13:25 -04:00
Mike McLean
95a6ff9efe remove problematic license link 2021-05-19 15:18:51 -04:00
Mike McLean
9c738500e3 drop internal section links 2021-05-19 15:18:51 -04:00
Mike McLean
086ce8d4f0 remove duplicate substitution 2021-05-19 15:18:34 -04:00