Semantic version order methods in package.rb model
What does this MR do and why?
Fix #372033
As explained in the linked issue, this MR adds the ability to perform semantic ordering in package records by leveraging version_sorter
gem.
To facilitate ActiveRecord (AR) chaining and allow continuation of the now semantically ordered set, I leverage the unnest function to return a AR query.
Notes
- As opposed to other sorting scopes that use
reorder
, I am implementing the ordering in the final query usingorder
. This is required for subsequent MRs where I'll need to combine sorting by name and by version to get the latest version for a given package name (Terraform Modules).
Describe in detail what your merge request does and why.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by René Hernández Remedios