478 Commits

Author SHA1 Message Date
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
eb58d336d3 Provide StagingAPI.get_prj_meta(). 2017-01-24 22:21:53 -06:00
Jimmy Berry
641c550023 Provide StagingAPI short-hand staging name API.
- extract_staging_short().
- prj_from_short()
- get_staging_projects_short()
2017-01-24 22:21:53 -06:00
Jimmy Berry
69f662685c Add RequestSplitter for common filtering and grouping or requests.
- re-implement list and adi commands using RequestSplitter
- numerous small cleanups and clarity improvements
- notably, adi now prints similar output to select when adding requests
- lxml is needed to provide more fully-featured xpath implementation
2017-01-24 22:21:10 -06:00
Jimmy Berry
6a521fc063 Correct indentation level of in requests_ignored check.
In the previous state this worked for any project except factory, now it
works on factory too.
2017-01-12 16:14:33 -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
Jimmy Berry
f75e9bdaf3 adi_command: whitespace cleanup.
Tabs vs spaces is even scarier in python.
2016-12-29 16:27:11 -06:00
Jimmy Berry
6e0f2165e0 Indicate select command progress. 2016-12-06 16:40:05 -06:00
Ludwig Nussel
556f9b6b2d Merge pull request #608 from lnussel/adi
Improve adi list output
2016-12-06 15:39:46 +01:00
Ludwig Nussel
7ec1c1955b Improve adi list output 2016-12-06 12:59:47 +01:00
Ludwig Nussel
077d3b66f6 Split config for Leap
Leap doesn't have ppc in staging so split defaults so we don't need
an .oscrc
2016-12-06 12:57:00 +01:00
e6ecb0cbee Import http_POST for accept_command
Since commit 295fcd we newly also require http_POST in order to
put a new file in place after accepting.

Also add quotes around the fakepkgname when injecting it into the kiwi file.
2016-11-16 13:45:27 +01:00
295fcd63d3 Let Test-DVD is invalid in the beginning of the new round
Make sure Test-DVD won't in green state when new round just started,
wipe Test-DVD binary and intended to break kiwi build when accepting the
staging.
2016-11-15 19:18:02 +08:00
Ludwig Nussel
3119bec1e1 Allow to force individual package queries for devel project 2016-10-17 11:35:21 +02:00
33b717b567 Quit the loop if found the staging project for the request
If found the staging project for the request then it should quit the
loop, continue the loop makes no sense.
2016-10-13 19:27:15 +08:00
d6e845231a Ignore add_role request in the list command 2016-08-23 16:58:44 +08:00
Ludwig Nussel
e06b04627a Make repochecker give up on Haskell 2016-08-02 10:52:10 +02:00
Ludwig Nussel
41b189b5f5 For non-Factory statings show origin of requests 2016-07-29 10:28:58 +02:00
faefd0edcb Fix wrong valiable used in the filtering statement 2016-07-25 22:28:48 +08:00
5692ec1cc6 Use newcand param make sure don't select the processed requests 2016-07-19 15:32:52 +08:00
f36aba5ac0 Accept: fix escaping when creating linked package 2016-06-19 10:52:54 +02:00
9862e7d1ee AcceptCommand: Fix regex to replace devel prj for linked packages 2016-06-15 13:04:08 +02:00
Ludwig Nussel
7a19cf19fb Merge pull request #526 from lnussel/master
Handle separate lookup file in :NonFree
2016-06-14 14:29:31 +02:00
Ludwig Nussel
b505e7e7d8 Create empty dict even for projects without packages
cross OBS instance search doesn't seem to work so get_devel_project would
crash

closes #529
2016-06-14 14:05:17 +02:00
8c649111d9 Supeseding the request only when it was an reasonable type
Supeseding in stagin tool mainly works for submit/delete type request,
ie. supesede each other. The rest of type should not the case here.
2016-06-13 17:30:08 +08:00
335089ac61 Displays as Ring0 package if the subpackage was linked to Ring1
If the package was linked to Ring1 from Ring1, staging list command
should display it as Ring0 package ie. it's only be able to puts in
ring0 staging project. This is work out
https://progress.opensuse.org/issues/8266
2016-06-13 16:54:01 +08:00
Ludwig Nussel
bddcc12c8d Fix accept logic to actually work 2016-06-09 13:15:01 +02:00
Ludwig Nussel
4c43fe5c87 Group staging list by devel project 2016-06-07 15:12:02 +02:00
Ludwig Nussel
f2db5cdb5e Use implicit whitespace split 2016-06-07 15:12:02 +02:00
Ludwig Nussel
8857e79813 Print warning when staging with build disabled 2016-06-07 15:11:26 +02:00
Ludwig Nussel
919009aaf3 Print linkpac -f if link exists 2016-06-07 15:11:26 +02:00
Ludwig Nussel
7970a01c28 Don't die on packages that don't exist in Factory 2016-06-07 15:11:26 +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
Ludwig Nussel
27fb22b504 Print out something when trying to select a dupliate request 2016-06-07 14:44:42 +02:00
Ludwig Nussel
605a0cd0fa Catch sub packages changed to standalone
Instead of just dying raise a meaningful exception if a package is a
subpackage in a ring but standalone in the main project.
2016-06-07 14:44:42 +02:00
Ludwig Nussel
438e333eff Also fix multi spec file links 2016-06-07 14:44:42 +02:00
Ludwig Nussel
082f3a9a52 Fixup cleanup_rings a bit 2016-06-07 14:44:42 +02:00
Ludwig Nussel
dcb53ead4e Fix openSUSE staging defaults 2016-06-07 14:42:57 +02:00
d70f80cbd2 Autocleanup: Make list of packages to retain configurable 2016-06-02 16:37:32 +02:00
Ludwig Nussel
5812e0fe47 Merge pull request #519 from DimStar77/accept-cleanup
Accept cleanup
2016-06-02 13:09:42 +02:00
482c1f0490 AcceptCommand: Cleanup packages that were manually linked to projects 2016-06-02 12:40:48 +02:00
5c8aa3944f stagingapi: Add list_packages method
* Lists all the packages in a project

and use the new API call in check_pkgs
2016-05-31 15:05:36 +02:00
bd06bb33f7 Fix for id->number change in check_command 2016-05-31 20:11:36 +08:00
340aa5323c Small fixes 2016-05-31 14:25:51 +08: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
232673bd1f Also update product version in Staging1 TestDVD 2016-05-24 14:43:48 +08:00
Ludwig Nussel
84ba41de31 Merge pull request #499 from nilxam/adi_by_dp_leap
Update by_dp function in adi command
2016-05-12 11:25:15 +02:00
Ludwig Nussel
28831300fc Defer initialization of ring packages
some users of the staging api don't need to access rings, so defer
initialization to first use.
2016-05-09 17:32:40 +02:00