601 Commits

Author SHA1 Message Date
Jimmy Berry
50f8042ba9 stagingapi: convert rebuild_broken to a generator for instant feedback.
Otherwise, the rebuild command does not print output until all the
rebuilds for a whole staging are completed. With this change each package
should be printed immediately.
2017-04-20 23:10:05 -05:00
Jimmy Berry
52d356db29 Merge pull request #834 from jberry-suse/supersede-command
supersede: separate command, feedback, and force supersede post source project check
2017-04-20 14:10:08 -05:00
Ludwig Nussel
0f9d4fc86a Merge pull request #832 from jberry-suse/simplify-project-status-walk
stagingapi: simplify project_status_build_sum() with a generator.
2017-04-20 12:05:38 +02:00
Jimmy Berry
cf3ce7435e stagingapi: bypass ignored list when supersede with target_requests. 2017-04-19 18:14:35 -05:00
Jimmy Berry
7e26435ee0 supersede: provide feedback about what requests were superseded. 2017-04-19 18:09:34 -05:00
Jimmy Berry
862ee547eb supersede: allow list of request IDs or packages. 2017-04-19 18:09:34 -05:00
Jimmy Berry
b2ba0730de stagingapi: enhance supersede target_pkgs to skip source project check.
This creates a facility for forcing a request, that was ignored due to
the source check, to supersede the existing one.
2017-04-19 18:09:25 -05:00
Jimmy Berry
54f502da37 osc-staging: break out list --supersede PACKAGES... as separate command.
Maintains `list --supersede`, but places the explicit supersede based on
a list of packages in a separate command.
2017-04-19 17:42:14 -05:00
Jimmy Berry
567d6d7950 Merge pull request #831 from jberry-suse/obsolete-skip-superseded
unselect: filter superseded when using --cleanup.
2017-04-19 16:54:52 -05:00
Jimmy Berry
f79e35caeb stagingapi: correct project_status_build_percent() formula.
final: packages in final state (not final count ie total)
tobuild: packages remaining to build
2017-04-19 16:08:39 -05:00
Jimmy Berry
e156e1cede stagingapi: simplify project_status_build_sum() with a generator. 2017-04-19 15:23:49 -05:00
Jimmy Berry
9135f91620 unselect: filter superseded when using --cleanup. 2017-04-19 14:55:42 -05:00
Jimmy Berry
3d503c1f2c request_splitter: provide quick strategy based on lack of reviews needed. 2017-04-18 13:36:40 -05:00
Jimmy Berry
2aa494aea3 request_splitter: provide Strategy.desirable() in base.
Default should be all groups are desirable which the strategy can override.
2017-04-18 13:33:05 -05:00
Jimmy Berry
959a8f7905 request_splitter: add super strategy for representing devel groups. 2017-04-17 23:06:24 -05:00
Jimmy Berry
59eda5d82d request_splitter: group_by(): provide required option and use in devel.
Staging packages with no devel project as a result of devel strategy seems
like the incorrect behavior.
2017-04-17 23:05:04 -05:00
Jimmy Berry
232219363c request_splitter: s/supliment/supplement/ in comment. 2017-04-17 22:55:41 -05:00
Jimmy Berry
446a30dde0 request_splitter: switch from build percentage to staging age for merge.
Using build percentage is sub-optimal since many events can reset the
percentage which can result in additional requests being merged into the
staging. A better metric is the time since the first request was added to
the staging (the age of the staging). Unfortunately, this is not trivial to
determine especially given that the original request may be superseded or
unstaged entirely. As such the datetime at which the staging was activated
is stored in the staging pseudometa. A max age is then used to allow for
merging up until that point.
2017-04-14 17:11:30 -05:00
Jimmy Berry
d8f7d03c33 request_splitter: allow user to override merge conditions. 2017-04-14 17:03:18 -05:00
Jimmy Berry
83f425f23a request_splitter: s/age_threshold/request_age_threshold/.
Makes room for more age related variables. My gut was to do this in the
first place which seems correct now.
2017-04-14 16:48:23 -05:00
Jimmy Berry
ef2bc90061 request_splitter: provide and utilize an aged attribute on requests. 2017-04-12 17:32:43 -05:00
Jimmy Berry
50a83d1108 request_splitter: use capital for boolean strings in supplement().
Given that str(boolean) is used a capital is sometimes present, but should
be consistent to remove the possibility for issues.
2017-04-12 17:32:43 -05:00
Jimmy Berry
4bea74ae3a request_splitter: s/suppliment/supplement/(). 2017-04-12 17:32:43 -05:00
Jimmy Berry
06d93b7344 stagingapi: get_open_requests() provide query_extra option. 2017-04-12 17:32:43 -05:00
Jimmy Berry
8109772372 stagingapi: get_open_requests(): replace query string with dictionary. 2017-04-12 17:32:38 -05:00
Jimmy Berry
27c0db5a78 stagingapi: rebuild_broken(): ignore unresolvable packages. 2017-04-10 23:24:12 -05:00
Jimmy Berry
7ceb58d814 obslock: include delta in message. 2017-04-06 17:37:55 -05:00
Jimmy Berry
043dad76db stagingapi: correct supersede call to IgnoreCommand. 2017-04-06 16:27:11 -05:00
Ludwig Nussel
37499194ce Merge pull request #783 from jberry-suse/select-move-deactivate
osc-staging: handle `select --move` cleanup of empty source project.
2017-04-05 18:22:35 +02:00
Ludwig Nussel
5eae68a0d9 Merge pull request #784 from jberry-suse/adi-accept-comment
adi: create accept comment to be consistent with letter stagings. (and cleanups)
2017-04-05 18:21:51 +02:00
Jimmy Berry
f9c78a6638 adi: create accept comment to be consistent with letter stagings. 2017-03-28 23:02:38 -05:00
Jimmy Berry
1dfa8d2568 stagingapi: provide accept_status_comment() based on accept command. 2017-03-28 23:01:33 -05:00
Jimmy Berry
1ece7d6375 accept: remove unused requests list in perform(). 2017-03-28 22:59:36 -05:00
Jimmy Berry
5a2cd2dc9a osc-staging: handle select --move cleanup of empty source project.
- handle build disable in select command just like comment instead of
  stagingapi move_between_project() for consistency and to reduce double
  checking the same information via extra API calls
- build_switch_staging_project() provides target_flag parameter rather
  than trying to figure out flag value since caller has the context to
  know and again reduces API calls
- build_switch_staging_project() checking conditions are essentially
  checking if True is True since non-adi projects will always have ring
  packages or rings disabled entirely. The condition of interest is
  non-empty. Additionally adi projects are removed if empty so not a
  terribly useful distinction to make.
- provide helper update_status_or_deactivate() to handle common logic
  and replace in calling locations
2017-03-28 22:33:35 -05:00
Jimmy Berry
5185a7f569 stagingapi: invalidate get_open_requests() memoize cache after supersede. 2017-03-28 19:52:43 -05:00
59e496effb Fix wrong call of cstaging 2017-03-24 17:25:00 +08:00
Ludwig Nussel
fa167b8073 Merge pull request #772 from nilxam/suppkg_rebuild
Rebuild staging project if it has support package was staged
2017-03-23 10:35:23 +01:00
Ludwig Nussel
a85e077925 Merge pull request #766 from jberry-suse/supersede-leap
refactor supersede logic and handle different source projects (additional cleanups)
2017-03-22 18:21:35 +01:00
06596972c9 Reset support_pkg_rebuild state to unknown while accepting 2017-03-21 19:39:09 +08:00
Ludwig Nussel
3cbe377b11 Merge pull request #768 from jberry-suse/cleanup-setprio
setprio: utilize project_status() and refactor to support list of stagings.
2017-03-20 15:41:01 +01:00
Ludwig Nussel
79a193ab78 Merge pull request #770 from jberry-suse/cleanup-obsolete-untracked
support --cleanup for obsolete and untracked requests in unselect and repair commands
2017-03-20 15:40:17 +01:00
Ludwig Nussel
99c358703f Merge pull request #765 from jberry-suse/cleanup-ignore
Cleanup ignore and always provide a comment.
2017-03-20 15:39:13 +01:00
Jimmy Berry
8ebe94bc5f stagingapi: get_ignored_requests() handle empty file. 2017-03-18 21:04:54 -05:00
Jimmy Berry
37ce041b9d repair: support the --cleanup flag to include all untracked requests. 2017-03-18 18:14:47 -05:00
Jimmy Berry
94a4629d2c unselect: support the --cleanup flag to include all obsolete requests. 2017-03-18 18:13:42 -05:00
Jimmy Berry
3505736fe0 stagingapi: project_status_requests() to extract all requests of type. 2017-03-18 18:06:51 -05:00
Jimmy Berry
e41c58cb3b stagingapi: refactor supersede logic and handle different source projects.
Primarily an issue for Leap in that requests originating from different
source projects may be submitted for the same package at once. Instead of
always superseding the previous request the request will only be
superseded if it originates from the same project.

If different sources md5s are found the request will be ignored and left
for manual review and an identical request will be declined.
2017-03-17 17:23:30 -05:00
Jimmy Berry
01868da548 stagingapi: do not attempt to supersede ignored requests. 2017-03-17 17:20:06 -05:00
Jimmy Berry
6669190e98 stagingapi: simplify finding action in superseded_request(). 2017-03-17 17:18:47 -05:00
Jimmy Berry
f5115930bc stagingapi: provide source_info_request() helper. 2017-03-17 17:17:58 -05:00