260 Commits

Author SHA1 Message Date
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
Ludwig Nussel
fac9d408bb Change meaning of --force for accept
Just ignore if totest doesn't exist. Instead make --force accept a
staging despite failures.
2016-06-07 15:11:26 +02:00
Ludwig Nussel
a71a2ee9b4 Add --no-bootstrap to freeze command
Sometimes it's desirable to re-freeze a staging project without touching
the bootstrap copy again.
2016-06-07 14:44:42 +02:00
76c3a09457 Staging: de-duplicate code 2016-06-02 16:56:51 +02:00
482c1f0490 AcceptCommand: Cleanup packages that were manually linked to projects 2016-06-02 12:40:48 +02:00
e8c55026ed Add --split argument to adi command
With --split argument, staging adi command can splits each package to
different adi staging project, the argument can work by 'osc staging adi
--split' or 'osc staging adi --move --split'. Note that, it will be
ignore --by-develproject argument too.
2016-05-31 14:25:51 +08:00
Stephan Kulow
8e05bf94ff Do not run Factory workflow stuff on SLE projects 2016-05-06 15:17:13 +02:00
374d472ecb New staging repair command
Mainly fix the request review if the request got reopened.
2016-04-18 21:55:51 +08:00
e2e4fa8da8 Fix typo from commit 7e0294 2016-04-03 23:00:11 +02:00
7e02942d07 Add misses part for force accept 2016-03-26 02:59:28 +08:00
8fa6783c3f Do not check totest on SLE
If release-notes-sles is existed then it is not openSUSE Factory but
SLE, hence do not check totest and openSUSE-release.rpm on it.

And add try/except protection in get_binary_version otherwise it will
crashes in case the package is not existed.
2016-03-25 18:55:36 +08:00
0b2122669e frozenage: show how long a project was last frozen
With multiple people working on staging projects, it's not always clear to everybody
when things happened and it's helpful to easily  be able to gather the information
2016-02-03 13:04:30 +01:00
Ludwig Nussel
58def4a352 display options in help output 2016-02-01 16:35:36 +01:00
a09348953a staging acheck: only check if accepting would be possible 2016-01-12 14:22:59 +01:00
3ae7d0c9db staging accept: introduce --force
Allow to skip full validation of /totest being fully synced.
This can be helpful (and is only meant to be used) when you run two
consequtive staging accept LETTER commands in a row.

* The first one would see /totest fully sync, not dirty
* the second call sees /totest as dirty, as the scheduler would first have
  to process all data

In order to not have to wait for this to happen, the factory-maintainer CAN
override this with osc staging accept --force
2015-12-22 14:53:42 +01:00
ce218979c4 staging accept: check if /totest is properly synced before changing /standard 2015-11-30 11:22:50 +01:00
Stephan Kulow
02e6638e35 allow to accept all requests not in stagings by not giving a letter 2015-10-11 08:58:10 +02:00
Stephan Kulow
698f8cd26b show the list options 2015-10-05 10:50:02 +02:00
a3f59150af Do not superseding requests with list command
Do not superseding requests with list command, but if had the permission
of staging, can executing with --supersede argument, or even against
specific requests.
2015-10-01 19:59:40 +08:00
Alberto Planas
3daf64078a Fix headers orders and some spaces. 2015-08-28 13:30:25 +02:00
fa6f508883 Add --by-develproject argument to adi command
If with --by-develproject, adi command will check devel project of
source package before selecting requests to adi staging.
2015-08-27 20:38:16 +08:00
Stephan Kulow
16c9e16cdb support --move in adi - create a new adi for the given arguments 2015-08-25 07:12:08 +02:00
Stephan Kulow
78eec38b4f check adi stagings and allow arguments to adi 2015-07-19 09:32:32 +02:00
Stephan Kulow
5de87f84e4 add adi command to create an ad interim staging prj for all non-ring packages 2015-07-16 15:09:26 +02:00
957955b0d6 accept_command: verify if project:Rebuild exists before attempting to retrigger based on differences 2015-07-03 09:26:01 +02:00