360 Commits

Author SHA1 Message Date
Stephan Kulow
b32cbd7d63 Fix staging rebuild on python3 2019-05-29 06:57:13 +02:00
acc0ffc385 osclib: make source_file_load() always return string
Makes sense always return string from source_file_load(), this
preventing potentially TypeError on python3. Also changed product file
loading, now source_file_load() used.
2019-05-15 19:34:05 +08:00
Stephan Kulow
d57ba61df5 Remove more references to vcr
I tried to replace the Mocking of functions with httpretty, but
unfortunately httpretty replaces all other API calls with 404s then.

What we'd need is a library sniping out single requests - possibly
by mocking the http_GET function, but that's tricky as well with
caching already overwriting it
2019-05-11 10:26:35 +02:00
Stephan Kulow
aa70305aa2 Fix delete requests with multiple spec files
First gather the links and then wipe - or it will always be empty
2019-05-06 21:36:18 +02:00
Stephan Kulow
bb23be210b For consistency reasons always link the sub packages we're selecting
So far we skipped links between packages in the same ring because we've
frozen a _link pointing from one to the other, but this does not work
with default OBS and creates quite some problems also in adi projects
where it's trying to be smart.

Now simplify this a lot by simply linking it in any case
2019-05-06 21:36:18 +02:00
Stephan Kulow
8a7b65d505 Remove fake OBS in favor of using generated test data 2019-05-04 15:44:39 +02:00
Stephan Kulow
0693c88977 Fix crash on staging project without flag section 2019-05-04 15:44:39 +02:00
082d37e36f Improve error msg that the project was not frozen
This change is trying to provide user more information
in case that he already froze project but date of last
freeze was not updated, since there were no changes for
last MAX_FROZEN_AGE days.

* Use osclib.freeze_command.MAX_FROZEN_AGE constant
* Avoid explicit proposal of --no-freeze bug suggest alternative
2019-04-12 13:48:51 +02:00
Jimmy Berry
5f0f3f498a osc-staging: exclude NonFree requests from staging proposals.
- NonFree delete requests are never staged.
- NonFree submit requests are handled by adi command.
2019-03-28 09:54:24 -05:00
Stephan Kulow
e48e0b4750 Fix compat with pyYaml 5.1
the changed the output style default from None to False

Fixes #1908
2019-03-20 08:08:26 +01:00
Stephan Kulow
a13930afd4
Merge pull request #1906 from jberry-suse/yaml-safe-load
Replace deprecated (and not advised) yaml.load() with yaml.safe_load().
2019-03-20 06:32:48 +01:00
Jimmy Berry
78bfdb872f Replace deprecated (and not advised) yaml.load() with yaml.safe_load(). 2019-03-19 17:13:11 -05:00
Stephan Kulow
d40e1b0722 Add all checks from staging-required-checks-adi to main repo of adi projects
For Factory I want to switch away from repo checker reviews, but a required
check on project level. So first step: make it required for adi projects.
2019-03-07 17:07:39 +01:00
Jimmy Berry
249491d6f6 osclib/core: provide entity_exists() and use in StagingAPI.item_exists(). 2019-02-15 14:16:08 -06:00
Stephan Kulow
1714c582f6
Merge pull request #1791 from jberry-suse/staging-report-check-pending
staging-report: ignore projects not in a final state.
2018-11-19 11:33:52 +01:00
7433149ab3 stagingapi: No longer build disable to sub packages 2018-11-19 14:23:44 +08:00
Jimmy Berry
9b667e759e osclib/stagingapi: provide project_status_final(). 2018-11-16 13:33:31 -06:00
lethliel
dbf4b69a28 In some cases the return value of yaml.load(description_text)
can be a string containing 'none'.

This will be fetched with isinstance(data, str)
2018-11-16 14:30:13 +01:00
Stephan Kulow
24ae4ba819 Port more code to run under python3
(python2 compat kept)
2018-11-16 08:14:56 +01:00
Stephan Kulow
fd468e2c9c Do not crash on staging projects without status (gcc7) 2018-11-11 19:42:08 +01:00
Stephan Kulow
e97be1a445 Remove map_ring_package_to_subject - it always return project
(this was more advanced when we had more subprojects)
2018-11-08 17:30:12 +01:00
Stephan Kulow
7a3b86fed1 No longer build disable on selecting non-ring packages to letter prjs
This is no longer needed as we only have one subproject per staging
2018-11-08 17:28:18 +01:00
Jimmy Berry
4c8ade1a93 flake8: utilize raw strings to avoid invalid escape character warnings. 2018-10-24 16:34:16 -05:00
Stephan Kulow
e6bf5ccb7b Do no longer CC submitters in request comments
Submitters complain more and more about the spam they're getting from
staging projects - and we rather leave that weapon for actual feedback.

One especially annoying case is if a package is added to one staging project
and then later moved to another, the submitter will receive notifications
of all kind of bots and actions for both staging projects.
2018-10-04 09:52:49 +02:00
Jimmy Berry
6069245350 Remove SUSE copyright, warranty, and license headers.
Distinct copyrights were left as I do not wish to track down commit
history to ensure it properly documents the copyright holders. Also left
non-GPLv2 licenses and left bs_copy untouched as a mirror from OBS.

Already have a mix of with and without headers and even OBS does not place
on majority of files. If SUSE lawyers have an issue it will come up in
legal review for Factory.
2018-08-23 19:18:06 -05:00
Jimmy Berry
af0d74a2df StagingAPI: drop inferior expanded_repos() implementation for osclib.core. 2018-08-21 20:49:31 -05:00
Jimmy Berry
536e17cb79 osclib/stagingapi: rename dashboard_content_* methods to pseudometa_file_*.
No need to be confusing and use the deprecated dashboard name.
2018-08-17 23:19:24 -05:00
Jimmy Berry
5e6df089a6 osclib/stagingapi: drop {load,save}_file_content() methods.
Since the implementations have been made generic and dropped to osclib.core
there is not point in having wrappers in StagingAPI with the same args.
2018-08-17 22:15:58 -05:00
Jimmy Berry
26884da458 osclib/core: provide project_pseudometa_*() functions.
These methods provide for a generic place to store meta data related to
a project. For the time being, keep the original :Staging/dashboard
location for openSUSE products.
2018-08-17 22:11:28 -05:00
Jimmy Berry
0696a0fe6c osclib/stagingapi: utilize osclib.core.attribute_value_*() implementations.
Provides convenience aliases that require less arguments.
2018-08-16 22:01:46 -05:00
Jimmy Berry
600a486745 Utilize ET.fromstringlist() intead of joining strings. 2018-08-16 00:26:53 -05:00
Stephan Kulow
b40036fb71 Lazy evaluation the ring projects
So we can use the StagingAPI also for projects below the target
project

Fixes #1626
2018-08-01 16:15:48 +02:00
Stephan Kulow
4f275a5af8 Move expanded_repos into staging api
and make pkglistgen and repo_checker use it. We will have more
cases in the future of tools requiring it :)
2018-07-19 09:14:30 +02:00
Stephan Kulow
ae97da90e5 Remove more of :DVD subproject handling 2018-07-05 20:43:07 +02:00
71763873e3 stagingapi: remove staging_walk() function
DVD subproject has been obsoleted, no need to check :DVD anymore.
2018-07-04 21:27:19 +08:00
93ee829260 stagingapi: remove project_status_walk() function
subprojects method has been removed from dashboard,
project_status_walk() is not needed anymore.
2018-07-04 21:24:24 +08:00
30c32af1aa No longer have Ring2 and staging :DVD subproject 2018-06-29 18:29:47 +08:00
Jimmy Berry
e6157ce837 osclib/stagingapi: attribute_value_load(): ensure using desired value.
OBS likes to not follow its API documentation and tends to ignore the
specific attribute option and returns everything. This results in
returning the first element that lxml decide to match to the pattern.

Not sure if OBS broke this recently, or if #1573 was poorly tested.
2018-06-27 17:00:36 -05:00
Jimmy Berry
a909b40461 osclib/stagingapi: superseded_request(): revert poor indentation changes.
Human eyes can vertically. One does not write math homework like:

1. y = mx + b
        b = y - mx

or

1. y = mx + b
b = y - mx


one write it

1. y = mx + b
   b = y - mx
2018-06-20 15:30:13 -05:00
Stephan Kulow
0180de281a Fix test cases 2018-06-15 13:16:46 +02:00
Stephan Kulow
5e0e6c5126 Catch 404 for attributes (python3 way) 2018-06-15 11:40:02 +02:00
Stephan Kulow
030e7b807f Move config into an OBS attribute
Right now we require a Staging subproject to use staging plugin, which
is suboptimal especially for maintenance requests. The OBS attributes allow
to store the things right attached to the project - and the permissions
can be controlled in parallel to the maintainers right, which gives us
enough freedom
2018-06-15 11:40:02 +02:00
bd251bc6b7 Freeze adi: do not check the first package in frozenlinks but metadata
Check the devel project from the first package in frozenlinks won't work
if the package has been deleted, check the first package in metadata
instead.
2018-05-17 19:01:58 +08:00
Stephan Kulow
082ee52aaf ttm: Load and Store the ignored issues in an OBS attribute 2018-05-14 20:00:57 +02:00
Jimmy Berry
48913abc47 osclib/stagingapi: dashboard_content_load(): expose revision parameter. 2018-04-20 16:19:52 -05:00
Jimmy Berry
225c398e87 osclib/core: provide source_file_load() from StagingAPI. 2018-04-16 14:59:45 -05:00
67779dba6f
API: move fileinfo_ext[_all] from StagingAPI to core
These helpers can be used by other bots, like for example repo-checker,
which do not rely on the StagingAPI.
2018-03-24 13:34:44 +01:00
Jimmy Berry
e450a1519e osclib/stagingapi: rename main_repo to cmain_repo.
The previous name is inconsistent and did not work with general lazy laod.
2018-03-07 15:50:36 -06:00
Jimmy Berry
4bd9e9a2fb osclib/stagingapi: rename delreq_review to cdelreq_review.
The previous name is inconsistent and did not work with general lazy laod.
2018-03-07 15:50:36 -06:00
Jimmy Berry
d790a2ce69 osclib/stagingapi: rename cstaging_nocleanup to cnocleanup_packages.
The previous name is inconsistent and did not work with general lazy laod.
2018-03-07 15:50:36 -06:00