Skip to content

Conan package registry: the project-level search endpoint should not return instance-wide results

🔥 Problem

The GitLab conan package registry supports the $ conan search command.

This command will hit the /search endpoint. This endpoint is expected to do a fuzzy search on package names.

The GitLab conan package registry is exposed at two levels:

  1. project-level
  2. instance-level

The issue we noticed is that the search endpoint for the project-level is returning packages from outside the target project.

This doesn't make sense as $ conan search will display packages that can't be pulled using that project-level endpoint (that's because the download endpoints will properly scope to the target project = they can't return packages outside the project).

🚒 Solution

  • Properly scope the conan packages search when the project level endpoint is used. Only packages of that project should be returned.
  • Take this opportunity to better split the services and finders. Currently, it's one class for multiple scenarios (eg. finding a single package vs multiple packages on project-level endpoint vs instance-level endpoint).

Caution

Since we're changing the behavior of an endpoint, this is a breaking change.