Project

Profile

Help

Story #5402

As a developer, Package content allows ORDER_BY in postgres based on EVR comparisons

Added by ggainey 7 months ago. Updated about 1 month ago.

Status:
NEW
Priority:
High
Assignee:
-
Category:
-
Start date:
Due date:
% Done:

0%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

In order to be able to do things like ORDER BY (EVR) in postgres on the Package content unit, we need to have a type and a comparison method available. Some examples of this include:

Debian:

Spacewalk:

VMaaS:

We should probably adopt one of the existing methods for the Package model.


Related issues

Blocked by RPM Support - Story #5950: Add database support for comparing EVRs NEW Actions
Blocks RPM Support - Story #5367: As a user, I can have a sync option that retains the latest N packages of the same name NEW Actions

History

#1 Updated by bmbouter 7 months ago

  • Subject changed from As Pulp3, I need to be able to do ORDER_BY in postgres based on EVR comparisons to As a developer, Package content allows ORDER_BY in postgres based on EVR comparisons
  • Description updated (diff)

Is the idea that there will be a field on the model and a DB trigger would populate it?

#2 Updated by ggainey 7 months ago

bmbouter wrote:

Is the idea that there will be a field on the model and a DB trigger would populate it?

Depends on the exact approach - VMaaS, for example, creates the evr_t array and inserts it directly:

https://github.com/RedHatInsights/vmaas/blob/master/reposcan/database/package_store.py#L45

#3 Updated by bmbouter 7 months ago

ggainey wrote:

bmbouter wrote:

Is the idea that there will be a field on the model and a DB trigger would populate it?

Depends on the exact approach - VMaaS, for example, creates the evr_t array and inserts it directly:

https://github.com/RedHatInsights/vmaas/blob/master/reposcan/database/package_store.py#L45

I see thank you. So we could do it either way.

#4 Updated by ttereshc about 1 month ago

  • Priority changed from Normal to High
  • Sprint/Milestone set to Priority items (outside of planned milestones/releases)

Priority is high assuming this is blocking support of "keep N versions of RPMs in a repo"

#5 Updated by ttereshc about 1 month ago

  • Blocked by Story #5950: Add database support for comparing EVRs added

#6 Updated by ttereshc about 1 month ago

  • Blocks Story #5367: As a user, I can have a sync option that retains the latest N packages of the same name added

Please register to edit this issue

Also available in: Atom PDF