Commit Graph

67 Commits

Author SHA1 Message Date
Jan Kaluza
1487fd01f2 Remove is_waiting_for_repo_regen and use buildroot_ready instead. Do not get buildroot dependencies from the buildrequires recursively. Do not validate Koji tags to inherit. 2017-03-22 17:29:05 +01:00
Jan Kaluza
09601cfbb6 Do not allow starting next batch if the Koji is still building new repo. 2017-03-22 14:40:18 +01:00
Jan Kaluza
0fb8bd221f Reset batch counter and state_reason when resubmiting module 2017-03-17 12:11:08 +01:00
Jan Kaluza
830b1dd111 Add tests for 'continue' part of start_next_batch and component resubmit 2017-03-16 11:20:51 +01:00
Jan Kaluza
f97d53d640 Remove unnecessary check in start_next_batch_build and do not increment module.batch before all the checks are done. 2017-03-15 14:15:15 +01:00
Jan Kaluza
97706324a7 Fix the module fail when num_consecutive_builds limit is met and tagging issue when all the builds are reused in a single batch 2017-03-15 11:55:55 +01:00
Jan Kaluža
ec5ea320fc Merge #426 Bugfixes caused by frontend expecting even branch 2017-03-14 17:36:49 +00:00
Jakub Kadlčík
e88c881039 Cast branch to string or otherwise it fails 2017-03-14 15:19:01 +01:00
Ralph Bean
a8314cba09 Merge #425 Use the 403 Forbidden result in case the user is unauthorized 2017-03-14 13:11:10 +00:00
Jan Kaluza
0543e2c9ca Fix #421 - Build next component immediatelly after the previous component build is finished. 2017-03-14 08:36:30 +01:00
Patrick Uiterwijk
a4763ee316 Use the 403 Forbidden result in case the user is unauthorized
The difference between 401 Unauthorized and 403 Forbidden is that 403 Forbidden is "permanent":
it indicates that the user was authenticated correctly, but was not allowed to access this endpoint.
In contrast, 401 Unauthorized means that the request as posted was not allowed, but if the user
were to try again with (new) authorization tokens, it might actually succeed.

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2017-03-13 07:34:36 +00:00
Jan Kaluza
8a9b3bdca5 Always white-list included modules repository in _fetch_mmd. 2017-03-13 08:02:41 +01:00
Jan Kaluza
b569fa6c21 Fix #405 - Fix num_consecutive_builds. 2017-03-09 08:59:09 +01: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
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
Ralph Bean
8f81e6e1ca Still more logging. 2017-03-03 06:25:54 -05:00
Filip Valder
6b189c4b4a Koji tag validation: Catch situation when tag arg has no value + refactoring + add comments. 2017-03-02 15:01:52 +01:00
Ralph Bean
ca61d6bb29 Allow passing in multiple tag names to the validation decorator.
We have problems when we try to wrap one decorator around another.
There are ways to do that with the
[decorator](https://pypi.python.org/pypi/decorator) module nicely,
however.. they are ugly.

Take a look at this:

https://github.com/micheles/decorator/blob/master/src/decorator.py#L217-L218

And this:

https://github.com/micheles/decorator/blob/master/src/decorator.py#L185-L188

The approach in this PR is.. simpler.
2017-02-28 17:15:55 -05:00
Filip Valder
6dd223fd12 support for dicts + tests 2017-02-28 20:54:03 +01:00
Matt Prahl
7dfb647e08 Merge #347 Possibility to specify optional parameters when submitting build 2017-02-28 14:26:20 +00:00
Filip Valder
a4366d9be7 Koji tag validation
- Decorator supporting str/list args
- ProgrammingError exception which may uncover typos in the names of args to validate
- Configurable whitelist of koji tag prefixes
- Add basic validation to test_build.TestModuleBuilder
2017-02-28 09:08:32 +01:00
Jakub Kadlčík
cef690f260 Not accept copr parameters when different builder is used 2017-02-27 15:53:39 +01:00
Jakub Kadlčík
34ea4a8efe Move validate_optional_params function to utils.py 2017-02-26 22:23:50 +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
Jakub Kadlčík
38bdc92248 Have immutable default value for optional_params 2017-02-23 20:51:31 +01:00
Jakub Kadlčík
92dce63091 Allow submitting optional parameters such as copr_owner and copr_project 2017-02-23 20:51:31 +01:00
Matt Prahl
385045d778 Reuse components from previous module builds 2017-02-21 14:22:30 -05:00
Matt Prahl
a5cc4eb280 Add a module's commit hash, scmurl, and the buildrequires' commit hashes, stream, and version in the modulemd 2017-02-21 09:53:05 -05:00
Matt Prahl
26c08f5e31 Separate record_component_builds into two functions 2017-02-21 09:32:09 -05:00
Jan Kaluža
18f9089643 Merge #323 Possibility to submit yaml file 2017-02-21 14:21:45 +00:00
Jan Kaluza
1d8bc3e33a Use concurrent.futures instead of our own ThreadPool implementation 2017-02-21 08:02:50 +01:00
Jan Kaluza
aa6db9fcce Use StopIteration in QueueBasedThreadPool to stop the threads. 2017-02-21 08:02:50 +01:00
Jan Kaluza
e7acde9aa5 Use six.moves to import Queue 2017-02-21 08:02:50 +01:00
Jan Kaluza
64d96966e2 Use Queue based ThreadPool instead of the default Python's one. Improve locking and debugging in the Mock backend. 2017-02-21 08:02:50 +01:00
Jakub Kadlčík
43acbdbdba Implement possibility to submit yaml files (See #310) 2017-02-19 22:35:55 +01:00
Jakub Kadlčík
1591b9c5e7 Create method for loading modulemd object from yaml 2017-02-19 22:35:55 +01:00
Ralph Bean
9bb7b8a716 Force MMD's int version to a str when interacting with our db. 2017-02-15 12:09:49 -05:00
Filip Valder
818a3feb6f check Koji active tasks for component relicts (same NVR) from previous (terminated) builds 2017-02-08 15:56:41 +01:00
Jan Kaluza
0b307550c4 Mock: WIP threading support 2017-02-01 13:20:17 +01:00
Jan Kaluža
59d070df35 Merge #278 Fix #276 - Use PDC to resolve buildroot components instead of MBS database 2017-01-12 14:34:13 +00:00
Jan Kaluza
008f2c9d29 Make SCM check faster by consolidating two SCM checks to single check executed in ThreadPool. Use 'git checkout' instead of HTTP HEAD request, because it is much faster in Fedora cgit case. 2017-01-11 15:09:49 +01:00
Jan Kaluza
0f797c2917 Remove fake base-runtime module from DB and old resolve_profiles method because they are not used anymore. Fix the tests to work with remove fake base-runtime. 2017-01-10 15:58:26 +01:00
Matt Prahl
261549c8c2 Migrate scheduler to be run by fedmsg-hub 2016-12-15 16:27:15 -05:00
Jan Kaluza
3788bd2d8d Inherit the SCM repository from the parent module to included modules. 2016-12-13 13:24:25 +01:00
Jan Kaluza
e08b6d1a46 Allow resubmit of the same module also for 'init' status. 2016-12-13 10:59:10 +01:00
Jan Kaluza
d06c13d973 Fix the bug when module build freezes when all the components in batch have been already built by builder. 2016-12-12 21:03:44 +01:00
Matt Prahl
9d734d38ce Create fake baseruntime module directly to avoid DetachedInstanceError 2016-12-12 09:00:44 -05:00
Filip Valder
7fcfe05f85 Fix issue #251:
- support for mupltiple SCM URLs (logic was broken when there were more
than one SCM URL in SCMURLS conf. var)

- unsplit-brain handling of SCM URLs between frontend and backend
2016-12-12 13:05:27 +01:00
Filip Valder
79715ecfbe missing: import logging 2016-12-05 15:18:26 +01:00
Ralph Bean
9303be7a4e Merge #228 Drop alembic fake base-runtime code. 2016-12-01 15:56:10 +00:00