Commit Graph

78 Commits

Author SHA1 Message Date
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
089a0c3db4 Fix typo 2017-11-02 08:37:59 -04:00
mprahl
45cce653eb Add the ability to specify different rebuild methods 2017-11-01 15:39:43 -04:00
Nick Coghlan
d159350fff Default to reverse ordering by ID in APIs
Adjusts the affected tests to assume the
exact current set of default test data.

These tests were also testing the exact
same query URL, so they've been consolidated
into a single test.
2017-10-31 09:15:08 -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
mprahl
eedf0a1684 Default verbose to false but present a lot more information when verbose is false 2017-10-23 20:19:51 -04:00
Igor Gnatenko
1e6708b34f MockedSCM -> FakeSCM
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2017-10-18 17:37:13 +02:00
mprahl
62d438651a Fix tests 2017-10-16 15:09:42 -04:00
mprahl
27250263ea Default verbose to on ordering by id in the module-builds API 2017-10-05 16:17:18 -04:00
mprahl
6165fd5088 Add an API that exposes information about the MBS server 2017-09-19 16:48:28 -04:00
Filip Valder
7e3914e8b3 Remove parameterized
The reason is mentioned in PR#684:
"I've talked with @fivaldi to rewrite the test to not use parameterized,
since it is not in Fedora."
2017-09-15 13:31:48 +02:00
Filip Valder
3cb41aa5dc Changes in MBS restful API:
- Refactor MBS API code
- Unify module-/component_build API philosophy/design/approach
- Naming fixes
- _utc_datetime_to_iso moved from ModuleBuildAPI and is now a module-level function.
- Existing v1 API remains unchanged. ComponentBuildAPI now supports individual component build listing + verbose mode.
- documented in README
- various component_build API tests added
2017-09-11 14:48:22 +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
Filip Valder
7ef2975984 PEP8 fixes 2017-07-17 18:29:10 +02:00
Yashvardhan Nanavati
d79a9584c7 Find module build using attributes of a component build in koji 2017-07-07 14:37:43 -04:00
mprahl
3e819abcb6 Include the query arguments in the pagination metadata 2017-07-06 09:09:17 -04:00
Jan Kaluza
a07b44411c Set the state_reason when format_mmd raises in frontend and do not overwrite the state_reason in backend. 2017-06-06 14:49:49 +02:00
Jan Kaluza
b082c81c20 Support 'order_by' and 'order_desc_by' in filter_module_builds(...) 2017-05-23 09:52:19 +02:00
Jan Kaluža
9a4da7241d Merge #528 Add functionality of koji content generator imports 2017-05-11 12:23:36 +00:00
Ralph Bean
3f8cacd8e5 Convert all dates to ISO in the API.
This should fix #523.

There, @james is right.  Converting to "human" time values in an API
just makes things harder for API users.  We should leave
human-conversion to real UIs (like cli tools or web UIs).
2017-05-04 13:13:50 -04:00
Stanislav Ochotnicky
acb59d23f1 Add an example mmd file into the test database
This will actually be used to test the content generator functionality
2017-05-04 15:45:42 +02:00
Jan Kaluža
f441077706 Merge #515 Add config option for allowing custom scmurls 2017-05-02 12:57:48 +00:00
Jakub Kadlčík
a86084746d Rename ALLOW_CUSTOM_URLS to ALLOW_CUSTOM_SCMURLS 2017-05-02 11:29:47 +02:00
Jakub Kadlčík
03f8a54fdd Test allow_custom_urls config option 2017-04-24 21:17:41 +02:00
Nils Philippsen
b711d3fe5d pep8: remove trailing white space 2017-04-21 12:54:06 +02:00
Nils Philippsen
ec2be36d6e pep8: don't surround '=' with spaces for keyword args 2017-04-21 12:54:06 +02:00
Jan Kaluza
f8bb6e8e99 Fix another place where test results depend on the yaml parsing order. 2017-04-19 12:30:39 +02:00
Jan Kaluza
c828f60444 Do not replace branch names in mmd.components.rpms.ref by the commit hash, use our private mmd.xmd.mbs namespace to store that info. 2017-04-13 08:36:04 +02:00
Ralph Bean
65950304ca Merge #505 Allow querying for module builds by koji tag. 2017-04-11 13:02:15 +00:00
Ralph Bean
fae7848fa4 Allow querying for module builds by koji tag.
This way, if a component build fails and you want to find out who
submitted it, you can track the:

    koji build -> koji tag -> module build -> owner
2017-04-10 14:32:08 -04:00
Filip Valder
a192dab1e2 return Unprocessable Entity in case of a commit hash which is not found within the repository 2017-04-10 16:41:24 +02:00
Jan Kaluža
9c60457dda Merge #461 NO_AUTH bugfix and improvement 2017-04-07 06:01:42 +00:00
Jan Kaluza
acf0e7097c Use FAS groups to manage MBS admins 2017-04-04 16:39:10 +02:00
Filip Valder
e6d80c0293 introduce tox & pytest as well as other stuff (flake8, bandit and prepare for future automated build&release steps) 2017-03-31 11:15:32 +02:00
Jakub Kadlčík
dcba6c8995 Support NO_AUTH changing owner in patch method 2017-03-30 12:21:01 +02:00
Jakub Kadlčík
9a296ee451 Test build submitting with NO_AUTH 2017-03-30 11:21:37 +02:00
Jan Kaluza
c5f9d713cc Introduce 'admins' config option and allow users defined there to cancel any module build. 2017-03-29 12:58:44 +02:00
Jan Kaluza
f66de75272 Do not create new batch for included module if it is not requested by its buildorder. 2017-03-28 15:45:36 +02:00
Jan Kaluza
34c8cc833a Fix tests and change two places where Forbidden is more accurate than Unauthorized. 2017-03-14 13:40:53 +01:00
Jan Kaluza
7cf77d0fee Make testing with different configuration values easier and less error-prone by using mock.patch to change the configuration. 2017-03-13 07:48:29 +01:00
Jan Kaluža
91193cf676 Merge #404 Expect 'branch' while handling submission of module and use it to set the stream of module. Also verify that the commit hash belongs to that branch. 2017-03-09 05:04:19 +00:00
Jan Kaluza
4b3e295e48 Expect 'branch' while handling submission of module and use it to set the stream of module. Also verify that the commit hash belongs to that branch. 2017-03-07 11:25:06 +01:00
Ralph Bean
4509367d3e Use JSON for component API instead of strings.
This is more flexible and is nicer to other programs that try to parse
or consume this data.
2017-03-03 15:59:17 -05:00
Jan Kaluza
8aa3ce3c27 Add MODULES_ALLOW_REPOSITORY and MODULES_DEFAULT_REPOSITORY with the same meaning as RPMS_* equivalents. 2017-03-03 15:36:10 +01:00
Filip Valder
13b7bcd03e Support for state tracing of modules and components
- DB migration scripts.
- Models: ComponentBuildTrace, ModuleBuildTrace.
- ModuleBuild.state_trace method for querying for a particular module's
state history.
- SQLAlchemy before commit session event handler for recording
module/component state changes.
- REST API verbose mode for getting state trace of a particular module.
- Tests use make_session, so that event handlers are in effect.
- Short info in README about verbose mode.
- Tests verifying whether state trace information about a module appears
in verbose mode.
- Other minor fixes (RidaBase -> MBSBase, PEP8...)
2017-02-28 16:15:43 +01:00
Matt Prahl
56d6d90ece Enforce that the mmd can't define a different module name, stream, or version 2017-02-24 10:37:40 -05:00
Matt Prahl
8577d5f307 Fix and cleanup tests 2017-02-21 14:22:30 -05:00
Jan Kaluza
92e39162b0 Fix test_submit_build_auth_error test 2017-02-21 15:22:21 +01:00
Ralph Bean
b5e31d73a1 Adjust test string. 2017-02-20 14:37:17 -05:00
Ralph Bean
32c743725d Remove xmd from test data for modulemd change. 2017-02-16 10:17:24 -05:00