Skip to content

Added new fields in Packages_conan_file_metadata, Ignore old revisions fields and use new fields instead

  • 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

What does this MR do and why?

Step 4 in #480355 (closed), in the last three MR( !164844 (merged) !166443 (merged) !167144 (merged)) we created three tables to contains metadata for revision and package reference. Now we add the columns in Packages_conan_file_metadata to reference these new table and have a single source of truth.

Ignore recipe_revision and package_revision fields in Packages::Conan::FileMetadatum, use the new fields recipe_revision_id and package_revision_id instead.

This MR does not add support for revision. This will be done in a separate MR. It only ensure the same behavior with the new fields. For removing conan_package_metadata, we need a data migration. This will done is separate MRs.

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

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 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 newRevisionFieldspkg && cd newRevisionFieldspkg
  • conan new newRevisionFields/1.2.3@gitlab-org+conan/stable --template=cmake_lib
  • conan create . gitlab-org+conan/stable

Upload the package

  • conan upload newRevisionFields/1.2.3@gitlab-org+conan/stable -r gitlab-local --all

Check that you have no errors and the package is correctly uploaded in you project ( Deploy:Package Registry)

Download the package

First you need to delete the cache:

  • _rm -r ~/.conan/data/newRevisionFields/
  • conan install newRevisionFields/1.2.3@gitlab-org+conan/stable -r gitlab-local_

Check that it is downloaded without any issue

CC @ScanianJP

Edited by Océane Legrand

Merge request reports

Loading