144 Commits

Author SHA1 Message Date
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
Alberto Planas
8308eaab14 Small changes for SLE integration. 2015-03-24 14:46:36 +01:00
Alberto Planas
37c7e2a6c6 Add a test for accept command when there are multiple SPECs 2015-03-02 11:15:24 +01:00
Alberto Planas
c9d1e06ca8 Refactor configuration parameters into configuration file. 2015-02-19 11:39:05 +01:00
Alberto Planas
4aad2749ec Initialize new configuration manager. 2015-02-19 10:58:31 +01:00
Alberto Planas
7fa1c06565 Rewrite DimStar work, using the OBSLock class. 2015-02-11 13:21:19 +01:00
87c8916620 Merge sync-rebuild into staging accept command 2015-02-09 17:17:47 +01:00
Stephan Kulow
d46af322d4 output failed module and tried retries for failed tests and stop accepting builds with 3 fails 2014-09-03 15:24:19 +02:00
29b8bcca6b Makes staging pluging Factory agnostic. 2014-08-07 12:58:47 +02:00
5962765901 action #2858 Remove code from staging relate with the old osc staging check command 2014-07-31 14:16:54 +02:00
Stephan Kulow
f679aeba78 give select command an --add switch to mark additional packages
https://progress.opensuse.org/issues/2892
2014-07-17 13:55:45 +02:00
Stephan Kulow
6e1250614b my completly lamda free version of changing versions
osc staging accept should set the version of factory to today
2014-07-15 10:53:43 +02:00
5750f4dfb0 action #2628 adapt osc staging check to read the information from obs_factory. 2014-07-08 15:33:39 +02:00
d3d702fc2a Remove unused imports. 2014-07-08 15:33:10 +02:00
Stephan Kulow
454828d252 accept other new requests after accepting staging prjs 2014-06-01 19:51:18 +02:00
7e1bdfff70 Fix space. Return is not used. 2014-05-20 12:26:55 +02:00
0569cf789b Change not ... is to is not. 2014-03-28 16:43:54 +01:00