Skip to content

Conan snapshot and manifest API endpoints

Steve Abrams requested to merge 13345-conan-file-metadatum into master

What does this MR do?

This MR implements the "Snapshot" and "Manifest" endpoints of the conan registry api for the implementation of the Conan Package Manager (C++ package manager). When running a command like conan upload, the conan CLI will make api requests to these endpoints to fetch existing information about packages within the GitLab registry. This MR implements four of those endpoints which produce similar responses.

  • The two "manifest" endpoints return the download urls for a given file. These urls are constructed in conan_package_service.rb to match the format used by the conan package manager v1 api.
  • The two "snapshot" endpoints return the md5 hash of each existing file in the registry. The conan client uses these hashes to compare to files local on the client (user's computer).

In the creation of these endpoints, there comes the necessity of a metadata tables for conan files and packages.

Note: This is only a piece of the full conan upload implementation (it is too large for one MR), these new endpoints sit behind a feature flag, so there is no need for a changelog. The documentation for conan is also being handled in a separate MR: !16349 (merged)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related #13345 (closed)

Edited by Steve Abrams

Merge request reports