234 Commits

Author SHA1 Message Date
Jimmy Berry
93fb950351 freeze: colorize. 2017-04-27 16:33:04 -05:00
Jimmy Berry
40f5ee00fb frozenage: colorize. 2017-04-27 16:33:04 -05:00
Jimmy Berry
fb25b7a044 osc-staging: implement colorization using colorama for adi and list. 2017-04-26 11:59:38 -05:00
Jimmy Berry
862ee547eb supersede: allow list of request IDs or packages. 2017-04-19 18:09:34 -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
5e3c8dc920 osc-staging: select: extend doc to cover [try-]strategy[s] and merge. 2017-04-17 23:18:54 -05:00
Jimmy Berry
5e0ed06ae6 osc-staging: select -i: include note about skipping. 2017-04-17 23:08:55 -05:00
Jimmy Berry
ef2bc90061 request_splitter: provide and utilize an aged attribute on requests. 2017-04-12 17:32:43 -05: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
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
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
bd8c4dea83 osc-staging: check command replace REPO with STAGING in doc. 2017-03-17 14:13:01 -05:00
Jimmy Berry
84e1b66cd8 setprio: utilize project_status() and refactor to support list of stagings.
The existing setup was inconsistent in that it was copied from check, but
documented that it supported multiple specific stagings. Assuming that
would be a desired feature anyway it has been reworked.
2017-03-17 14:11:55 -05:00
Ludwig Nussel
6e0826801f Add setprio command
raise priority for requests in review
2017-03-16 14:43:28 +01:00
Ludwig Nussel
98e167d555 Merge pull request #742 from jberry-suse/select-proposal-move
osc-staging: --move and --from do not make sense with select proposal.
2017-03-16 10:41:42 +01:00
Ludwig Nussel
1156354ba8 Merge pull request #748 from lnussel/staging
Fix module search path in osc-staging
2017-03-15 11:08:21 +01:00
Ludwig Nussel
02ec7b2eff Merge pull request #741 from jberry-suse/osc-staging-doc-cleanup
osc-staging: correct and cleanup summary documentation.
2017-03-14 14:00:16 +01:00
Ludwig Nussel
80dffd574f Fix module search path in osc-staging 2017-03-14 13:52:54 +01:00
Jimmy Berry
e96476804e osc-staging: correct and cleanup summary documentation.
- adi and unignore commands request list is optional
- s/PROJECT/STAGING/ for consistency
- include --add option in select command
2017-03-14 00:51:17 -05:00
Jimmy Berry
71081a1256 osc-staging: --move and --from do not make sense with select proposal.
The proposals should never be generated with requests that are already
staged and as such should never be moved.
2017-03-14 00:46:00 -05:00
Jimmy Berry
1b638a533b osc-staging: provide rebuild_check() to conditionally rebuild failures. 2017-03-14 00:24:23 -05:00
Ludwig Nussel
95cfd9699f Merge pull request #720 from jberry-suse/unselect-ignore-requestfinder
ignore: integrate with unselect and use requestfinder
2017-03-10 15:16:22 +01:00
Ludwig Nussel
688e75bce0 Merge pull request #717 from jberry-suse/frozenage-all
osc-staging: allow frozenage to be invoked with no arguments.
2017-03-10 15:15:17 +01:00
Jimmy Berry
70a3d7074a osc-staging: extend --message to unselect which will ignore first. 2017-03-10 01:31:24 -06:00
Jimmy Berry
b01a19cd17 osc-staging: allow frozenage to be invoked with no arguments. 2017-03-09 16:11:26 -06:00
Jimmy Berry
13b7ae9d8a osc-staging: provide rebuild command.
Often packages will fail to build after becoming stuck or other false
negative cases and need to have a rebuild triggered. The process can be
tedious if several packages failed in various stages.
2017-03-08 16:17:31 -06:00
Ludwig Nussel
19a37c0553 Merge pull request #702 from jberry-suse/select-merge-and-strategies
Select automation: merge and strategies
2017-03-08 18:54:14 +01:00
Jimmy Berry
9c55799fb1 osc-staging: provide unlock to resolve stuck staging locks. 2017-03-08 00:06:01 -06:00
Jimmy Berry
c6b37d60ab osc-staging: provide --cleanup option for unignore. 2017-03-02 15:38:12 -06:00
Jimmy Berry
27a6772dce request_splitter: add strategy_do_non_bootstrapped().
Utilize in select command to fallback to none strategy and also excluded
packages that require bootstrapping.
2017-03-01 01:08:23 -06:00
Jimmy Berry
ad4d93a5b4 request_splitter: rework internals to support merge and strategies.
- reworked internal representation of stagings to be more flexible
- new considerable staging state of mergeable based on set of conditions
- multiple proposal stages can be combined to create one proposal
- proposals may now fail to find every group a home without stopping
- splitter_info is stored when first request in an empty staging is staged
  to allow for automated merging into that staging
- strategy concept introduced along with several strategies
- strategy_try() concept for applying multiple strategies and keeping
  desirable groups which provides a solid basis for making smart decisions
- merge() introduced for merging new requests into existing stagings
- various internal cleanups along the way

functionality exposed via osc-staging:
- new options: --merge, --try-strategies, --strategy
- splitter info written when not merging

stagingapi: add set_splitter_info_in_prj_pseudometa().
2017-03-01 01:08:23 -06:00
Jimmy Berry
4d08331250 request_splitter: rework stagings_load() to be public facing.
Notify user and exit early if not stagings worth considering.
2017-03-01 01:08:23 -06:00
Jimmy Berry
31ba1a1b7b osc-staging: select: correct documentation example missing bracket. 2017-03-01 01:08:23 -06:00
Jimmy Berry
a2a1d21f70 osc-staging: splitter: improve staging message and variable name. 2017-03-01 01:08:22 -06:00
Jimmy Berry
5d4ecedc82 osc-staging: splitter: move interactive invalidation check.
More appropriate to place inside --interactive check since that is the
only time the invalidation check should be needed. Also better since the
user is presented with a more accurate picture of what is to be done.
2017-03-01 01:08:22 -06:00
Jimmy Berry
8691226b82 osc-staging: splitter: check if no open requests. 2017-03-01 01:08:22 -06:00
Jimmy Berry
4fb3058f93 select: provide --non-interactive option to skip proposal confirmation. 2017-03-01 00:28:15 -06:00
Jimmy Berry
7307b8ec57 osc-staging: drop extraneous space in freeze method call. 2017-02-10 17:23:40 -06:00
Jimmy Berry
b37fd2e094 osc-staging: adi command min should be 0 for consistency. 2017-02-10 17:23:40 -06:00
Jimmy Berry
64ef24a8a7 osc-staging: check command does not support 2 arguments. 2017-02-10 17:23:40 -06:00
Jimmy Berry
2a562b89af osc-staging: add missing documentation and correct/clean existing. 2017-02-10 17:23:32 -06:00
Jimmy Berry
5da8f897a1 request_splitter: s/available/remaining/ for a more accurate label. 2017-02-08 16:45:39 -06:00
Jimmy Berry
f42358eaad request_splitter: move @devel_project to action/target.
With the source no longer being checked for devel project and the fact
that delete requests and such will not have source, but make sense to
have a devel project moving to target makes more sense.
2017-02-01 08:09:01 -06:00
Jimmy Berry
1fe9b5be19 Provide proposal based select using RequestSplitter.
See select documentation for usage details.
2017-01-24 22:34:15 -06:00
Jimmy Berry
88baa3bf65 Add parenthesis to print calls in osc-staging in preparation. 2017-01-24 22:21:53 -06:00
Jimmy Berry
b25fda9b47 Provide ignore/unignore request staging commands.
It is not uncommon for a request to be in a pending state which requires
action beyond the scope of the staging workflow, but does not make sense
to deny the request. For lack of a "postponed" or "pending" state on OBS
a sudo-state of "ignore" is provided for the staging workflow. The ignore
state will remove a request from the "list" and "adi" commands so as not
to be accidentally staged. This avoids the need for keeping a context of
what requests should be ignored in one's memory.

It is expected that an ignored request will have comments reflecting what
is to be done or one should be added via the -m option of ignore command.
2017-01-11 18:32:23 -06:00
Jimmy Berry
cff5befed3 Provide cache for expensive and cache-able staging requests.
The two slowest staging API calls are for information that rarely changes.
By caching the result the commands typically execute over twice as fast.
Going further can see improvements of an order of magnitude or more by
caching almost all the GET requests.

In contrast to osclib/memoize.py this cache operates at the HTTP request
level. This has several advantages:

- Caches the expensive part (ie the HTTP request). There are a number of
  functions in osc.core and elsewhere that make the same API request, but
  process the result differently which would require multiple API calls
  using memoize.
- Handles cases were a loader function uses class attributes as input and
  output and thus no relevant method parameters or return. An important
  example is StagingAPI._generate_ring_packages().
- Storage is project aware which allows caches to be deleted when a project
  is known to have changed.
- Due to project awareness, can utilize OBS /statistics/latest_updated API
  call to determine which projects need to be expired.

The cache file structure is as follows:

- hostname(apiurl)
  - project
    - sha1(url)
  - sha1(url)

See Cache.PATTERNS for changing the time to live (ttl) or add patterns to
be cached.
2017-01-11 10:23:54 -06:00
Ludwig Nussel
bddcc12c8d Fix accept logic to actually work 2016-06-09 13:15:01 +02:00