Replace remote cache entry tables with hierarchical tables

Why is this change being made?

Replace remote cache entry tables with hierarchical tables

The *_remote_cache_entries tables used a single relative_path column to identify cached content, discarding the structural richness of each artifact format. Replace them with dedicated table hierarchies that mirror the local content tables:

  • Container: container_remote_images, blobs, manifests, manifest_relationships, tags.
  • Maven: maven_remote_packages, versions, files
  • npm: npm_remote_packages, versions, tags, files

Related to Refine ADR: Database Schema (gitlab-org/gitlab#590365 - closed)

Author and Reviewer Checklist

Please verify the check list and ensure to tick them off before the MR is merged.

  • Provided a concise title for this Merge Request (MR)
  • Added a description to this MR explaining the reasons for the proposed change, per say why, not just what
    • Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added, and the content is SAFE
  • Assign reviewers for this MR to the correct
    • The when to get approval handbook section explains when DRI approval is required
    • The who can approve handbook section explains how to identify the DRI
    • If the MR does not require DRI approval, consider asking someone on your team, such as your manager.
    • The approver may merge the MR. If they approve but don't merge, you can merge.
  • For transparency, share this MR with the audience that will be impacted.
    • Team: For changes that affect your direct team, share in your group Slack channel
    • Department: If the update affects your department, share the MR in your department Slack channel
    • Division: If the update affects your division, share the MR in your division Slack channel
    • Company: If the update affects all (or the majority of) GitLab team members, post an update in #whats-happening-at-gitlab linking to this MR

Commits

  • Replace remote cache entry tables with hierarchical tables

The *_remote_cache_entries tables used a single relative_path column to identify cached content, discarding the structural richness of each artifact format. Replace them with dedicated table hierarchies that mirror the local content tables:

  • Container: container_remote_images, blobs, manifests, manifest_relationships, tags (5 tables)
  • Maven: maven_remote_packages, versions, files (3 tables)
  • NPM: npm_remote_packages, versions, tags, files (4 tables)

Virtual local cache entry tables remain flat as they serve a different purpose (routing cache for upstream resolution).


Edited by Dzmitry (Dima) Meshcharakou

Merge request reports

Loading