Commit Graph

1470 Commits

Author SHA1 Message Date
Owen W. Taylor
4a3e6fb0fa start_build_component: add missing db_session parameter 2022-04-26 17:04:40 -04: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
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
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
Brendan Reilly
1883fa8567 Update handler name used by SQLAlchemy 2021-08-12 11:50:46 -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
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
Brendan Reilly
669318f1fd Exclude specific platform streams from stream expansion
Fixes: #1639
2021-07-29 15:15:03 -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
a1494e66aa also nudge reused components after 10 minutes 2021-07-07 18:22:24 -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
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
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
a8adfd4f74 defer commit of module entry until we set the context and validate 2021-05-13 11:36:53 -04:00
Mike McLean
872320a230 use scm_stream instead of scm.branch 2021-05-13 11:05:35 -04:00
Mike McLean
76e30dd8ad enforce allow_dashes_in_svc at module creation 2021-05-06 12:05:07 -04:00
Mike McLean
1f37c646f7 add allow_dashes_in_svc config option 2021-05-06 12:05:07 -04:00
Mike McLean
42f5f82a89 allow setting multiple schedule task names for product pages
this adds a new setting, product_pages_schedule_task_names, which
is the list version of product_pages_schedule_task_name.
2021-04-22 15:52:19 -04:00
Mike McLean
865296b8c7 fix flake8 issues 2021-04-21 14:41:23 -04:00
Mike McLean
604c850cfc sync_koji_build_tags: consider previous batches
This works around a case where tagging messages are missed for a build
with high reuse. In such a case, we can start out in the final batch,
but have incorrect tag state for reused components from previous
batches.
2021-04-13 13:21:43 -04:00
Mike McLean
bfd1d84bdb fail build if we can't add deps 2021-03-19 14:19:23 -04:00
Mike McLean
d170b433d2 allow side_tag parameter 2021-03-17 10:21:05 -04:00
Brendan Reilly
d0579a16c1 Fix mmd.copy calls to support PackagerV3
Fixes #1685
2021-03-10 15:00:42 -05:00
Mike McLean
1c20d1f818 fix comment, and warn if base module lacks side tag configuration 2021-03-10 12:55:09 -05:00
Mike McLean
2115d54030 note side tag in xmd if option is passed 2021-03-10 12:53:44 -05:00
Mike McLean
f9f057e92c handle side tag config in get_module_build_dependencies 2021-03-10 12:53:44 -05:00
Martin Curlej
7976b1f084 Added the support for the new libmodulemd v3 packager format.
This will enable building modules from the new libmodulemd v3 format.
This format fixes major issue with modularity which enables clear
upgrade paths for multicontext modules.

Signed-off-by: Martin Curlej <mcurlej@redhat.com>
2021-03-03 13:01:50 +01:00
Mike McLean
df5733d05d devel modules require non-devel, not themselves
Fixes https://pagure.io/fm-orchestrator/issue/1676
2021-02-08 19:59:02 -05:00
Brendan Reilly
a5ea3033ba Handle Product Pages 404s gracefully
Fixes: #1663
2020-12-01 12:16:51 -05:00
Brendan Reilly
ed86a2ca72 Do not add conflicts when builds are identical
Fixes: #1660
2020-11-11 16:03:52 -05:00
Martin Curlej
c139e4cb60 Added the ability to build modules with static contexts
This is a fix and feature in one. This patch enables to use static
contexts instead of module stream expansion. This fixes the issue with
upgrade path issue in dnf.

Signed-off-by: Martin Curlej <mcurlej@redhat.com>
2020-09-03 09:22:08 +02:00
Brendan Reilly
5c13368f77 Only get latest build of latest stream when determining requirements 2020-07-24 11:43:07 -04:00
jobrauer
8a5bf3a579 Move ComponentBuildTrace creation from before_commit to before_flush
Since ComponentBuildTrace(s) get created with db_session.commit() call,
is is not possible to commit more items in bulk if they already have been flushed.

Current unit-tests' setup can be significantly sped up if items can be quickly
flushed on the fly and bulk-commited only once at the end. Moreover in general it
seems more appropriate/safer to handle this in before_flush as any implicit
or accidental flush could cause new build traces not to be created at all. As flush
is implicitly called before every commit anyway, this change shouldn't pose any harm.
2020-07-13 05:55:45 +00:00
Brendan Reilly
169e5aa3b5 Do not login when getting final mmds 2020-06-23 14:09:52 -04:00
Brendan Reilly
db70560d2d Add API call to get final modulemds of builds 2020-06-22 11:31:05 -04:00
Brendan Reilly
e68f5c4c26 Use repo id instead of latest symlink
Fixes https://pagure.io/fm-orchestrator/issue/1581
2020-04-02 12:12:13 -04:00
Brendan Reilly
25cdfbbd22 Add the ability to limit arches 2020-04-01 17:02:51 +00:00
mprahl
244f29f25f Make record_module_build_arches idempotent
This function could get called multiple times if the init handler
runs more than once. This can happen if the build failed in the
init handler due to external infrastructure being down and the
user resumes their build.
2020-03-23 20:22:57 +00:00
mprahl
fee1dff8d0 Honor the MBS_CONFIG_SECTION environment variable when performing a local build 2020-03-17 17:08:27 -04:00
Merlin Mathesius
da51bebcd9 New 'module_stream' optional parameter
- Implement new optional parameter module_stream to allow a scratch module
  build's stream name to be set from the command line when also submitting a
  YAML modulemd file.
- Validate that module_name and module_stream parameters can only be specified
  along with a YAML modulemd file.
- Add tests to verify that module_stream sets the stream name correctly.
- Add tests to verify that module_name and module_stream are only allowed along
  with a YAML modulemd file.

Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2020-03-10 14:08:29 +00:00
Merlin Mathesius
de2a776226 Skip git ref checks for rpm components with srpm overrides
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2020-03-10 14:02:11 +00:00
Mike McLean
6c9f61e465 Merge #1577 Check schedule date when adding new streams 2020-03-06 16:56:17 +00:00
Brendan Reilly
88597a7c92 Check schedule date when adding new streams 2020-03-05 16:28:42 -05:00
mprahl
57d02ac3ba Make the code that ignores messages consistent 2020-03-04 16:11:25 -05:00
mprahl
757191fded Bubble up IgnoreMessage exceptions in get_abstracted_event_info
This allows the MBSConsumer.consume method to log the message and return
without calling the validate_event method.
2020-03-04 16:11:25 -05:00
mprahl
d2b3eace3d Handle when a message parser returns None
mbs-messaging-umb is such a parser that returns None if a message
does not match the schema it is validating against.
2020-03-04 16:11:25 -05:00