Commit Graph

404 Commits

Author SHA1 Message Date
Matt Prahl
2561930833 Merge #457 Create the builder in components.py handler only when we really need it. 2017-03-23 16:11:18 +00:00
Jan Kaluza
b1217921aa Create the build in components.py handler only when we really need it. 2017-03-23 15:28:24 +01:00
Jan Kaluza
296d69b609 Handle all exceptions in the consumer handlers. 2017-03-23 14:59:38 +01:00
Jan Kaluza
4a6d961d66 Handle situation when all component builds in a batch fail 2017-03-23 14:25:20 +01:00
Jan Kaluza
b4d87c4e25 Retry communication with PDC on RuntimeError exception and increase the timeout to 120 seconds 2017-03-23 12:56:12 +01:00
Jan Kaluža
9c5a97bbd2 Merge #453 Return only the direct build-requires of a module in get_module_build_dependencies and remove module_depsolving_wrapper, because it is not needed anymore. 2017-03-23 08:59:51 +00:00
Jan Kaluza
f52249decd Return only the direct build-requires of a module in get_module_build_dependencies and remove module_depsolving_wrapper, because it is not needed anymore. 2017-03-23 09:54:35 +01:00
Matt Prahl
ba28bfed6d Merge #452 Fix UnboundLocalError. 2017-03-22 17:51:01 +00:00
Ralph Bean
aabd28b148 Fix UnboundLocalError.
I have hotfixed this in production on mbs-backend01::

    Traceback (most recent call last):
      File "module_build_service/scheduler/consumer.py", line 134, in consume
        self.process_message(session, msg)
      File "module_build_service/scheduler/consumer.py", line 224, in process_message
        for event in further_work:
    UnboundLocalError: local variable 'further_work' referenced before assignment
2017-03-22 13:10:34 -04:00
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 Kaluža
a2ba358c71 Merge #447 Do not allow starting next batch if the Koji is still building new repo. 2017-03-22 13:43:07 +00: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
a9fdf08c6f Do not fetch profiles in resolve_profiles recursively. When we are building a module, we just need profiles from build-requires of this particular module, but not all the modules downstream. 2017-03-22 09:29:08 +01:00
Jan Kaluza
1c16c78cf9 Try to continue batch build only when there are some components to build 2017-03-17 18:55:54 +01:00
Jan Kaluza
163ee311de Expire the build object to force its refresh from database 2017-03-17 18:50:25 +01:00
Jan Kaluža
25340aecd9 Merge #445 Fix the process_paused_module_builds in poller. 2017-03-17 15:14:25 +00:00
Jan Kaluza
3318f48fc3 Fix the process_paused_module_builds in poller 2017-03-17 15:57:52 +01:00
Jan Kaluža
27e4c3868a Merge #444 Mark module build as failed if one of the components fail 2017-03-17 14:20:31 +00:00
Jan Kaluza
5aa6360595 Mark module build as failed if one of the components fail 2017-03-17 15:14:41 +01:00
Matt Prahl
3736a0dd6a Merge #443 Do not try to tag builds which have been already tagged in a tag. 2017-03-17 13:55:00 +00:00
Jan Kaluza
10811e41dc Do not tag packages which belong to -build tag to final tag. 2017-03-17 14:41:11 +01:00
Jan Kaluža
6aa50ebd24 Merge #437 Add tests for 'continue' part of start_next_batch and component resubmit 2017-03-17 13:22:11 +00:00
Jan Kaluza
0fb8bd221f Reset batch counter and state_reason when resubmiting module 2017-03-17 12:11:08 +01:00
Jan Kaluza
c06d900e62 Do not try to tag builds which have been already tagged in a tag 2017-03-17 11:29:38 +01:00
Ralph Bean
40e3f75735 Merge #431 [Waits on upgrade of PDC and pdc-updater] Query only for active deps in PDC. 2017-03-16 17:05:51 +00: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
Ralph Bean
11c915ca3f Query for only "active" deps in PDC.
See #407.
2017-03-14 20:11:01 -04:00
Matt Prahl
f8f93683ff Merge #430 Delete get_module_runtime_dependencies 2017-03-14 18:09:06 +00:00
Jan Kaluža
ec5ea320fc Merge #426 Bugfixes caused by frontend expecting even branch 2017-03-14 17:36:49 +00:00
Ralph Bean
92d29d727a Style. 2017-03-14 13:13:10 -04:00
Ralph Bean
141ffa8a17 Delete get_module_runtime_dependencies
It isn't really in use anywhere.

Fixes #378.
2017-03-14 12:58:12 -04:00
Jan Kaluža
4afe8e2c5f Merge #413 Fix #409 - Remove koji_tag_inherit_from and whitelist all the components we are going to build instead. 2017-03-14 16:22:38 +00:00
Ralph Bean
3874da7538 Supply component NVR if we know it in the poller.
The poller used to only look for failed or cancelled builds.  In those
cases, there is no way to know the NVR associated with the task.

Now that we also handle completed builds in the poller, we should pass
along the NVR from the koji build.
2017-03-14 11:33:22 -04: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
34c8cc833a Fix tests and change two places where Forbidden is more accurate than Unauthorized. 2017-03-14 13:40:53 +01:00
Jan Kaluža
8bf10c8183 Merge #422 Fix #421 - Build next component immediatelly after the previous component build is finished. 2017-03-14 12:03:32 +00:00
Jan Kaluža
23cf21063b Merge #423 Fix #417 - Do not validate koji tag for repo_from_tag - even the non-prefixed module tag should work there. 2017-03-14 12:01:41 +00:00
Ralph Bean
b8ae310008 Merge #420 Sometimes (with base-runtime) this can take a long time... 2017-03-14 11:45:51 +00:00
Jan Kaluza
82edbab2b4 Use real 'components' arg instead of **kwargs. 2017-03-14 12:12:53 +01:00
Jan Kaluza
298bf63120 Fix #409 - Remove koji_tag_inherit_from and whitelist all the components we are going to build instead. 2017-03-14 11:28:47 +01:00
Jan Kaluza
aaac78da53 Fix #417 - Do not validate koji tag for repo_from_tag - even the non-prefixed module tag should work there. 2017-03-14 08:42:36 +01: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
Ralph Bean
be0ca4ed33 Sometimes (with base-runtime) this can take a long time... 2017-03-13 16:08:09 -04:00
Ralph Bean
20671748ca Coerce submitted branch name from unicode to bytes.
I hit this in prod on the latest 1.3.4 release.
2017-03-13 14:48:51 -04:00
Jan Kaluza
f18925c677 Use compact dist-tag by using DEFAULT_DIST_TAG_PREFIX and first 8 characters of sha1 hash of module name/stream/version. 2017-03-13 16:49:56 +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