Project

Profile

Help

Story #5402

closed

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

Added by ggainey about 5 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

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

Blocks RPM Support - Story #5367: As a user, I can have a sync option that retains the latest N packages of the same nameCLOSED - CURRENTRELEASE

Actions
Actions #1

Updated by bmbouter about 5 years 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?

Actions #2

Updated by ggainey about 5 years 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

Actions #3

Updated by bmbouter about 5 years 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.

Actions #4

Updated by ttereshc over 4 years 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"

Actions #5

Updated by ttereshc over 4 years ago

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

Updated by ttereshc over 4 years ago

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

Updated by ttereshc over 4 years ago

  • Sprint/Milestone changed from Priority items (outside of planned milestones/releases) to Pulp 3.x RPM (Katello 4.1)
Actions #8

Updated by ttereshc over 4 years ago

  • Priority changed from High to Normal
Actions #9

Updated by dalley over 4 years ago

  • Blocked by deleted (Story #5950: Add database support for comparing EVRs)
Actions #10

Updated by dalley over 4 years ago

  • Status changed from NEW to POST
  • Assignee set to dalley

Added by dalley over 4 years ago

Revision ce6c3644 | View on GitHub

Add database support for comparing EVR

closes: #5402 https://pulp.plan.io/issues/5402

[nocoverage]

Actions #11

Updated by dalley over 4 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #12

Updated by ttereshc over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions #13

Updated by ttereshc over 4 years ago

  • Sprint/Milestone changed from Pulp 3.x RPM (Katello 4.1) to Pulp RPM 3.5.0

Also available in: Atom PDF