Closed danidoni closed 2 years ago
On 2021-12-10 03:41:08 -0800, Dani Donisa wrote:
osc issues a wrong api call - that's definitely something we should fix. But despite the wrong/useless api call, you get the "expected" results, right?
Yes, but we also get lots of 400 calls because some users use the osc maintainer
call in scripts.
Do you know how to workaround the osc maintainer
call so it doesn't raise those 400 errors?
osc issues a wrong api call - that's definitely something we should fix.
Given the fact that the first search always fails with 400 (bare ?package=<pkg>
without &project=<prj>
always does, right?), shouldn't we simply remove it from the code and search ?binary=<pkg>
only?
@marcus-h are you fine with this or did you have a different idea?
On 2022-01-03 15:35:19 +0000, Daniel Mach wrote:
osc issues a wrong api call - that's definitely something we should fix.
Given the fact that the first search always fails with 400 (bare
?package=<pkg>
without&project=<prj>
always does, right?), shouldn't we simply remove it from the code and search?binary=<pkg>
only? @marcus-h are you fine with this or did you have a different idea?In principle yes but it might just be a "missing" feature in the API's owner controller/model because searching by "package" was the purpose of commit 36fc925ee062eeb7b23b09a29e69be0c4bae3f86 ("maintainer search: lookup via package name by default and binary as fallback").
@adrianschroeter: any idea?
(I'm fine with removing the call for the time being.)
The first one should be able to to find results by finding the package container in some cases. The default project(s) is defined via the OBS:OwnerRootProject attribute.
The reasoning behind is that some users expect that their binary rpms get found, others expect that the package container is found, even when no rpm with such name exists (source rpms do not count here).
So I think it is correct as it is atm.
On 2022-01-05 07:04:29 -0800, Adrian Schröter wrote:
The first one should be able to to find results by finding the package container in some cases. The default project(s) is defined via the OBS:OwnerRootProject attribute.
Hmm but that's currently not reflected in the API code (unless I miss something). owner_package_or_project directly returns nil if there is no project query parameter, which results in status 400.
That is a regression on the api side, should be fixed hopefully by this:
This seems to be fixed on the server as stated in the previous comment, closing.
(Please ignore a slightly different debug output, I'm running a test build that includes https://github.com/openSUSE/osc/pull/1000)
$ osc -d --http-debug maintainer ruby2.5
DEBUG: ----------------------------------------
DEBUG: GET https://api.opensuse.org/search/owner?package=ruby2.5
DEBUG: send: b'GET /search/owner?package=ruby2.5 HTTP/1.1\r\nHost: api.opensuse.org\r\nAccept-Encoding: identity\r\nuser-agent: osc/0.176.git\r\n\r\n'
DEBUG: reply: 'HTTP/1.1 200 OK\r\n'
...
Defined in project: SUSE:SLE-15:Update
bugowner of ruby2.5 :
-
maintainer of ruby2.5 :
jumper-bot, group:ibs-maintenance-team
The documentation about
osc maintainer
says:So I can run
osc maintainer ruby2.5
and get the maintainer. This actually raises a 400 Bad Request error as shown below, when using the-d --http-full-debug
command options.Looking at the API documentation looks like OBS expects
Either binary, user or group parameter is required.
when issuing the first call.Expected Result
No 400 Bad Request errors raised or
osc
asking me to provide the required parameters.