Skip to content

Backend: Update catalog_resource.latest_released_at column when version is created/deleted/updated

Summary

This is the next step to #408382 (closed). Now that we have the ability to sort the GQL ciCatalogResources endpoint by LATEST_RELEASED_AT, we should ensure the catalog_resources.latest_released_at column actually has meaningful data. latest_released_at is a denormalized database column that allows us to simplify ordering catalog resources by their latest Version's released_at date.

Proposal

When a Version is created/deleted or when the associated Release updates its released_at value:

  • Re-evaluate the latest Version and update latest_released_at with the latest Version's released_at value.
  • If there are no Versions, update latest_released_at to null.

Implementation

Issue Link
Backend: Add released sort to CI Catalog GraphQL (#408382 - closed) #408382 (closed)
Backend: Update catalog_resource.latest_release... (#427791 - closed) 👈 You are here

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by Leaminn Ma