Move conan v1 search endpoint to conan shared endpoint
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
This move the conan v1 search endpoint to shared endpoints, so this endpoint can be use for conan v2. The search endpoint is only a search on package recipes, so it is not affected by revision and can be reuse for v2.
Changelog: changed
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
Supposing you have a conan remote called "gitlab-local" pointing to your local gitlab project. If not, you can set it up following the documentations: https://docs.gitlab.com/ee/user/packages/conan_repository/#add-a-remote-for-your-project
- Create a new conan package
mkdir searchTestpkg && cd searchTestpkg
conan new searchTest/1.2.3@gitlab-org+conan/stable --template=cmake_lib
conan create . gitlab-org+conan/stable
- Upload the package
conan upload searchTest/1.2.3@gitlab-org+conan/stable -r gitlab-local --all
- Search for the package
conan search searchTest/*@gitlab-org+conan/stable -r gitlab-local
Conan should return:
Existing package recipes:
searchTest/1.2.3@gitlab-org+conan/stable
- Search for the package with feature flag on
For GDK, open rails console (docs):
gdk rails console
Enable the feature flag:
# Enable
Feature.enable(:conan_package_revisions_support)
# Verify
Feature.enabled?(:conan_package_revisions_support)
Turn on revision on conan
export CONAN_REVISIONS_ENABLED=1
Search for the package:
conan search searchTest/*@gitlab-org+conan/stable -r gitlab-local
Conan should return:
Existing package recipes:
searchTest/1.2.3@gitlab-org+conan/stable
Related to #333033 (closed)
/cc @mbo5be