[backend] Support reporting scmsync url for binary search#19232
[backend] Support reporting scmsync url for binary search#19232adrianschroeter wants to merge 1 commit intoopenSUSE:masterfrom
Conversation
|
@dmach this is the requested binary search with scmsync url reporting. It requires the withscmsyncurl query argument (like withdownloadurl). |
It requires the "withscmsyncurl" query parameter since old clients might fail with the result and search gets slower
868914b to
26ca847
Compare
| '/search/published/binary/id $match: limit:num? withdownloadurl:bool? withscmsyncurl:bool?' => \&search_published_binary_id, | ||
| '/search/published/binary/name $match: limit:num? withdownloadurl:bool? withscmsyncurl:bool?' => \&search_published_binary_name, | ||
| '/search/published/pattern/id $match: limit:num? withdownloadurl:bool? withscmsyncurl:bool?' => \&search_published_pattern_id, | ||
| '/search/published/repoinfo/id $match: limit:num? withdownloadurl:bool? withscmsyncurl:bool?' => \&search_published_repoinfo_id, |
There was a problem hiding this comment.
The withscmsyncurl parameter was added to the /search/published/binary/id documentation, correct.
However, /search/published/binary/name is not part of the frontend API. I'm not sure if we want to add the parameter to that backend endpoint. See:
open-build-service/src/api/config/routes/api.rb
Lines 121 to 123 in f7a0659
Also, the withscmsyncurl parameter is missing from the documentation of these other two endpoints:
/search/published/pattern/id/search/published/repoinfo/id
Adding this line to the documentation of those endpoints would fix it:
- $ref: '../components/parameters/withscmsyncurl.yaml'
There was a problem hiding this comment.
hm, the usecase of withsymcsyncurl for pattern and repoinfo is indeed questionable. but the code had it also supported for downloadurl and I unified the interface to avoid exceptions.
we may used the binary/name route elswhere if the api is not forwarding it. but it was implemented before.
This is maybe an independ discussion from this implementation?
There was a problem hiding this comment.
This is maybe an independ discussion from this implementation?
I see. Regarding the changes to the /search/published/binary/name endpoint, sure, it is independent.
However, if the parameter is introduced in some existing frontend API endpoints, we should update the API documentation.
It requires the "withscmsyncurl" query parameter since old clients might fail with the result and search gets slower