Skip to content

[backend] Support reporting scmsync url for binary search#19232

Open
adrianschroeter wants to merge 1 commit intoopenSUSE:masterfrom
adrianschroeter:search
Open

[backend] Support reporting scmsync url for binary search#19232
adrianschroeter wants to merge 1 commit intoopenSUSE:masterfrom
adrianschroeter:search

Conversation

@adrianschroeter
Copy link
Member

It requires the "withscmsyncurl" query parameter since old clients might fail with the result and search gets slower

@github-actions github-actions bot added Documentation 📖 Things regarding our documentation Frontend Things related to the OBS RoR app Backend Things regarding the OBS backend labels Feb 5, 2026
@adrianschroeter
Copy link
Member Author

@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
Comment on lines +8049 to +8052
'/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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

match 'search/published/binary/id' => :pass_to_backend, via: %i[get post]
match 'search/published/repoinfo/id' => :pass_to_backend, via: %i[get post]
match 'search/published/pattern/id' => :pass_to_backend, via: %i[get post]

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'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Things regarding the OBS backend Documentation 📖 Things regarding our documentation Frontend Things related to the OBS RoR app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants