Commit Graph

51 Commits

Author SHA1 Message Date
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
Ralph Bean
a2122f84a4 Move insert_fake_baseruntime to utils.py. 2016-11-30 13:11:14 -05:00
Jan Kaluza
f7350a395f Allow file:// URLs when building modules locally 2016-11-30 10:33:20 +01:00
Jan Kaluza
4f6d683645 Fix #173 - Handle includedmodules by building their components recursively. 2016-11-23 06:38:16 +01:00
Jan Kaluza
528b6ab20a Do not submit failed components for a build 2016-11-21 13:07:18 +01:00
Jan Kaluza
9aca8057a3 Handle the exception in builder.build(...) code and do not mark whole module as failed - mark just the particular component. 2016-11-18 19:09:03 +01:00
Filip Valder
8c6a5f4919 Merge #196 Fix #94 - handle IOError 2016-11-18 14:11:20 +00:00
Filip Valder
d8942ba44a Load defaults from config 2016-11-18 10:24:34 +01:00
Filip Valder
225d116d45 lint 2016-11-18 10:22:35 +01:00
Ralph Bean
411da3def5 Resolve component refs on build submission.
Fixes #203.

The modulemd files we had used to all pin the commit hashes of the
components they were pulling in.  We changed this with modulemd-1.0 and
now modules can define their components in terms of their *stream*
(a.k.a. their dist-git *branch*).  This is awesome, and is a big
stepping stone towards greater things.

The problem is that we used to take that git ref literally from the
modulemd and pass it on to koji.  Now that instead we are passing on a
branch name to koji, it falls down.  Koji requires us to send it an
explicit commit hash.

This change takes that branch name and converts it to an explicit commit
hash when the module is first submitted.

Verified that things are working again:
- http://koji.stg.fedoraproject.org/koji/taskinfo?taskID=90084980
2016-11-17 14:49:48 -05:00
Matt Prahl
244b77f54c Add component build throttling 2016-11-16 15:24:17 -05:00
Matt Prahl
67d07023c5 Rename function to start_build_batch for further flexibility in the future 2016-11-16 15:24:16 -05:00
Matt Prahl
fb043cd2c7 Add TODO comment 2016-11-16 15:24:16 -05:00
Jan Kaluza
2b7ebdfc6f Fix #172 - Set ComponentBuild.batch according to mmd.buildorder attribute 2016-11-16 12:41:06 +01:00
Jan Kaluza
966a73251a Add support for modulemd-1.0 backward-incompatible changes like commit being replaced by ref 2016-11-14 15:32:51 +01:00
Jan Kaluza
7b9e4f7234 Initial version of mock backend 2016-11-10 09:57:00 +01:00
Ralph Bean
99b0993fe0 Pass around more info on pre-built components so we can resume module builds. 2016-10-29 16:12:24 -04:00